query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
listlengths 3
101
| negative_scores
listlengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Gets the union object for the modifiers for this type.
|
public NodeUnion<? extends T> getUnionForModifiers();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public PipeUnion<T> getUnion();",
"public org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union getUnion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union target = null;\n target = (org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union)get_store().find_element_user(UNION$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public NodeUnion<? extends DeclaredTypeNode> getUnionForExtendsClause();",
"public NodeUnion<? extends ClassBodyNode> getUnionForBody();",
"public XSUnionSimpleType asUnion() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: ddiv \n // 1: fdiv \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- ---- -------------------------------------------\n // 0 2 0 this Lcom/sun/xml/xsom/impl/UnionSimpleTypeImpl;\n // \n // The error that occurred was:\n // \n // java.lang.ArrayIndexOutOfBoundsException\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }",
"public java.lang.Long getUnionLong() {\n return unionLong;\n }",
"public java.lang.Long getUnionLong() {\n return unionLong;\n }",
"public NodeUnion<? extends IdentifierNode> getUnionForIdentifier();",
"public NodeUnion<? extends DeclaredTypeListNode> getUnionForBounds();",
"public NodeUnion<? extends IdentifierListNode> getUnionForTargets();",
"public void setUnionForModifiers(NodeUnion<? extends T> modifiers) throws NullPointerException;",
"public String getUnionAnthor() {\n return unionAnthor;\n }",
"@Override\n\tpublic Type union(Type t) {\n\t\treturn this;\n\t}",
"public NodeUnion<? extends DeclaredTypeListNode> getUnionForImplementsClause();",
"public T getModifiers()throws ClassCastException;",
"public NodeUnion<? extends TypeParameterListNode> getUnionForTypeParameters();",
"public java.lang.CharSequence getUnionString() {\n return unionString;\n }",
"public Object getUnion(int vectorIndex) {\n UnionVector vector = (UnionVector) table.getVector(vectorIndex);\n return vector.getObject(rowNumber);\n }",
"public java.lang.CharSequence getUnionString() {\n return unionString;\n }",
"UnionSecuenciaLuz createUnionSecuenciaLuz();",
"public byte getModifier(){\r\n\t\treturn modifiers;\r\n\t}",
"public T caseUnion(Union object) {\n\t\treturn null;\n\t}",
"UnionTypeDefinition createUnionTypeDefinition();",
"public Object getUnion(String columnName) {\n UnionVector vector = (UnionVector) table.getVector(columnName);\n return vector.getObject(rowNumber);\n }",
"BUnion createBUnion();",
"Modifier getModifier();",
"public Modifiers getModifiers() {\n return (Modifiers)getChild(0);\n }",
"public java.lang.Long getUnionLong() {\n\t throw new java.lang.UnsupportedOperationException(\"Get is not supported on tombstones\");\n\t }",
"public ModifierMirror getModifiers() {\n\t\treturn modifiers;\n\t}",
"@Override\n public List<UnitModifier> getModifiers()\n {\n ArrayList<UnitModifier> output = new ArrayList<>();\n output.addAll(model.getModifiers());\n output.addAll(CO.getModifiers());\n output.addAll(unitMods);\n return output;\n }",
"public Bag union(Bag u) {\n return u;\n }",
"public Object getDenseUnion(int vectorIndex) {\n DenseUnionVector vector = (DenseUnionVector) table.getVector(vectorIndex);\n return vector.getObject(rowNumber);\n }",
"public java.lang.Long getUnionDefNull() {\n return unionDefNull;\n }",
"public org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union addNewUnion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union target = null;\n target = (org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union)get_store().add_element_user(UNION$0);\n return target;\n }\n }",
"public String getUnionid() {\n return unionid;\n }",
"public String getUnionid() {\n return unionid;\n }",
"public String getUnionid() {\n return unionid;\n }",
"public java.lang.Long getUnionDefNull() {\n return unionDefNull;\n }",
"@Override\n public Modifier get() {\n if (!ModifierManager.INSTANCE.isDynamicModifiersLoaded()) {\n throw new IllegalStateException(\"Cannot fetch a dynamic modifiers before datapacks load\");\n }\n Modifier result = getUnchecked();\n if (result == ModifierManager.INSTANCE.getDefaultValue()) {\n throw new IllegalStateException(\"Dynamic modifier for \" + id + \" returned \" + ModifierManager.EMPTY + \", this typically means the modifier is not registered\");\n }\n if (!classFilter.isInstance(result)) {\n throw new IllegalStateException(\"Dynamic modifier is not the required type\");\n }\n return result;\n }",
"public java.lang.Long getUnionDefNull() {\n\t throw new java.lang.UnsupportedOperationException(\"Get is not supported on tombstones\");\n\t }",
"public Modifier<Document, Document>[] getModifiers() {\n\t\treturn this.modifiers;\n\t}",
"public final void mT__79() throws RecognitionException {\n try {\n int _type = T__79;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalMyDsl.g:77:7: ( 'union' )\n // InternalMyDsl.g:77:9: 'union'\n {\n match(\"union\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public MetaPrivilege getMetaPrivilege(String sType, String sObject, String sGrantor, String sGrantee);",
"public java.lang.CharSequence getUnionString() {\n\t throw new java.lang.UnsupportedOperationException(\"Get is not supported on tombstones\");\n\t }",
"public String getUnionid() {\r\n\t\treturn unionid;\r\n\t}",
"public Object getDenseUnion(String columnName) {\n DenseUnionVector vector = (DenseUnionVector) table.getVector(columnName);\n return vector.getObject(rowNumber);\n }",
"int getModifiers();",
"int getModifiers();",
"UnionCancionSecuencia createUnionCancionSecuencia();",
"public int modifiers();",
"public ModifierData getModifier() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn new ModifierData(__io__address + 0, __io__block, __io__blockTable);\n\t\t} else {\n\t\t\treturn new ModifierData(__io__address + 0, __io__block, __io__blockTable);\n\t\t}\n\t}",
"public ModifierData getModifier() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn new ModifierData(__io__address + 0, __io__block, __io__blockTable);\n\t\t} else {\n\t\t\treturn new ModifierData(__io__address + 0, __io__block, __io__blockTable);\n\t\t}\n\t}",
"public SimpleInterval1D getGenotypeUnionAlternativeInterval() {\n return getAlternativeAlleleInterval(getGoodPaternal()).union(getAlternativeAlleleInterval(getGoodMaternal()));\n }",
"private StructureModifier<Set<PlayerTeleportFlag>> getFlagsModifier(PacketContainer packet) {\r\n\t\treturn packet.getModifier().withType(Set.class,\r\n\t\t\t\tBukkitConverters.getSetConverter(FLAGS_CLASS, EnumWrappers\r\n\t\t\t\t\t\t.getGenericConverter(PlayerTeleportFlag.class)));\r\n\t}",
"public Modifiers getModifiersNoTransform() {\n return (Modifiers)getChildNoTransform(0);\n }",
"public int getModifiers() {\n return mod;\n }",
"public Long getIsUnionRule() {\n return this.IsUnionRule;\n }",
"public String getModifier() {\n return modifier;\n }",
"public String getModifier() {\n return modifier;\n }",
"public String getModifier() {\n return modifier;\n }",
"public String getModifier() {\n return modifier;\n }",
"public String getModifier() {\n return modifier;\n }",
"public String getModifier() {\n return modifier;\n }",
"JApiModifier<AccessModifier> getAccessModifier();",
"public org.apache.gora.cascading.test.storage.TestRow getUnionRecursive() {\n return unionRecursive;\n }",
"public GeometryType getCMUGeometry() {\n return geometry;\n }",
"public final void mT__63() throws RecognitionException {\n try {\n int _type = T__63;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.webgme_mtl/src-gen/org/xtext/example/webgme/parser/antlr/internal/InternalMTL.g:61:7: ( 'union' )\n // ../org.xtext.example.webgme_mtl/src-gen/org/xtext/example/webgme/parser/antlr/internal/InternalMTL.g:61:9: 'union'\n {\n match(\"union\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public org.apache.gora.cascading.test.storage.TestRow getUnionRecursive() {\n return unionRecursive;\n }",
"public boolean getOR() {\n return OR;\n }",
"public T getMerchandise(){\n\t\treturn merchandise;\n\t}",
"public boolean getOR() {\n return OR;\n }",
"Uom getUom();",
"public String getModifier() {\n\t\treturn modifier;\n\t}",
"public String getModifier() {\n\t\treturn modifier;\n\t}",
"public String getModifier() {\n\t\treturn modifier;\n\t}",
"public T caseModifiers(Modifiers object)\n {\n return null;\n }",
"void union(int p, int q) {}",
"@RestrictTo(Scope.LIBRARY_GROUP)\n @NonNull\n public ModifiersProto.ArcModifiers toProto() {\n return mImpl;\n }",
"public OreType getOreType() \n {\n return m_oreType;\n }",
"public BoundCodeDt<ModalityEnum> getModalityElement() { \n\t\tif (myModality == null) {\n\t\t\tmyModality = new BoundCodeDt<ModalityEnum>(ModalityEnum.VALUESET_BINDER);\n\t\t}\n\t\treturn myModality;\n\t}",
"InstrumentedType withModifiers(int modifiers);",
"public UnorderedTupleTypeLiteralElements getUnorderedTupleTypeLiteralAccess() {\r\n\t\treturn pUnorderedTupleTypeLiteral;\r\n\t}",
"public BoundCodeDt<ModalityEnum> getModality() { \n\t\tif (myModality == null) {\n\t\t\tmyModality = new BoundCodeDt<ModalityEnum>(ModalityEnum.VALUESET_BINDER);\n\t\t}\n\t\treturn myModality;\n\t}",
"public boolean hasUnionLong() {\n return fieldSetFlags()[5];\n }",
"private Object getTypeObjectPair() throws MathLinkException, NumberRangeException {\n Object result = null;\n int type = this.getInteger();\n if (type % -17 == -15) {\n type = -7 + -17 * (type / -17);\n } else if (type % -17 == -16) {\n type = -8 + -17 * (type / -17);\n }\n switch (type) {\n case -5: {\n result = new Integer(this.getInteger());\n break;\n }\n case -6: {\n result = new Long(this.getLongInteger());\n break;\n }\n case -4: {\n int i = this.getInteger();\n if (i < -32768 || i > 32767) {\n throw new NumberRangeException(i, \"short\");\n }\n result = new Short((short)i);\n break;\n }\n case -2: {\n int i = this.getInteger();\n if (i < -128 || i > 127) {\n throw new NumberRangeException(i, \"byte\");\n }\n result = new Byte((byte)i);\n break;\n }\n case -3: {\n int i = this.getInteger();\n if (i < 0 || i > 65535) {\n throw new NumberRangeException(i, \"char\");\n }\n result = new Character((char)i);\n break;\n }\n case -15: \n case -7: {\n double d = this.getDouble();\n if (d < -3.4028234663852886E38 || d > 3.4028234663852886E38) {\n throw new NumberRangeException(d, \"float\");\n }\n result = new Float((float)d);\n break;\n }\n case -16: \n case -8: {\n result = new Double(this.getDouble());\n break;\n }\n case -9: {\n int tok = this.getType();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n result = this.getString();\n if (tok != 35 || !result.equals(\"Null\")) break;\n result = null;\n break;\n }\n case -1: {\n String s = this.getSymbol();\n if (s.equals(\"True\")) {\n result = Boolean.TRUE;\n break;\n }\n result = Boolean.FALSE;\n break;\n }\n case -13: {\n long mark = this.createMark();\n try {\n int tok = this.getNext();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n if (tok == 35) {\n result = this.getSymbol();\n if (result.equals(\"Null\")) {\n result = null;\n break;\n }\n this.seekMark(mark);\n result = this.getComplex();\n break;\n }\n this.seekMark(mark);\n result = this.getComplex();\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -10: {\n long mark = this.createMark();\n try {\n int tok = this.getType();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n if (tok == 35) {\n result = this.getSymbol();\n if (result.equals(\"Null\")) {\n result = null;\n break;\n }\n result = new BigInteger((String)result);\n break;\n }\n result = new BigInteger(this.getString());\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -11: {\n long mark = this.createMark();\n try {\n int tok = this.getType();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n if (tok == 35) {\n result = this.getSymbol();\n if (result.equals(\"Null\")) {\n result = null;\n break;\n }\n result = Utils.bigDecimalFromString((String)result);\n break;\n }\n result = Utils.bigDecimalFromString(this.getString());\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -12: {\n long mark = this.createMark();\n try {\n int tok = this.getNext();\n if (tok == 100000 && (result = this.getObject()) != null) break;\n this.seekMark(mark);\n result = this.getExpr();\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -14: {\n result = this.getObject();\n break;\n }\n case -10000: {\n break;\n }\n default: {\n int tok = this.getNext();\n result = tok == 100000 || tok == 35 ? this.getObject() : (type > -34 ? this.getArray(type - -17, 1) : (type > -51 ? this.getArray(type - -34, 2) : (type > -68 ? this.getArray(type - -51, 3) : (type > -85 ? this.getArray(type - -68, 4) : this.getArray(type - -85, 5)))));\n }\n }\n return result;\n }",
"public Operator operator() {\n return _operator != null ? _operator : Operator.OR;\n }",
"DataType getBase_DataType();",
"public TPM_ALG_ID manifestSignatureSigAlg() { return manifestSignature != null ? manifestSignature.GetUnionSelector() : TPM_ALG_ID.NULL; }",
"public Object getObject() {\n return getWildcard();\n }",
"public MetaPrivilege getMetaPrivilege(int iPrivilege);",
"private org.bukkit.material.Sign getSignMaterial() {\r\n if (this.getBlock() == null) return null;\r\n \r\n org.bukkit.material.Sign material = new org.bukkit.material.Sign(this.getBlock().getType());\r\n material.setData(this.getBlock().getData());\r\n return material;\r\n }",
"public org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union.MemberTypes xgetMemberTypes()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union.MemberTypes target = null;\n target = (org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union.MemberTypes)get_store().find_attribute_user(MEMBERTYPES$2);\n return target;\n }\n }",
"@RestrictTo(Scope.LIBRARY_GROUP)\n @NonNull\n public ModifiersProto.Modifiers toProto() {\n return mImpl;\n }",
"public static int getModifiersAsInt(final String[] modifiers) {\n int accessFlags = 0;\n for (int i = 0; i < modifiers.length; i++) {\n if (modifiers[i].equals(\"abstract\")) {\n accessFlags |= Modifier.ABSTRACT;\n } else if (modifiers[i].equals(\"final\")) {\n accessFlags |= Modifier.FINAL;\n } else if (modifiers[i].equals(\"interface\")) {\n accessFlags |= Modifier.INTERFACE;\n } else if (modifiers[i].equals(\"native\")) {\n accessFlags |= Modifier.NATIVE;\n } else if (modifiers[i].equals(\"private\")) {\n accessFlags |= Modifier.PRIVATE;\n } else if (modifiers[i].equals(\"protected\")) {\n accessFlags |= Modifier.PROTECTED;\n } else if (modifiers[i].equals(\"public\")) {\n accessFlags |= Modifier.PUBLIC;\n } else if (modifiers[i].equals(\"static\")) {\n accessFlags |= Modifier.STATIC;\n } else if (modifiers[i].equals(\"strict\")) {\n accessFlags |= Modifier.STRICT;\n } else if (modifiers[i].equals(\"synchronized\")) {\n accessFlags |= Modifier.SYNCHRONIZED;\n } else if (modifiers[i].equals(\"transient\")) {\n accessFlags |= Modifier.TRANSIENT;\n } else if (modifiers[i].equals(\"volatile\")) {\n accessFlags |= Modifier.VOLATILE;\n }\n }\n return accessFlags;\n }",
"public String getModifierGuid() {\n return modifierGuid;\n }",
"private Object deserializeUnion(Object datum, Schema fileSchema, Schema recordSchema,\n UnionTypeInfo columnType) throws AvroSerdeException {\n int fsTag = GenericData.get().resolveUnion(fileSchema, datum); // Determine index of value from fileSchema\n int rsTag = GenericData.get().resolveUnion(recordSchema, datum); // Determine index of value from recordSchema\n Object desired = worker(datum, fileSchema == null ? null : fileSchema.getTypes().get(fsTag),\n recordSchema.getTypes().get(rsTag), columnType.getAllUnionObjectTypeInfos().get(rsTag));\n return new StandardUnionObjectInspector.StandardUnion((byte)rsTag, desired);\n }",
"public OperationTypeElements getOperationTypeAccess() {\n\t\treturn eOperationType;\n\t}",
"boolean getNoUnions();",
"public ORB _orb() {\n throw new NO_IMPLEMENT(reason);\n }",
"public <U extends T> U get();"
] |
[
"0.65015846",
"0.6363283",
"0.6195135",
"0.6098773",
"0.6069299",
"0.5994762",
"0.5955809",
"0.58978397",
"0.5867278",
"0.58641016",
"0.58217674",
"0.5806605",
"0.57660675",
"0.5726035",
"0.56714636",
"0.55778384",
"0.55104196",
"0.5471629",
"0.544178",
"0.5439061",
"0.5350429",
"0.5324892",
"0.5304019",
"0.5286988",
"0.5280652",
"0.5212566",
"0.52022845",
"0.51981264",
"0.51649636",
"0.515681",
"0.5105887",
"0.50692374",
"0.5043553",
"0.49985102",
"0.49956176",
"0.49956176",
"0.49956176",
"0.4987484",
"0.49771246",
"0.49712077",
"0.49547645",
"0.49517134",
"0.49362957",
"0.4914693",
"0.48845583",
"0.48776874",
"0.48497683",
"0.48497683",
"0.48429444",
"0.48371097",
"0.4833135",
"0.4833135",
"0.47963023",
"0.4786333",
"0.4742306",
"0.47107992",
"0.47100368",
"0.46946582",
"0.46946582",
"0.46946582",
"0.46946582",
"0.46946582",
"0.46946582",
"0.4677653",
"0.46659482",
"0.4659414",
"0.46579063",
"0.4647673",
"0.46412945",
"0.4629067",
"0.46194455",
"0.4615216",
"0.4583511",
"0.4583511",
"0.4583511",
"0.4553307",
"0.4543412",
"0.45326507",
"0.45308533",
"0.45306504",
"0.44846964",
"0.44787917",
"0.44672403",
"0.44569874",
"0.44208884",
"0.44146827",
"0.44101307",
"0.4404293",
"0.43905732",
"0.43800372",
"0.43716168",
"0.43627468",
"0.4353195",
"0.434192",
"0.43339086",
"0.4319599",
"0.4306879",
"0.42968318",
"0.42968053",
"0.4296266"
] |
0.7969371
|
0
|
Changes the modifiers for this type.
|
public void setModifiers(T modifiers);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setModifiers(int modifiers);",
"public void setModifiers(int mod) {\n int old = this.mod;\n this.mod = mod;\n firePropertyChange (PROP_MODIFIERS, new Integer (old), new Integer (mod));\n }",
"public void setModifiers(Modifiers node) {\n setChild(node, 0);\n }",
"void setModifier(Modifier modifier);",
"public void setModifiers(final Modifier<Document, Document>[] modifier) {\n\t\tthis.modifiers = modifier;\n\t}",
"public void resetModifiers() {\n\t\tsetmSabotage(0);\n\t\tsetmRallyTroops(0);\n\t\tsetmCoupure(0);\n\t\tsetmRaidSupplies(0);\n\t\tsetCanArchersAtack(true);\n\t\tsetCanBoilingWater(true);\n\t\tsetCanCloseCombat(true);\n\t\tsetCanCoupure(true);\n\t\tsetCanExtraAP(true);\n\t\tsetCanRallyTroops(true);\n\t\tsetCanTunnelMovement(true);\n\t}",
"int getModifiers();",
"int getModifiers();",
"public byte getModifier(){\r\n\t\treturn modifiers;\r\n\t}",
"public int modifiers();",
"public void setModifier(String modifier) {\n this.modifier = modifier;\n }",
"public void setModifier(String modifier) {\n this.modifier = modifier;\n }",
"public void setModifier(String modifier) {\n this.modifier = modifier;\n }",
"public void setModifierFlag(int flag) {\n\t\tthis.modifier = flag;\n\t}",
"@Override\n\tpublic void setAccessModifier(AccessModifier modifier) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}",
"public int getModifiers() {\n return mod;\n }",
"public void modifierArgent(int modificationArgent);",
"public void setModifier(ModifierData modifier) throws IOException\n\t{\n\t\tlong __dna__offset;\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__dna__offset = 0;\n\t\t} else {\n\t\t\t__dna__offset = 0;\n\t\t}\n\t\tif (__io__equals(modifier, __io__address + __dna__offset)) {\n\t\t\treturn;\n\t\t} else if (__io__same__encoding(this, modifier)) {\n\t\t\t__io__native__copy(__io__block, __io__address + __dna__offset, modifier);\n\t\t} else {\n\t\t\t__io__generic__copy( getModifier(), modifier);\n\t\t}\n\t}",
"public void setModifier(ModifierData modifier) throws IOException\n\t{\n\t\tlong __dna__offset;\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__dna__offset = 0;\n\t\t} else {\n\t\t\t__dna__offset = 0;\n\t\t}\n\t\tif (__io__equals(modifier, __io__address + __dna__offset)) {\n\t\t\treturn;\n\t\t} else if (__io__same__encoding(this, modifier)) {\n\t\t\t__io__native__copy(__io__block, __io__address + __dna__offset, modifier);\n\t\t} else {\n\t\t\t__io__generic__copy( getModifier(), modifier);\n\t\t}\n\t}",
"public void setModifier(String modifier) {\n\t\tthis.modifier = modifier;\n\t}",
"public void setModifier(String modifier) {\n\t\tthis.modifier = modifier;\n\t}",
"public void setModifier(String modifier) {\n\t\tthis.modifier = modifier;\n\t}",
"InstrumentedType withModifiers(int modifiers);",
"private void setShipModifiers(ShipType ship, int... mods) {\n\t\tfor (int i = 0; i < mods.length; i++) {\n\t\t\tshipModifiers[ship.ordinal()][i] = mods[i];\n\t\t}\n\t}",
"public void modifierVie(int modificationVie);",
"@SuppressWarnings(\"unchecked\")\n\tpublic void setModifier(final Modifier<Document, Document> modifier) {\n\t\tif (modifier != null) {\n\t\t\tthis.modifiers = new Modifier[1];\n\t\t\tthis.modifiers[0] = modifier;\n\t\t} else {\n\t\t\tthis.modifiers = null;\n\t\t}\n\t}",
"@Override\n protected void adjustTypeAttributes() {\n this.getSpecialData().addAttribute(SharedMonsterAttributes.maxHealth, 20.0);\n this.getSpecialData().multAttribute(SharedMonsterAttributes.movementSpeed, 1.2);\n }",
"public ModifierMirror getModifiers() {\n\t\treturn modifiers;\n\t}",
"Modifier getModifier();",
"public void genMutants(ModifierList mod) {\r\n\t\tif (mod.contains(ModifierList.PRIVATE)) {\r\n\t\t\tchangeModifier(mod, ModifierList.PRIVATE, -1);\r\n\t\t\tchangeModifier(mod, ModifierList.PRIVATE, ModifierList.PROTECTED);\r\n\t\t\tchangeModifier(mod, ModifierList.PRIVATE, ModifierList.PUBLIC);\r\n\r\n\t\t} else if (mod.contains(ModifierList.PROTECTED)) {\r\n\t\t\tchangeModifier(mod, ModifierList.PROTECTED, -1);\r\n\t\t\tchangeModifier(mod, ModifierList.PROTECTED, ModifierList.PRIVATE);\r\n\t\t\tchangeModifier(mod, ModifierList.PROTECTED, ModifierList.PUBLIC);\r\n\t\t} else if (mod.contains(ModifierList.PUBLIC)) {\r\n\t\t\tchangeModifier(mod, ModifierList.PUBLIC, -1);\r\n\t\t\tchangeModifier(mod, ModifierList.PUBLIC, ModifierList.PRIVATE);\r\n\t\t\tchangeModifier(mod, ModifierList.PUBLIC, ModifierList.PROTECTED);\r\n\t\t} else { // Friendly\r\n\t\t\tchangeModifier(mod, -1, ModifierList.PRIVATE);\r\n\t\t\tchangeModifier(mod, -1, ModifierList.PROTECTED);\r\n\t\t\tchangeModifier(mod, -1, ModifierList.PUBLIC);\r\n\t\t}\r\n\t}",
"public String getModifier() {\n return modifier;\n }",
"public String getModifier() {\n return modifier;\n }",
"public String getModifier() {\n return modifier;\n }",
"public String getModifier() {\n return modifier;\n }",
"public String getModifier() {\n return modifier;\n }",
"public String getModifier() {\n return modifier;\n }",
"public FieldPredicate withModifiers(int... modifiers) {\n this.withModifiers = Arrays.stream(modifiers).boxed().collect(Collectors.toList());\n return this;\n }",
"public T getModifiers()throws ClassCastException;",
"public void setModifierName(String modifierName) {\n this.modifierName = modifierName;\n }",
"public void setModifyMan(Integer modifyMan) {\n this.modifyMan = modifyMan;\n }",
"void setSubtype(WC7Modifier value);",
"public void modify() {\n }",
"public String getModifier() {\n\t\treturn modifier;\n\t}",
"public String getModifier() {\n\t\treturn modifier;\n\t}",
"public String getModifier() {\n\t\treturn modifier;\n\t}",
"public void setMultiSelect(int modifiers) {\n\t\t_multiMods = modifiers;\n\t}",
"public void setModifier(int modifier, Coords coords) {\n for (Mounted weapon : weapons.keySet()) {\n Vector<ArtilleryModifier> weaponMods = getWeaponModifiers(weapon);\n ArtilleryModifier am = getModifierByCoords(weaponMods, coords);\n if (am != null) {\n am.setModifier(modifier);\n } else {\n am = new ArtilleryModifier(coords, modifier);\n weaponMods.addElement(am);\n }\n }\n }",
"@Override\n\tpublic void modifierUser(User c) {\n\t\t\n\t}",
"public Modifier<Document, Document>[] getModifiers() {\n\t\treturn this.modifiers;\n\t}",
"public FieldPredicate withModifiers(Collection<Integer> modifiers) {\n this.withModifiers = new ArrayList<>(modifiers);\n return this;\n }",
"public MethodPredicate withModifiers(int... modifiers) {\n this.withModifiers = Arrays.stream(modifiers).boxed().collect(Collectors.toList());\n return this;\n }",
"public void setModifier(String modifier) {\n this.modifier = modifier == null ? null : modifier.trim();\n }",
"public void setModifier(String modifier) {\n this.modifier = modifier == null ? null : modifier.trim();\n }",
"void setImmunities(List<Type> immunities) {\n this.immunities = immunities;\n }",
"@Override\n public void adjustTypeAttributes() {\n this.getSpecialData().addAttribute(SharedMonsterAttributes.maxHealth, 20.0);\n }",
"@Override\n\tpublic void modify() {\n\t\t\n\t}",
"public MethodPredicate withModifiers(Collection<Integer> modifiers) {\n this.withModifiers = new ArrayList<>(modifiers);\n return this;\n }",
"public void setSingleSelect(int modifiers) {\n\t\t_singleMods = modifiers;\n\t}",
"@Override\n\t\t\tpublic void modifier(Catalogue catalogue) {\n\t\t\t\t\n\t\t\t}",
"public Modifiers getModifiers() {\n return (Modifiers)getChild(0);\n }",
"@Override\n public List<UnitModifier> getModifiers()\n {\n ArrayList<UnitModifier> output = new ArrayList<>();\n output.addAll(model.getModifiers());\n output.addAll(CO.getModifiers());\n output.addAll(unitMods);\n return output;\n }",
"public interface Modifier<Type> {\n\n\tvoid modify(Type object);\n\n\tvoid undo(Type object);\n}",
"private void writeMethodModifiers(Method m) {\n int mod = m.getModifiers();\n mod &= ~Modifier.ABSTRACT;\n mod &= ~Modifier.TRANSIENT;\n writer.print(Modifier.toString(mod) + \" \");\n }",
"public void setIsModifier(java.lang.Boolean value);",
"public void modifier(Etudiant t) {\n\t\tdao.modifier(t);\r\n\t}",
"public void setFlags(int param1) {\n }",
"public void setModifierFont(String name, int type, int size) \n {\n RendererSettings.getInstance().setLabelFont(name, type, size);\n _SPR.RefreshModifierFont();\n }",
"public FieldModifierPropertyEditor() {\n super(Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | Modifier.STATIC |\n Modifier.FINAL | Modifier.TRANSIENT | Modifier.VOLATILE);\n }",
"void setModified(Subject modifier, Date modificationTime)\n {\n this.modifier = modifier;\n this.modified = modificationTime;\n }",
"public String getModifierName() {\n return modifierName;\n }",
"private StructureModifier<Set<PlayerTeleportFlag>> getFlagsModifier(PacketContainer packet) {\r\n\t\treturn packet.getModifier().withType(Set.class,\r\n\t\t\t\tBukkitConverters.getSetConverter(FLAGS_CLASS, EnumWrappers\r\n\t\t\t\t\t\t.getGenericConverter(PlayerTeleportFlag.class)));\r\n\t}",
"private ModifierChange(\n final String changeText,\n final int srcStart,\n final int srcLength,\n final int dstStart,\n final int dstLength, final int priority) {\n super(changeText, ChangeType.MODIFIER, srcStart, srcLength, dstStart, dstLength);\n this.changePriority = priority;\n }",
"public final void modifiers() throws RecognitionException {\n int modifiers_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"modifiers\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(217, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 8) ) { return ; }\n // Java.g:218:5: ( ( modifier )* )\n dbg.enterAlt(1);\n\n // Java.g:218:9: ( modifier )*\n {\n dbg.location(218,9);\n // Java.g:218:9: ( modifier )*\n try { dbg.enterSubRule(15);\n\n loop15:\n do {\n int alt15=2;\n try { dbg.enterDecision(15);\n\n int LA15_0 = input.LA(1);\n\n if ( (LA15_0==73) ) {\n int LA15_2 = input.LA(2);\n\n if ( (LA15_2==Identifier) ) {\n alt15=1;\n }\n\n\n }\n else if ( (LA15_0==28||(LA15_0>=31 && LA15_0<=36)||(LA15_0>=52 && LA15_0<=55)) ) {\n alt15=1;\n }\n\n\n } finally {dbg.exitDecision(15);}\n\n switch (alt15) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:0:0: modifier\n \t {\n \t dbg.location(218,9);\n \t pushFollow(FOLLOW_modifier_in_modifiers395);\n \t modifier();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop15;\n }\n } while (true);\n } finally {dbg.exitSubRule(15);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 8, modifiers_StartIndex); }\n }\n dbg.location(219, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"modifiers\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }",
"public void addStyleModifier(int newStyle) {\n\t\tif (style == null) {\n\t\t\tstyle = newStyle;\n\t\t\treturn;\n\t\t}\n\t\tif (style == Font.PLAIN || newStyle == Font.PLAIN) {\n\t\t\tthrow new IllegalStateException(\"Attempted to set incompable styles\");\n\t\t}\n\t\tstyle = style | newStyle;\n\t}",
"public void setCurAttack(int modifier) {\n\t\tcurAttack = curAttack + modifier;\n\t}",
"void setBodyModType(final Bodymodtype bodyModType);",
"public abstract void setForceLevel(int level);",
"@Override\n\tpublic void posModify() {\n\t\t\n\t}",
"@Override\n\tpublic void posModify() {\n\t\t\n\t}",
"@Override\n\tpublic void modify(int quantity) {\n\t}",
"private void setPerms() {\n int oPerm = 0; // Owner permissions\n int gPerm = 0; // Group permissions\n int aPerm = 0; // All (other) permissions\n\n // Set owner permissions digit\n if (ownerRead.isSelected()) oPerm += 4; // Read\n if (ownerWrite.isSelected()) oPerm += 2; // Write\n if (ownerExe.isSelected()) oPerm += 1; // Execute\n\n // Set group permissions digit\n if (groupRead.isSelected()) gPerm += 4; // Read\n if (groupWrite.isSelected()) gPerm += 2; // Write\n if (groupExe.isSelected()) gPerm += 1; // Execute\n\n // Set all permissions digit\n if (allRead.isSelected()) aPerm += 4; // Read\n if (allWrite.isSelected()) aPerm += 2; // Write\n if (allExe.isSelected()) aPerm += 1; // Execute\n\n // Concatenate digits into chmod code\n String perms = Integer.toString(oPerm) + Integer.toString(gPerm) + Integer.toString(aPerm);\n //System.out.println(perms); // just for testing\n\n FTPReply chmodReply;\n try {\n // Set file permissions\n chmodReply = client.sendSiteCommand(\"chmod \" + perms + \" \" + theFile);\n System.out.println(chmodReply.toString());\n }\n catch (FTPIllegalReplyException | IOException e) {\n e.printStackTrace();\n }\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Boolean isIsModifier();",
"public void setModifierPercentage(Double modifierPercentage) {\n this.modifierPercentage = modifierPercentage;\n }",
"public void setModifierPercentage(Double modifierPercentage) {\n this.modifierPercentage = modifierPercentage;\n }",
"default void setRandomModifier(double value, int duration){\n Random random = new Random();\n Modifier.ModifierType[] modifierTypes = Modifier.ModifierType.values();\n Modifier.ModifierType randomType = modifierTypes[random.nextInt(modifierTypes.length)];\n Modifier randomModifier = new Modifier(randomType, value, duration);\n this.setModifier(randomModifier);\n }",
"public void setLevel(int newlevel)\n {\n level = newlevel; \n }",
"void setModifierId(String p_modifierId)\n {\n throw new UnsupportedOperationException(\n \"This method is not supported. Use addHistory()\");\n }",
"public DmcAttribute<?> addModify(Modifier value) {\n DmcAttribute<?> attr = get(MetaDMSAG.__modify);\n if (attr == null)\n attr = new DmcTypeModifierMV(MetaDMSAG.__modify);\n \n try{\n setLastValue(attr.add(value));\n add(MetaDMSAG.__modify,attr);\n }\n catch(DmcValueException ex){\n throw(new IllegalStateException(\"The type specific add() method shouldn't throw exceptions!\",ex));\n }\n return(attr);\n }",
"JApiModifier<AccessModifier> getAccessModifier();",
"private void conmuteFields() {\r\n\t\ttxPassword.setEditable(!txPassword.isEditable());\r\n\t\ttxUsuario.setEditable(!txUsuario.isEditable());\r\n\t\tcheckAdmin.setDisable(!checkAdmin.isDisable());\r\n\t\tcheckTPV.setDisable(!checkTPV.isDisable());\r\n\t}",
"void setHasAppliedModifier(boolean hasAppliedModifier);",
"public void setProtected()\n {\n ensureLoaded();\n m_flags.setProtected();\n setModified(true);\n }",
"public void modifyCharacterStyles(int start, int limit, StyleModifier modifier) {\r\n checkStartLimit(start, limit);\r\n if (fStyleBuffer.modifyStyles(start, limit, modifier, fDamagedRange)) {\r\n fTimeStamp += 1;\r\n }\r\n }",
"public void setModifiable(boolean modifiable) {\n this.modifiable.set(modifiable);\n }",
"public void remModify(){\n rem(MetaDMSAG.__modify);\n }",
"public void setCurDefense(int modifier) {\n\t\tcurDefense = curDefense + modifier;\n\t}",
"public void setUnionForModifiers(NodeUnion<? extends T> modifiers) throws NullPointerException;",
"private void eatModifier() {\n\n if (currentTokenPointer >= tokenCount) {\n\n raiseParseProblem(\"run out of tokens to process\", expansionString.length());\n\n }\n\n Token token = tokens.get(currentTokenPointer);\n\n TokenKind k = token.kind;\n\n if (currentVersionComponent > 3) {\n\n raiseParseProblem(\"too many version components specified, only major.minor.micro.qualifier is allowed. Found '\" + string(token)\n\n + \"' at position \" + token.start, token.start);\n\n }\n\n if (k == TokenKind.EQUALS) {\n\n processEquals();\n\n } else if (k == TokenKind.WORD) {\n\n processWord();\n\n } else if (k == TokenKind.NUMBER) {\n\n processNumeric();\n\n } else if (k == TokenKind.PLUSNUMBER || k == TokenKind.NEGATIVENUMBER) {\n\n processNumericModifier();\n\n } else {\n\n if (currentVersionComponent < 3) {\n\n raiseParseProblem(\"expected one of: '=' '+nnn' '-nnn' or 'nnn' but found '\" + string(token) + \"' at position \" + token.start,\n\n token.start);\n\n } else {\n\n raiseParseProblem(\"expected one of: '=' '+nnn' '-nnn' 'nnn' or 'xxx' but found '\" + string(token) + \"' at position \" + token.start,\n\n token.start);\n\n }\n\n }\n\n currentTokenPointer++;\n\n }",
"public void setModificationInfo(ModificationInfo modInfo)\t{\n\t\tmModInfo = modInfo;\n\t}",
"public void setFlags(final Flags flags);"
] |
[
"0.8072995",
"0.704974",
"0.70036924",
"0.69554424",
"0.66982824",
"0.6577747",
"0.645778",
"0.645778",
"0.63742125",
"0.62272763",
"0.6198427",
"0.6198427",
"0.6198427",
"0.61207753",
"0.6115195",
"0.6097125",
"0.6040902",
"0.60321337",
"0.60321337",
"0.6004615",
"0.6004615",
"0.6004615",
"0.5928193",
"0.5924164",
"0.58869034",
"0.58418494",
"0.5783542",
"0.57799494",
"0.57777417",
"0.57279944",
"0.5673729",
"0.5673729",
"0.5673729",
"0.5673729",
"0.5673729",
"0.5673729",
"0.5619263",
"0.5611246",
"0.55963945",
"0.5586479",
"0.55751055",
"0.55539817",
"0.5542354",
"0.5542354",
"0.5542354",
"0.5520536",
"0.55144435",
"0.5498359",
"0.54896134",
"0.54816574",
"0.5472236",
"0.54663974",
"0.54663974",
"0.54416347",
"0.5433764",
"0.5425295",
"0.54242563",
"0.54064244",
"0.53934723",
"0.5385595",
"0.5366928",
"0.5363952",
"0.5361815",
"0.5351292",
"0.5344976",
"0.53005403",
"0.528354",
"0.5263101",
"0.5237617",
"0.52066296",
"0.5188932",
"0.51860446",
"0.51545006",
"0.5152862",
"0.5132442",
"0.51319283",
"0.5128176",
"0.5124212",
"0.5124212",
"0.5086315",
"0.5059074",
"0.50504047",
"0.5038951",
"0.5038951",
"0.5034732",
"0.5028798",
"0.50268495",
"0.50184536",
"0.5016781",
"0.50106007",
"0.5007086",
"0.4998102",
"0.498876",
"0.49802336",
"0.49751273",
"0.49726388",
"0.49678612",
"0.49633187",
"0.49596703",
"0.49486768"
] |
0.7541492
|
1
|
Changes the modifiers for this type.
|
public void setUnionForModifiers(NodeUnion<? extends T> modifiers) throws NullPointerException;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setModifiers(int modifiers);",
"public void setModifiers(T modifiers);",
"public void setModifiers(int mod) {\n int old = this.mod;\n this.mod = mod;\n firePropertyChange (PROP_MODIFIERS, new Integer (old), new Integer (mod));\n }",
"public void setModifiers(Modifiers node) {\n setChild(node, 0);\n }",
"void setModifier(Modifier modifier);",
"public void setModifiers(final Modifier<Document, Document>[] modifier) {\n\t\tthis.modifiers = modifier;\n\t}",
"public void resetModifiers() {\n\t\tsetmSabotage(0);\n\t\tsetmRallyTroops(0);\n\t\tsetmCoupure(0);\n\t\tsetmRaidSupplies(0);\n\t\tsetCanArchersAtack(true);\n\t\tsetCanBoilingWater(true);\n\t\tsetCanCloseCombat(true);\n\t\tsetCanCoupure(true);\n\t\tsetCanExtraAP(true);\n\t\tsetCanRallyTroops(true);\n\t\tsetCanTunnelMovement(true);\n\t}",
"int getModifiers();",
"int getModifiers();",
"public byte getModifier(){\r\n\t\treturn modifiers;\r\n\t}",
"public int modifiers();",
"public void setModifier(String modifier) {\n this.modifier = modifier;\n }",
"public void setModifier(String modifier) {\n this.modifier = modifier;\n }",
"public void setModifier(String modifier) {\n this.modifier = modifier;\n }",
"public void setModifierFlag(int flag) {\n\t\tthis.modifier = flag;\n\t}",
"@Override\n\tpublic void setAccessModifier(AccessModifier modifier) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}",
"public int getModifiers() {\n return mod;\n }",
"public void modifierArgent(int modificationArgent);",
"public void setModifier(ModifierData modifier) throws IOException\n\t{\n\t\tlong __dna__offset;\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__dna__offset = 0;\n\t\t} else {\n\t\t\t__dna__offset = 0;\n\t\t}\n\t\tif (__io__equals(modifier, __io__address + __dna__offset)) {\n\t\t\treturn;\n\t\t} else if (__io__same__encoding(this, modifier)) {\n\t\t\t__io__native__copy(__io__block, __io__address + __dna__offset, modifier);\n\t\t} else {\n\t\t\t__io__generic__copy( getModifier(), modifier);\n\t\t}\n\t}",
"public void setModifier(ModifierData modifier) throws IOException\n\t{\n\t\tlong __dna__offset;\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__dna__offset = 0;\n\t\t} else {\n\t\t\t__dna__offset = 0;\n\t\t}\n\t\tif (__io__equals(modifier, __io__address + __dna__offset)) {\n\t\t\treturn;\n\t\t} else if (__io__same__encoding(this, modifier)) {\n\t\t\t__io__native__copy(__io__block, __io__address + __dna__offset, modifier);\n\t\t} else {\n\t\t\t__io__generic__copy( getModifier(), modifier);\n\t\t}\n\t}",
"public void setModifier(String modifier) {\n\t\tthis.modifier = modifier;\n\t}",
"public void setModifier(String modifier) {\n\t\tthis.modifier = modifier;\n\t}",
"public void setModifier(String modifier) {\n\t\tthis.modifier = modifier;\n\t}",
"InstrumentedType withModifiers(int modifiers);",
"private void setShipModifiers(ShipType ship, int... mods) {\n\t\tfor (int i = 0; i < mods.length; i++) {\n\t\t\tshipModifiers[ship.ordinal()][i] = mods[i];\n\t\t}\n\t}",
"public void modifierVie(int modificationVie);",
"@SuppressWarnings(\"unchecked\")\n\tpublic void setModifier(final Modifier<Document, Document> modifier) {\n\t\tif (modifier != null) {\n\t\t\tthis.modifiers = new Modifier[1];\n\t\t\tthis.modifiers[0] = modifier;\n\t\t} else {\n\t\t\tthis.modifiers = null;\n\t\t}\n\t}",
"public ModifierMirror getModifiers() {\n\t\treturn modifiers;\n\t}",
"@Override\n protected void adjustTypeAttributes() {\n this.getSpecialData().addAttribute(SharedMonsterAttributes.maxHealth, 20.0);\n this.getSpecialData().multAttribute(SharedMonsterAttributes.movementSpeed, 1.2);\n }",
"Modifier getModifier();",
"public void genMutants(ModifierList mod) {\r\n\t\tif (mod.contains(ModifierList.PRIVATE)) {\r\n\t\t\tchangeModifier(mod, ModifierList.PRIVATE, -1);\r\n\t\t\tchangeModifier(mod, ModifierList.PRIVATE, ModifierList.PROTECTED);\r\n\t\t\tchangeModifier(mod, ModifierList.PRIVATE, ModifierList.PUBLIC);\r\n\r\n\t\t} else if (mod.contains(ModifierList.PROTECTED)) {\r\n\t\t\tchangeModifier(mod, ModifierList.PROTECTED, -1);\r\n\t\t\tchangeModifier(mod, ModifierList.PROTECTED, ModifierList.PRIVATE);\r\n\t\t\tchangeModifier(mod, ModifierList.PROTECTED, ModifierList.PUBLIC);\r\n\t\t} else if (mod.contains(ModifierList.PUBLIC)) {\r\n\t\t\tchangeModifier(mod, ModifierList.PUBLIC, -1);\r\n\t\t\tchangeModifier(mod, ModifierList.PUBLIC, ModifierList.PRIVATE);\r\n\t\t\tchangeModifier(mod, ModifierList.PUBLIC, ModifierList.PROTECTED);\r\n\t\t} else { // Friendly\r\n\t\t\tchangeModifier(mod, -1, ModifierList.PRIVATE);\r\n\t\t\tchangeModifier(mod, -1, ModifierList.PROTECTED);\r\n\t\t\tchangeModifier(mod, -1, ModifierList.PUBLIC);\r\n\t\t}\r\n\t}",
"public String getModifier() {\n return modifier;\n }",
"public String getModifier() {\n return modifier;\n }",
"public String getModifier() {\n return modifier;\n }",
"public String getModifier() {\n return modifier;\n }",
"public String getModifier() {\n return modifier;\n }",
"public String getModifier() {\n return modifier;\n }",
"public FieldPredicate withModifiers(int... modifiers) {\n this.withModifiers = Arrays.stream(modifiers).boxed().collect(Collectors.toList());\n return this;\n }",
"public T getModifiers()throws ClassCastException;",
"public void setModifierName(String modifierName) {\n this.modifierName = modifierName;\n }",
"public void setModifyMan(Integer modifyMan) {\n this.modifyMan = modifyMan;\n }",
"void setSubtype(WC7Modifier value);",
"public void modify() {\n }",
"public String getModifier() {\n\t\treturn modifier;\n\t}",
"public String getModifier() {\n\t\treturn modifier;\n\t}",
"public String getModifier() {\n\t\treturn modifier;\n\t}",
"public void setMultiSelect(int modifiers) {\n\t\t_multiMods = modifiers;\n\t}",
"public void setModifier(int modifier, Coords coords) {\n for (Mounted weapon : weapons.keySet()) {\n Vector<ArtilleryModifier> weaponMods = getWeaponModifiers(weapon);\n ArtilleryModifier am = getModifierByCoords(weaponMods, coords);\n if (am != null) {\n am.setModifier(modifier);\n } else {\n am = new ArtilleryModifier(coords, modifier);\n weaponMods.addElement(am);\n }\n }\n }",
"@Override\n\tpublic void modifierUser(User c) {\n\t\t\n\t}",
"public Modifier<Document, Document>[] getModifiers() {\n\t\treturn this.modifiers;\n\t}",
"public FieldPredicate withModifiers(Collection<Integer> modifiers) {\n this.withModifiers = new ArrayList<>(modifiers);\n return this;\n }",
"public MethodPredicate withModifiers(int... modifiers) {\n this.withModifiers = Arrays.stream(modifiers).boxed().collect(Collectors.toList());\n return this;\n }",
"public void setModifier(String modifier) {\n this.modifier = modifier == null ? null : modifier.trim();\n }",
"public void setModifier(String modifier) {\n this.modifier = modifier == null ? null : modifier.trim();\n }",
"void setImmunities(List<Type> immunities) {\n this.immunities = immunities;\n }",
"@Override\n public void adjustTypeAttributes() {\n this.getSpecialData().addAttribute(SharedMonsterAttributes.maxHealth, 20.0);\n }",
"public MethodPredicate withModifiers(Collection<Integer> modifiers) {\n this.withModifiers = new ArrayList<>(modifiers);\n return this;\n }",
"@Override\n\tpublic void modify() {\n\t\t\n\t}",
"public void setSingleSelect(int modifiers) {\n\t\t_singleMods = modifiers;\n\t}",
"@Override\n\t\t\tpublic void modifier(Catalogue catalogue) {\n\t\t\t\t\n\t\t\t}",
"public Modifiers getModifiers() {\n return (Modifiers)getChild(0);\n }",
"@Override\n public List<UnitModifier> getModifiers()\n {\n ArrayList<UnitModifier> output = new ArrayList<>();\n output.addAll(model.getModifiers());\n output.addAll(CO.getModifiers());\n output.addAll(unitMods);\n return output;\n }",
"public interface Modifier<Type> {\n\n\tvoid modify(Type object);\n\n\tvoid undo(Type object);\n}",
"private void writeMethodModifiers(Method m) {\n int mod = m.getModifiers();\n mod &= ~Modifier.ABSTRACT;\n mod &= ~Modifier.TRANSIENT;\n writer.print(Modifier.toString(mod) + \" \");\n }",
"public void setIsModifier(java.lang.Boolean value);",
"public void modifier(Etudiant t) {\n\t\tdao.modifier(t);\r\n\t}",
"public void setFlags(int param1) {\n }",
"public void setModifierFont(String name, int type, int size) \n {\n RendererSettings.getInstance().setLabelFont(name, type, size);\n _SPR.RefreshModifierFont();\n }",
"public FieldModifierPropertyEditor() {\n super(Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | Modifier.STATIC |\n Modifier.FINAL | Modifier.TRANSIENT | Modifier.VOLATILE);\n }",
"void setModified(Subject modifier, Date modificationTime)\n {\n this.modifier = modifier;\n this.modified = modificationTime;\n }",
"public String getModifierName() {\n return modifierName;\n }",
"private StructureModifier<Set<PlayerTeleportFlag>> getFlagsModifier(PacketContainer packet) {\r\n\t\treturn packet.getModifier().withType(Set.class,\r\n\t\t\t\tBukkitConverters.getSetConverter(FLAGS_CLASS, EnumWrappers\r\n\t\t\t\t\t\t.getGenericConverter(PlayerTeleportFlag.class)));\r\n\t}",
"private ModifierChange(\n final String changeText,\n final int srcStart,\n final int srcLength,\n final int dstStart,\n final int dstLength, final int priority) {\n super(changeText, ChangeType.MODIFIER, srcStart, srcLength, dstStart, dstLength);\n this.changePriority = priority;\n }",
"public final void modifiers() throws RecognitionException {\n int modifiers_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"modifiers\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(217, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 8) ) { return ; }\n // Java.g:218:5: ( ( modifier )* )\n dbg.enterAlt(1);\n\n // Java.g:218:9: ( modifier )*\n {\n dbg.location(218,9);\n // Java.g:218:9: ( modifier )*\n try { dbg.enterSubRule(15);\n\n loop15:\n do {\n int alt15=2;\n try { dbg.enterDecision(15);\n\n int LA15_0 = input.LA(1);\n\n if ( (LA15_0==73) ) {\n int LA15_2 = input.LA(2);\n\n if ( (LA15_2==Identifier) ) {\n alt15=1;\n }\n\n\n }\n else if ( (LA15_0==28||(LA15_0>=31 && LA15_0<=36)||(LA15_0>=52 && LA15_0<=55)) ) {\n alt15=1;\n }\n\n\n } finally {dbg.exitDecision(15);}\n\n switch (alt15) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:0:0: modifier\n \t {\n \t dbg.location(218,9);\n \t pushFollow(FOLLOW_modifier_in_modifiers395);\n \t modifier();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop15;\n }\n } while (true);\n } finally {dbg.exitSubRule(15);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 8, modifiers_StartIndex); }\n }\n dbg.location(219, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"modifiers\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }",
"public void addStyleModifier(int newStyle) {\n\t\tif (style == null) {\n\t\t\tstyle = newStyle;\n\t\t\treturn;\n\t\t}\n\t\tif (style == Font.PLAIN || newStyle == Font.PLAIN) {\n\t\t\tthrow new IllegalStateException(\"Attempted to set incompable styles\");\n\t\t}\n\t\tstyle = style | newStyle;\n\t}",
"public void setCurAttack(int modifier) {\n\t\tcurAttack = curAttack + modifier;\n\t}",
"void setBodyModType(final Bodymodtype bodyModType);",
"public abstract void setForceLevel(int level);",
"@Override\n\tpublic void posModify() {\n\t\t\n\t}",
"@Override\n\tpublic void posModify() {\n\t\t\n\t}",
"@Override\n\tpublic void modify(int quantity) {\n\t}",
"private void setPerms() {\n int oPerm = 0; // Owner permissions\n int gPerm = 0; // Group permissions\n int aPerm = 0; // All (other) permissions\n\n // Set owner permissions digit\n if (ownerRead.isSelected()) oPerm += 4; // Read\n if (ownerWrite.isSelected()) oPerm += 2; // Write\n if (ownerExe.isSelected()) oPerm += 1; // Execute\n\n // Set group permissions digit\n if (groupRead.isSelected()) gPerm += 4; // Read\n if (groupWrite.isSelected()) gPerm += 2; // Write\n if (groupExe.isSelected()) gPerm += 1; // Execute\n\n // Set all permissions digit\n if (allRead.isSelected()) aPerm += 4; // Read\n if (allWrite.isSelected()) aPerm += 2; // Write\n if (allExe.isSelected()) aPerm += 1; // Execute\n\n // Concatenate digits into chmod code\n String perms = Integer.toString(oPerm) + Integer.toString(gPerm) + Integer.toString(aPerm);\n //System.out.println(perms); // just for testing\n\n FTPReply chmodReply;\n try {\n // Set file permissions\n chmodReply = client.sendSiteCommand(\"chmod \" + perms + \" \" + theFile);\n System.out.println(chmodReply.toString());\n }\n catch (FTPIllegalReplyException | IOException e) {\n e.printStackTrace();\n }\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Boolean isIsModifier();",
"public void setModifierPercentage(Double modifierPercentage) {\n this.modifierPercentage = modifierPercentage;\n }",
"public void setModifierPercentage(Double modifierPercentage) {\n this.modifierPercentage = modifierPercentage;\n }",
"default void setRandomModifier(double value, int duration){\n Random random = new Random();\n Modifier.ModifierType[] modifierTypes = Modifier.ModifierType.values();\n Modifier.ModifierType randomType = modifierTypes[random.nextInt(modifierTypes.length)];\n Modifier randomModifier = new Modifier(randomType, value, duration);\n this.setModifier(randomModifier);\n }",
"public void setLevel(int newlevel)\n {\n level = newlevel; \n }",
"void setModifierId(String p_modifierId)\n {\n throw new UnsupportedOperationException(\n \"This method is not supported. Use addHistory()\");\n }",
"public DmcAttribute<?> addModify(Modifier value) {\n DmcAttribute<?> attr = get(MetaDMSAG.__modify);\n if (attr == null)\n attr = new DmcTypeModifierMV(MetaDMSAG.__modify);\n \n try{\n setLastValue(attr.add(value));\n add(MetaDMSAG.__modify,attr);\n }\n catch(DmcValueException ex){\n throw(new IllegalStateException(\"The type specific add() method shouldn't throw exceptions!\",ex));\n }\n return(attr);\n }",
"JApiModifier<AccessModifier> getAccessModifier();",
"private void conmuteFields() {\r\n\t\ttxPassword.setEditable(!txPassword.isEditable());\r\n\t\ttxUsuario.setEditable(!txUsuario.isEditable());\r\n\t\tcheckAdmin.setDisable(!checkAdmin.isDisable());\r\n\t\tcheckTPV.setDisable(!checkTPV.isDisable());\r\n\t}",
"void setHasAppliedModifier(boolean hasAppliedModifier);",
"public void setProtected()\n {\n ensureLoaded();\n m_flags.setProtected();\n setModified(true);\n }",
"public void modifyCharacterStyles(int start, int limit, StyleModifier modifier) {\r\n checkStartLimit(start, limit);\r\n if (fStyleBuffer.modifyStyles(start, limit, modifier, fDamagedRange)) {\r\n fTimeStamp += 1;\r\n }\r\n }",
"public void setModifiable(boolean modifiable) {\n this.modifiable.set(modifiable);\n }",
"public void remModify(){\n rem(MetaDMSAG.__modify);\n }",
"public void setCurDefense(int modifier) {\n\t\tcurDefense = curDefense + modifier;\n\t}",
"private void eatModifier() {\n\n if (currentTokenPointer >= tokenCount) {\n\n raiseParseProblem(\"run out of tokens to process\", expansionString.length());\n\n }\n\n Token token = tokens.get(currentTokenPointer);\n\n TokenKind k = token.kind;\n\n if (currentVersionComponent > 3) {\n\n raiseParseProblem(\"too many version components specified, only major.minor.micro.qualifier is allowed. Found '\" + string(token)\n\n + \"' at position \" + token.start, token.start);\n\n }\n\n if (k == TokenKind.EQUALS) {\n\n processEquals();\n\n } else if (k == TokenKind.WORD) {\n\n processWord();\n\n } else if (k == TokenKind.NUMBER) {\n\n processNumeric();\n\n } else if (k == TokenKind.PLUSNUMBER || k == TokenKind.NEGATIVENUMBER) {\n\n processNumericModifier();\n\n } else {\n\n if (currentVersionComponent < 3) {\n\n raiseParseProblem(\"expected one of: '=' '+nnn' '-nnn' or 'nnn' but found '\" + string(token) + \"' at position \" + token.start,\n\n token.start);\n\n } else {\n\n raiseParseProblem(\"expected one of: '=' '+nnn' '-nnn' 'nnn' or 'xxx' but found '\" + string(token) + \"' at position \" + token.start,\n\n token.start);\n\n }\n\n }\n\n currentTokenPointer++;\n\n }",
"public void setModificationInfo(ModificationInfo modInfo)\t{\n\t\tmModInfo = modInfo;\n\t}",
"public void setFlags(final Flags flags);"
] |
[
"0.80747116",
"0.75426865",
"0.70505923",
"0.7004656",
"0.6956494",
"0.67003065",
"0.6577254",
"0.6461333",
"0.6461333",
"0.63777465",
"0.62310994",
"0.6201108",
"0.6201108",
"0.6201108",
"0.6122881",
"0.6117214",
"0.61004853",
"0.60425794",
"0.6033208",
"0.6033208",
"0.6007384",
"0.6007384",
"0.6007384",
"0.5929646",
"0.59246427",
"0.58883566",
"0.58430624",
"0.5784082",
"0.5782966",
"0.5781242",
"0.572854",
"0.56775284",
"0.56775284",
"0.56775284",
"0.56775284",
"0.56775284",
"0.56775284",
"0.5622113",
"0.56143504",
"0.55987847",
"0.5587395",
"0.55749756",
"0.5553256",
"0.55462474",
"0.55462474",
"0.55462474",
"0.5522387",
"0.5516234",
"0.54991186",
"0.5493713",
"0.5484826",
"0.5474866",
"0.5468479",
"0.5468479",
"0.54418606",
"0.5433196",
"0.54271716",
"0.54246527",
"0.5407532",
"0.53955686",
"0.5389538",
"0.5369791",
"0.5364532",
"0.53638965",
"0.53517544",
"0.53460455",
"0.53007",
"0.5283121",
"0.5263796",
"0.5239148",
"0.5209952",
"0.5192843",
"0.5186863",
"0.51581764",
"0.51521707",
"0.5132965",
"0.5130504",
"0.51271874",
"0.5123857",
"0.5123857",
"0.50857604",
"0.5059594",
"0.5053744",
"0.50406116",
"0.50406116",
"0.50351053",
"0.50285053",
"0.50283796",
"0.50196236",
"0.50194454",
"0.5008901",
"0.5008021",
"0.4999062",
"0.49893215",
"0.4981424",
"0.49750438",
"0.49731854",
"0.4964877",
"0.49612036",
"0.49487397"
] |
0.4967595
|
97
|
Gets the extends clause.
|
public DeclaredTypeNode getExtendsClause()throws ClassCastException;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"String getExtends();",
"public void setExtendsClause(DeclaredTypeNode extendsClause);",
"public ClassDescriptor getExtends() {\n return _extends;\n }",
"public NodeUnion<? extends DeclaredTypeNode> getUnionForExtendsClause();",
"public org.exolab.castor.mapping.ClassDescriptor getExtends()\n {\n return null;\n }",
"public org.exolab.castor.mapping.ClassDescriptor getExtends()\n {\n return null;\n }",
"public org.exolab.castor.mapping.ClassDescriptor getExtends()\n {\n return null;\n }",
"public AccessGroup getExtendGroup()\n {\n return this.extendGroup;\n }",
"public String getSkinExtends()\n {\n return _skinExtends;\n }",
"public boolean isExtending()\n {\n return this.extending;\n }",
"public void setUnionForExtendsClause(NodeUnion<? extends DeclaredTypeNode> extendsClause) throws NullPointerException;",
"private Vector getExtendImplement(ClassType c)\r\n {\r\n String st;\r\n Vector v = new Vector();\r\n\r\n if (c.extend.name != null && c.extend.scope == null)\r\n {\r\n st = c.extend.name.string;\r\n if (!c.unresolved.contains(st))\r\n for(Iterator iter = c.unresolved.iterator(); iter.hasNext();)\r\n {\r\n String s = (String)iter.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n v.add(st);\r\n }\r\n\r\n for(int j = 0; j < c.implement.length; j++)\r\n if (c.implement[j].scope == null)\r\n {\r\n st = c.implement[j].name.string;\r\n\r\n if (!c.unresolved.contains(st))\r\n for(Iterator iter = c.unresolved.iterator(); iter.hasNext();)\r\n {\r\n String s = (String)iter.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n if (!v.contains(st))\r\n v.add(st);\r\n }\r\n\r\n return v;\r\n }",
"public final void rule__JvmUpperBound__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:16453:1: ( ( 'extends' ) )\r\n // InternalDroneScript.g:16454:1: ( 'extends' )\r\n {\r\n // InternalDroneScript.g:16454:1: ( 'extends' )\r\n // InternalDroneScript.g:16455:2: 'extends'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \r\n }\r\n match(input,45,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public Node extend() {\n return node;\n }",
"public final void rule__JvmUpperBound__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:3016:1: ( ( 'extends' ) )\n // InternalCsv.g:3017:1: ( 'extends' )\n {\n // InternalCsv.g:3017:1: ( 'extends' )\n // InternalCsv.g:3018:2: 'extends'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \n }\n match(input,35,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public VoucherExtendBriefEntity getVoucherExtend() {\n\t\treturn voucherExtend;\n\t}",
"public final void mT__67() throws RecognitionException {\r\n try {\r\n int _type = T__67;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // ../org.openmodelica.modelicaml.editor.xtext.modification.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/modification/ui/contentassist/antlr/internal/InternalModification.g:64:7: ( 'extends' )\r\n // ../org.openmodelica.modelicaml.editor.xtext.modification.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/modification/ui/contentassist/antlr/internal/InternalModification.g:64:9: 'extends'\r\n {\r\n match(\"extends\"); \r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }",
"public Integer getExtendCatId() {\n return extendCatId;\n }",
"public String getExtendGroupName()\n {\n return this.extendGroup_name;\n }",
"public DeclaredTypeListNode getImplementsClause()throws ClassCastException;",
"public String getSuperclass() {\n\t\treturn null;\n\t}",
"PackageClause getPackageClause();",
"Rule Inheritance() {\n return Sequence(\"extends \", Identifier());\n }",
"public String toString() {\n\t\treturn getRange() + \" \" + getBaseClass() + \" WHERE \" + super.toString();\n\t}",
"public final void mT__17() throws RecognitionException {\r\n try {\r\n int _type = T__17;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // ../org.ow2.mindEd.adl.textual/src-gen/org/ow2/mindEd/adl/textual/parser/antlr/internal/InternalFractal.g:15:7: ( 'extends' )\r\n // ../org.ow2.mindEd.adl.textual/src-gen/org/ow2/mindEd/adl/textual/parser/antlr/internal/InternalFractal.g:15:9: 'extends'\r\n {\r\n match(\"extends\"); \r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }",
"private IExtendsContext createExtendsContext() throws RodinDBException {\n\t\tfinal IContextRoot ctx = createContext(\"ctx\");\n\t\treturn ctx.createChild(IExtendsContext.ELEMENT_TYPE, null, null);\n\t}",
"public final void mT__67() throws RecognitionException {\n try {\n int _type = T__67;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalMyDsl.g:65:7: ( 'extends' )\n // InternalMyDsl.g:65:9: 'extends'\n {\n match(\"extends\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public void setExtends(final SQLEngine engine) {\r\n _extends = engine;\r\n }",
"public boolean getExtendable()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EXTENDABLE$22);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(EXTENDABLE$22);\r\n }\r\n if (target == null)\r\n {\r\n return false;\r\n }\r\n return target.getBooleanValue();\r\n }\r\n }",
"@Override\n\tpublic String getWherePart() {\n\t\t\n\t\treturn super.getWherePart();\n\t}",
"public Type getSuper() {\n\t\treturn superClass;\n\t}",
"protected String getImportStatement() {\n return \"\";\n }",
"public Long getLimitClauseStart() {\r\n\t\treturn limitClauseStart;\r\n\t}",
"public int getLimitClauseStart() {\n return limitClauseStart;\n }",
"public int getLimitClauseStart() {\n return limitClauseStart;\n }",
"public boolean isExtended() {\n return extended;\n }",
"public final void mT__45() throws RecognitionException {\n try {\n int _type = T__45;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalSpeADL.g:43:7: ( 'extends' )\n // InternalSpeADL.g:43:9: 'extends'\n {\n match(\"extends\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public final void rule__JvmUpperBound__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16609:1: ( ( 'extends' ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16610:1: ( 'extends' )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16610:1: ( 'extends' )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16611:1: 'extends'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \r\n }\r\n match(input,126,FOLLOW_126_in_rule__JvmUpperBound__Group__0__Impl33523); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public Integer getSuperclass() {\n return superclass;\n }",
"public interface ExtendsFrom extends ViewDefinition\n{\n /**\n * Gets all the placeholder definitions for this view.\n *\n * @return A map with the name of the placeholder an the corresponding\n * Defines object.\n */\n Map<String, Defines> getDefinesMap();\n\n /**\n * Gets the list of defines for this view.\n *\n * @return A list of Defines objects.\n */\n List<Defines> getDefines();\n\n /**\n * The name of the parent layout.\n * \n * @return An string with the name of the parent layout.\n */\n String getLayout();\n}",
"public Class<?> getExtendedClass() {\n return this._describedClass.getSuperclass();\n }",
"@CheckForNull\n public final SubstringBounds getCommentBounds() {\n return this.comment;\n }",
"protected abstract void _extends( ClassOutlineImpl derived, ClassOutlineImpl base );",
"public java.lang.String getSelectClause() {\n if (selectClause.length() == 0) {\n buildQuery();\n }\n\n return selectClause;\n }",
"public org.apache.xmlbeans.XmlBoolean xgetExtendable()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlBoolean target = null;\r\n target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(EXTENDABLE$22);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlBoolean)get_default_attribute_value(EXTENDABLE$22);\r\n }\r\n return target;\r\n }\r\n }",
"@Override\n\tpublic Clause getConstraints() {\n\t\treturn null;\n\t}",
"public boolean isExtended() {\n return isExtended;\n }",
"public boolean getSuperscript() {\r\n return Superscript;\r\n }",
"@Override\n public Level getLevel(\n ) {\n return Level.Directive;\n }",
"String getMetadataSelectClause();",
"public final void rule__JvmUpperBound__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11760:1: ( ( 'extends' ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11761:1: ( 'extends' )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11761:1: ( 'extends' )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11762:1: 'extends'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \n }\n match(input,65,FOLLOW_65_in_rule__JvmUpperBound__Group__0__Impl23587); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public Extent getExtent()\n {\n return this.getCurrentData().getExtent();\n }",
"public String getSuperClass() {\n\t\treturn superField.getText();\n\t}",
"public IncludeDirective getIncludeDirective() {\n return includeDirective;\n }",
"protected void addExtendsPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_Bean_extends_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_Bean_extends_feature\", \"_UI_Bean_type\"),\n\t\t\t\t BeansPackage.Literals.BEAN__EXTENDS,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}",
"public final void mT__36() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = T__36;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:27:7: ( 'extends' )\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:27:9: 'extends'\n\t\t\t{\n\t\t\tmatch(\"extends\"); \n\n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public boolean getSubscript() {\r\n return Subscript;\r\n }",
"@Override\r\n\tpublic String getActivity_range() {\n\t\treturn super.getActivity_range();\r\n\t}",
"public LlvmValue visit(ClassDeclExtends n){\n\t\tSystem.out.format(\"@SymTabClassDeclExtends...\\n\");\n\t\treturn null;}",
"public int getExtent() {\r\n Object extentValue = extent.getValue();\r\n return extentValue == null\r\n ? getMinimum()\r\n : ((Integer) extentValue).intValue();\r\n\r\n }",
"public String getStatement();",
"public String getConditionalClause() {\r\n\t\treturn conditionalClause;\r\n\t}",
"void extend();",
"int getInheritsCount();",
"public static void testExtends() {\n List<Integer> list2 = new ArrayList<>();\n inputExtends(list2);\n\n List<Double> list3 = new ArrayList<>();\n inputExtends(list3);\n\n }",
"CategoryExtentType getCategoryExtent();",
"public Boolean getIsExtensible() { \n\t\treturn getIsExtensibleElement().getValue();\n\t}",
"boolean getOwnStatement();",
"@Override\n public byte getSubtype() {\n return SUBTYPE_DATA_TAGGED_DATA_EXTEND;\n }",
"ExtensionsType getExtensions();",
"public WhatClauseElements getWhatClauseAccess() {\n\t\treturn pWhatClause;\n\t}",
"final Locatable extent ()\n {\n return _goal.extent();\n }",
"public Expression getSelectionCriteria() {\n return getSQLStatement().getWhereClause();\n }",
"@Override\n\tpublic Function getAggregateExtentFunction(Column envelope) {\n\t\treturn null;\n\t}",
"public final EObject ruleJvmUpperBound() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n EObject lv_typeReference_1_0 = null;\n\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2824:28: ( (otherlv_0= 'extends' ( (lv_typeReference_1_0= ruleJvmTypeReference ) ) ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2825:1: (otherlv_0= 'extends' ( (lv_typeReference_1_0= ruleJvmTypeReference ) ) )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2825:1: (otherlv_0= 'extends' ( (lv_typeReference_1_0= ruleJvmTypeReference ) ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2825:3: otherlv_0= 'extends' ( (lv_typeReference_1_0= ruleJvmTypeReference ) )\n {\n otherlv_0=(Token)match(input,58,FOLLOW_58_in_ruleJvmUpperBound6651); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_0, grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0());\n \n }\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2829:1: ( (lv_typeReference_1_0= ruleJvmTypeReference ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2830:1: (lv_typeReference_1_0= ruleJvmTypeReference )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2830:1: (lv_typeReference_1_0= ruleJvmTypeReference )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2831:3: lv_typeReference_1_0= ruleJvmTypeReference\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getJvmUpperBoundAccess().getTypeReferenceJvmTypeReferenceParserRuleCall_1_0()); \n \t \n }\n pushFollow(FOLLOW_ruleJvmTypeReference_in_ruleJvmUpperBound6672);\n lv_typeReference_1_0=ruleJvmTypeReference();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getJvmUpperBoundRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"typeReference\",\n \t\tlv_typeReference_1_0, \n \t\t\"JvmTypeReference\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public String extended() {\r\n final StringBuilder sb = new StringBuilder();\r\n if(type != null) sb.append(\"[\" + code() + \"] \");\r\n return sb + simple();\r\n }",
"@Override\r\n\tpublic void shiftExtends() throws ParserException\r\n\t{\r\n\t\tchangeToState(new MDJ_19());\r\n\t}",
"public ExtendedLocation extendedLocation() {\n return this.extendedLocation;\n }",
"public ExtendedLocation extendedLocation() {\n return this.extendedLocation;\n }",
"SolutionChange getSuperChange();",
"public ArrayList<ESqlStatementType> getEnabledStatements() {\r\n return enabledStatements;\r\n }",
"public String getDerivedFrom()\n {\n return derivedFrom;\n }",
"public Collection<Collection<T>> getExtensions();",
"public Rectangle getBounds() {\n return super.getBounds();\n }",
"@Updatable\n public String getExtendedStatistic() {\n return extendedStatistic;\n }",
"public NodeUnion<? extends DeclaredTypeListNode> getUnionForImplementsClause();",
"StatementsPackage getStatementsPackage();",
"int getDeclarationSourceEnd();",
"public List<TypeReference> getSuperList() {\n\t\treturn superList;\n\t}",
"public ContextNodeStatement getStatement();",
"public char getExtended()\n {\n return this.extended;\n }",
"public NestedClause getXQueryClause();",
"public List<String> getExtensions() {\n if (this.extensions == null) {\n // alias?\n if (this.aliasOf != null) {\n return this.aliasOf.getExtensions();\n }\n }\n return this.extensions;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getComments();",
"public boolean extended() {\n // WRITE CODE BETWEEN THESE LINES -------------------------------------------------------- //\n // TODO: return the value of the m_extended flag.\n \n // ^^-----------------------------------------------------------------------------------^^ //\n return false;\n }",
"public Interval getConstraint (int subcl) {\n return this.constraints[subcl-1];\n }",
"Entity getSuperType();",
"public Type visit(ClassDeclExtends n) {\n\t\tthis.currClass = this.symbolTable.getClass(n.i.toString());\n\n\t\tif (this.currClass.parent() != n.j.s) {\n\t\t\tSystem.out.println(\"Extensão de classe errada\");\n\t\t}\n\n\t\tn.i.accept(this);\n\t\tn.j.accept(this);\n\t\tfor (int i = 0; i < n.vl.size(); i++) {\n\t\t\tn.vl.elementAt(i).accept(this);\n\t\t}\n\t\tfor (int i = 0; i < n.ml.size(); i++) {\n\t\t\tn.ml.elementAt(i).accept(this);\n\t\t}\n\t\treturn null;\n\t}",
"DocumentFragment getInstallationDescriptorExtension();",
"public Integer getExt1() {\n return ext1;\n }"
] |
[
"0.709837",
"0.6902909",
"0.66411585",
"0.62675494",
"0.6251041",
"0.6251041",
"0.6251041",
"0.57796484",
"0.55923617",
"0.55694354",
"0.5463338",
"0.5254258",
"0.50036395",
"0.50000906",
"0.49877328",
"0.49413085",
"0.4932008",
"0.49164534",
"0.4891264",
"0.48783797",
"0.48656166",
"0.48611292",
"0.48561734",
"0.48525655",
"0.48331305",
"0.47864044",
"0.4768394",
"0.47036117",
"0.46986017",
"0.4642071",
"0.46404347",
"0.46246144",
"0.46137553",
"0.46018842",
"0.46018842",
"0.46009916",
"0.4595092",
"0.45414856",
"0.45336875",
"0.45335376",
"0.45270213",
"0.4518237",
"0.44834286",
"0.44770125",
"0.44695455",
"0.44676423",
"0.44622532",
"0.44621322",
"0.44553834",
"0.44308087",
"0.44094756",
"0.4405423",
"0.44031414",
"0.43943",
"0.43782002",
"0.43775475",
"0.43751338",
"0.43525517",
"0.43513614",
"0.4331784",
"0.4317565",
"0.43165922",
"0.43038884",
"0.43000588",
"0.42950335",
"0.42871425",
"0.42832428",
"0.42799157",
"0.42793572",
"0.42729336",
"0.42725724",
"0.42671824",
"0.4263881",
"0.42595598",
"0.42585322",
"0.42574787",
"0.4254097",
"0.4253851",
"0.4253851",
"0.4241796",
"0.4240434",
"0.42370725",
"0.42273512",
"0.42265865",
"0.4219539",
"0.42189342",
"0.42123103",
"0.4211667",
"0.42074785",
"0.42040431",
"0.42009184",
"0.41934642",
"0.4191996",
"0.41829064",
"0.41814506",
"0.41779542",
"0.41693237",
"0.41656664",
"0.4165531",
"0.4160249"
] |
0.7583639
|
0
|
Gets the union object for the extends clause.
|
public NodeUnion<? extends DeclaredTypeNode> getUnionForExtendsClause();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setUnionForExtendsClause(NodeUnion<? extends DeclaredTypeNode> extendsClause) throws NullPointerException;",
"public DeclaredTypeNode getExtendsClause()throws ClassCastException;",
"public NodeUnion<? extends DeclaredTypeListNode> getUnionForImplementsClause();",
"public PipeUnion<T> getUnion();",
"public org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union getUnion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union target = null;\n target = (org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union)get_store().find_element_user(UNION$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public NodeUnion<? extends T> getUnionForModifiers();",
"String getExtends();",
"public NodeUnion<? extends ClassBodyNode> getUnionForBody();",
"public XSUnionSimpleType asUnion() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: ddiv \n // 1: fdiv \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- ---- -------------------------------------------\n // 0 2 0 this Lcom/sun/xml/xsom/impl/UnionSimpleTypeImpl;\n // \n // The error that occurred was:\n // \n // java.lang.ArrayIndexOutOfBoundsException\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }",
"public NodeUnion<? extends DeclaredTypeListNode> getUnionForBounds();",
"protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) {\r\n }",
"BUnion createBUnion();",
"public NodeUnion<? extends IdentifierListNode> getUnionForTargets();",
"public org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union addNewUnion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union target = null;\n target = (org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union)get_store().add_element_user(UNION$0);\n return target;\n }\n }",
"public T caseUnion(Union object) {\n\t\treturn null;\n\t}",
"public void setExtendsClause(DeclaredTypeNode extendsClause);",
"public Bag union(Bag u) {\n return u;\n }",
"public Interval getUnionWith(Interval i){\n\t\t\n\t\t//Assumes that are adjacent\n\t\treturn new Interval(\n\t\t\t\t\tmin(leftbound, i.getLeftBound()),\n\t\t\t\t\tmax(rightbound, i.getRightBound())\n\t\t\t\t);\n\t\t\n\t\t\n\t}",
"public org.exolab.castor.mapping.ClassDescriptor getExtends()\n {\n return null;\n }",
"public org.exolab.castor.mapping.ClassDescriptor getExtends()\n {\n return null;\n }",
"public org.exolab.castor.mapping.ClassDescriptor getExtends()\n {\n return null;\n }",
"public ClassDescriptor getExtends() {\n return _extends;\n }",
"public NodeUnion<? extends IdentifierNode> getUnionForIdentifier();",
"void union(int p, int q) {}",
"UnionSecuenciaLuz createUnionSecuenciaLuz();",
"@Override\n\tpublic Type union(Type t) {\n\t\treturn this;\n\t}",
"@Override\n public boolean supportsUnionAll() {\n return true;\n }",
"public NodeUnion<? extends TypeParameterListNode> getUnionForTypeParameters();",
"public String getUnionAnthor() {\n return unionAnthor;\n }",
"public static Interval union(Interval in1, Interval in2){\r\n if (Interval.intersection(in1, in2).isEmpty())\r\n return new Interval();\r\n double a = in1.getFirstExtreme();\r\n double b = in1.getSecondExtreme();\r\n double c = in2.getFirstExtreme();\r\n double d = in2.getSecondExtreme();\r\n double fe, se;\r\n char ai = in1.getFEincluded();\r\n char bi = in1.getSEincluded();\r\n char ci = in2.getFEincluded();\r\n char di = in2.getSEincluded();\r\n char fei, sei;\r\n if (a<c){\r\n fe = a;\r\n fei = ai;\r\n }\r\n else if (a>c){\r\n fe = c;\r\n fei = ci;\r\n }\r\n else{\r\n fe = a;\r\n fei = ai==ci?ai:'(';\r\n }\r\n if (d<b){\r\n se = b;\r\n sei = bi;\r\n }\r\n else if (d>b){\r\n se = d;\r\n sei = di;\r\n }\r\n else{\r\n se = b;\r\n sei = bi==di?bi:')';\r\n }\r\n return new Interval(fe,se,fei,sei);\r\n }",
"public java.lang.Long getUnionLong() {\n return unionLong;\n }",
"private Vector getExtendImplement(ClassType c)\r\n {\r\n String st;\r\n Vector v = new Vector();\r\n\r\n if (c.extend.name != null && c.extend.scope == null)\r\n {\r\n st = c.extend.name.string;\r\n if (!c.unresolved.contains(st))\r\n for(Iterator iter = c.unresolved.iterator(); iter.hasNext();)\r\n {\r\n String s = (String)iter.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n v.add(st);\r\n }\r\n\r\n for(int j = 0; j < c.implement.length; j++)\r\n if (c.implement[j].scope == null)\r\n {\r\n st = c.implement[j].name.string;\r\n\r\n if (!c.unresolved.contains(st))\r\n for(Iterator iter = c.unresolved.iterator(); iter.hasNext();)\r\n {\r\n String s = (String)iter.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n if (!v.contains(st))\r\n v.add(st);\r\n }\r\n\r\n return v;\r\n }",
"public java.lang.CharSequence getUnionString() {\n return unionString;\n }",
"public java.lang.Long getUnionLong() {\n return unionLong;\n }",
"public java.lang.CharSequence getUnionString() {\n return unionString;\n }",
"public final AstValidator.union_clause_return union_clause() throws RecognitionException {\n AstValidator.union_clause_return retval = new AstValidator.union_clause_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree UNION342=null;\n CommonTree ONSCHEMA343=null;\n AstValidator.rel_list_return rel_list344 =null;\n\n\n CommonTree UNION342_tree=null;\n CommonTree ONSCHEMA343_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:551:14: ( ^( UNION ( ONSCHEMA )? rel_list ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:551:16: ^( UNION ( ONSCHEMA )? rel_list )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n UNION342=(CommonTree)match(input,UNION,FOLLOW_UNION_in_union_clause2873); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n UNION342_tree = (CommonTree)adaptor.dupNode(UNION342);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(UNION342_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:551:25: ( ONSCHEMA )?\n int alt99=2;\n int LA99_0 = input.LA(1);\n\n if ( (LA99_0==ONSCHEMA) ) {\n alt99=1;\n }\n switch (alt99) {\n case 1 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:551:25: ONSCHEMA\n {\n _last = (CommonTree)input.LT(1);\n ONSCHEMA343=(CommonTree)match(input,ONSCHEMA,FOLLOW_ONSCHEMA_in_union_clause2875); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n ONSCHEMA343_tree = (CommonTree)adaptor.dupNode(ONSCHEMA343);\n\n\n adaptor.addChild(root_1, ONSCHEMA343_tree);\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n\n }\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_rel_list_in_union_clause2878);\n rel_list344=rel_list();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, rel_list344.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }",
"UnionCancionSecuencia createUnionCancionSecuencia();",
"public org.apache.gora.cascading.test.storage.TestRow getUnionRecursive() {\n return unionRecursive;\n }",
"protected abstract NativeSQLStatement createNativeGeomUnionStatement(Geometry geom);",
"public org.apache.gora.cascading.test.storage.TestRow getUnionRecursive() {\n return unionRecursive;\n }",
"public SimpleInterval1D getGenotypeUnionAlternativeInterval() {\n return getAlternativeAlleleInterval(getGoodPaternal()).union(getAlternativeAlleleInterval(getGoodMaternal()));\n }",
"public Object getUnion(String columnName) {\n UnionVector vector = (UnionVector) table.getVector(columnName);\n return vector.getObject(rowNumber);\n }",
"@Override\n public SqlSelect asSelect() {\n if (node instanceof SqlSelect) {\n return (SqlSelect) node;\n }\n if (node.isA(SqlKind.SET_QUERY) || isSubQuery() || !dialect.hasImplicitTableAlias()) {\n return wrapSelectAndPushOrderBy(asFrom());\n }\n return wrapSelectAndPushOrderBy(node);\n }",
"public List<Interval> getUnionWithList(Interval i){\n\t\t\n\t\tList<Interval> unionList = new ArrayList<Interval>();\n\t\t\n\t\tif (isAdjacentTo(i)){\n\t\t\tunionList.add(new Interval(\n\t\t\t\t\t\tmin(leftbound, i.getLeftBound()),\n\t\t\t\t\t\tmax(rightbound, i.getRightBound())\n\t\t\t\t\t));\n\t\t}\n\t\telse{\n\t\t\tunionList.add(this);\n\t\t\tunionList.add(i);\n\t\t}\n\t\t\t\n\t\treturn unionList;\n\t\t\n\t}",
"public Object getUnion(int vectorIndex) {\n UnionVector vector = (UnionVector) table.getVector(vectorIndex);\n return vector.getObject(rowNumber);\n }",
"public AccessGroup getExtendGroup()\n {\n return this.extendGroup;\n }",
"public boolean supportsUnionAll() {\n \t\treturn false;\n \t}",
"public T caseUnionRule(UnionRule object)\n {\n return null;\n }",
"List<ProtocolPo> queryByUnion(ProtocolPo query);",
"@Override\n\tpublic void enterDslStatement(AAIDslParser.DslStatementContext ctx) {\n\t\tif (isUnionBeg) {\n\t\t\tisUnionBeg = false;\n\t\t\tisUnionTraversal = true;\n\n\t\t} else if (unionMembers > 0) {\n\t\t\tunionMembers--;\n\t\t\tquery += \",builder.newInstance()\";\n\t\t\tisUnionTraversal = true;\n\t\t}\n\n\t}",
"private static AnnotatedTypeMirror asOuterSuper(Types types, AnnotatedTypeFactory atypeFactory, AnnotatedTypeMirror t,\n AnnotatedTypeMirror elem) {\n switch (t.getKind()) {\n case DECLARED:\n AnnotatedDeclaredType dt = (AnnotatedDeclaredType) t;\n do {\n // Search among supers for a desired supertype\n AnnotatedTypeMirror s = asSuper(types, atypeFactory, dt, elem);\n if (s != null) {\n return s;\n }\n // if not found immediately, try enclosing type\n // like A in A.B\n dt = dt.getEnclosingType();\n } while (dt != null);\n return null;\n case ARRAY: // intentional follow-through\n case TYPEVAR: // intentional follow-through\n case WILDCARD:\n return asSuper(types, atypeFactory, t, elem);\n default:\n return null;\n }\n }",
"public BoundingBox union(BoundingBox b) {\n\t\tRectangle r = getAWTRectangle();\n\t\tr.add(b.getAWTRectangle());\n\t\treturn new BoundingBox(r);\n\t}",
"public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }",
"public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }",
"public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }",
"public CreateUnionResponse createUnion(CreateUnionRequest request) throws GPUdbException {\n CreateUnionResponse actualResponse_ = new CreateUnionResponse();\n submitRequest(\"/create/union\", request, actualResponse_, false);\n return actualResponse_;\n }",
"public interface Union0<First> {\n /**\n * Executes one of the continuations depending on the element type\n */\n void continued(Consumer<First> continuationFirst);\n\n /**\n * Transforms the element in the union to a new type\n * \n * @param <R> result type\n * @return an object of the result type\n */\n <R> R join(Function<First, R> mapFirst);\n\n /**\n * Creator class for Union1\n */\n interface Factory<First> {\n /**\n * Creates a Union0 wrapping a value\n * \n * @param single the value\n * @return a Union0 object wrapping the value\n */\n Union0<First> first(First single);\n }\n}",
"private String buildUnionOut(Stream strm){\n\t\tInteger i = 0;\n\t\tString str = genTableStr + strm.getName() + \"_starqlout\"+\" AS WCACHE\\r\\n\";\n\t\tstr += \"select * from (mergeunion '\";\n\t\twhile (i < outNum){\n\t\t\ti++;\n\t\t\tstr += strm.getName() + \"_starqlout_\"+i;\t\t\t\n\t\t\tif(i < outNum)\n\t\t\t\tstr += \",\";\n\t\t}\n\t\tstr += \t\"' cols:timestamp);\\r\\n\";\n\t\treturn str;\n\t}",
"public static Vector Union (Vector A, Vector B)\n\t{\n\t\tVector C = A;\n\t\tfor (int i = 0; i < B.size (); i++)\n\t\t\tA.addElement (B.elementAt (i));\n\t\treturn C;\n\t}",
"public String getUnionid() {\n return unionid;\n }",
"public String getUnionid() {\n return unionid;\n }",
"public String getUnionid() {\n return unionid;\n }",
"public Node extend() {\n return node;\n }",
"public String getSkinExtends()\n {\n return _skinExtends;\n }",
"public int union(int u, int v) {\n int p1 = find(u), p2 = find(v);\n if (p1 == p2) {\n return p1;\n }\n int s1 = _sizes[p1], s2 = _sizes[p2];\n if (s1 > s2) {\n _sizes[p1] += s2;\n// int i = 1;\n// while (s2 > 0) {\n// if (_parents[i] == p2) {\n// _parents[i] = p1;\n// s2 -= 1;\n// }\n// i += 1;\n// }\n _parents[p2] = p1;\n return s1;\n } else {\n _sizes[p2] += s1;\n// int j = 1;\n// while (s1 > 0) {\n// if (_parents[j] == p1) {\n// _parents[j] = p2;\n// s1 -= 1;\n// }\n// j += 1;\n// }\n _parents[p1] = p2;\n return s2;\n }\n }",
"public BSTSet union(BSTSet s) {\n int[] thisArray = BSTToArray();\n int[] sArray = s.BSTToArray();\n int[] unionArray = new int[thisArray.length + sArray.length];\n int unionArrayIndex = 0;\n\n // add both arrays together\n for (int i = 0; i < thisArray.length; i++) {\n unionArray[unionArrayIndex++] = thisArray[i];\n }\n\n for (int i = 0; i < sArray.length; i++) {\n unionArray[unionArrayIndex++] = sArray[i];\n }\n\n return new BSTSet(unionArray);\n }",
"@Override\n public IntSet union(IntSet other) {\n return other;\n }",
"public DeclaredTypeListNode getImplementsClause()throws ClassCastException;",
"@Override\n public SetInterface<T> union(SetInterface<T> rhs) {\n //Declare return SetInterface\n SetInterface<T> answer = new ArraySet();\n //Add the items from the calling ArraySet to the return Set\n for (int i = 0; i < this.numItems; i++){\n answer.addItem(arr[i]);\n }\n //Convert the other set to an array in case it isnt and to \n //ease iteration\n T[] other = rhs.toArray();\n //Add the items from RHS to return Set\n for (int j = 0; j < rhs.getSize(); j++){\n answer.addItem(other[j]);\n }\n //Return the answer\n return answer; \n }",
"Object getBase();",
"@Override\n public SetI union(SetI other) {\n Set o;\n\n if (!(other instanceof Set)) {\n // Different Set impl. Convertion needed.\n // Will impact performance.\n o = Set.fromAnotherImpl(other);\n }\n else {\n o = (Set) other;\n }\n\n int[] newArr = new int[count + o.count];\n int i = 0, j = 0, k = 0;\n\n // Merge sorted arrays.\n while (i < count && j < o.count) {\n // Skip duplicated elements.\n if (contains(o.arr[j])) {\n ++j;\n }\n else if (arr[i] < o.arr[j]) {\n newArr[k++] = arr[i++];\n }\n else {\n newArr[k++] = o.arr[j++];\n }\n }\n\n while (i < count) {\n newArr[k++] = arr[i++];\n }\n\n while (j < o.count) {\n // Skip duplicated elements.\n if (!contains(o.arr[j])) {\n newArr[k++] = o.arr[j];\n }\n ++j;\n }\n\n return new Set(newArr, k);\n }",
"public Set union(Set join){\n Set newSet = new Set();\n for(int element = 0; element < join.size(); element++){\n if (!elementOf(join.getSet()[element]))\n newSet.add(join.getSet()[element]);\n }\n for(int element = 0; element < set.length; element++){\n newSet.add(set[element]);\n }\n return newSet;\n }",
"public static boolean UnionOperator(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"UnionOperator\")) return false;\n if (!nextTokenIs(b, \"<union operator>\", K_UNION, PIPE)) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, UNION_OPERATOR, \"<union operator>\");\n r = consumeToken(b, K_UNION);\n if (!r) r = consumeToken(b, PIPE);\n exit_section_(b, l, m, r, false, null);\n return r;\n }",
"@Override\r\n protected void reflectRelationOnUnionQuery(ConditionQuery bq, ConditionQuery uq) {\r\n String msg = \"InlineView must not need UNION method: \" + bq + \" : \" + uq;\r\n throw new IllegalConditionBeanOperationException(msg);\r\n }",
"public Filter doUnion(Filter f);",
"Entity getSuperType();",
"public Long getIsUnionRule() {\n return this.IsUnionRule;\n }",
"public String getUnionid() {\r\n\t\treturn unionid;\r\n\t}",
"protected Rectangle unionBounds(Rectangle r, Rectangle bds)\n {\n if (bds != null) {\n if (r == null) {\n r = new Rectangle(bds);\n }\n else {\n r.union(bds);\n }\n }\n\n return r;\n }",
"public Type getSuper() {\n\t\treturn superClass;\n\t}",
"public SqlFromSubSelect(WrqQueryBuilder wrqQueryBuilder, SqlFromSubSelect parent, Element selectElem)\n throws Exception\n {\n super();\n\n this.selectElem = selectElem;\n this.wrqQueryBuilder = wrqQueryBuilder;\n this.parent = parent;\n\n // Let's detect start end end, because we have some extra activity depending on it. rowEnd -1 means unlimited\n String rowStartAttrStr = selectElem.getAttribute(\"rowStart\");\n if( ! rowStartAttrStr.isEmpty() ) rowStart = Integer.parseInt(rowStartAttrStr);\n String rowEndAttrStr = selectElem.getAttribute(\"rowEnd\");\n rowEnd = wrqQueryBuilder.getMaxRows() + (rowStart > 1 ? rowStart - 1 : 0);\n if( ! rowEndAttrStr.isEmpty() ) {\n int rowEndAttr = Integer.parseInt(rowEndAttrStr) + rowStart;\n if( rowEndAttr >= 0 && rowEnd >= 0 ) rowEnd = Math.min(rowEnd, Integer.parseInt(rowEndAttrStr) );\n if( rowEndAttr >= 0 && rowEnd < 0 ) rowEnd = Integer.parseInt(rowEndAttrStr);\n }\n\n // SELECTs which go to a non-virtual BindingSet support rowStart > 1\n // Currently only for top-level selects from BindingSet\n if( rowStart > 1 && (rowEnd == -1 || rowEnd >= rowStart) ) {\n XPath xp = XPathUtils.newXPath();\n XPathExpression bindingSetXpathExpr = xp.compile(\"./wrq:From/wrq:BindingSet/text()\");\n String bindingSetName = (String)bindingSetXpathExpr.evaluate(selectElem, XPathConstants.STRING);\n if( ! bindingSetName.isEmpty() ) {\n StringBuilder bis = new StringBuilder();\n StringBuilder keyBis = new StringBuilder();\n\n StandardBindingSet resultingBindingSet = (StandardBindingSet) wrqQueryBuilder.getBindings().get(bindingSetName, Collections.emptyList());\n for( BindingItem bi: resultingBindingSet.getBindingItems() ) {\n bis.append(bi.getId()+\" \");\n if(bi.isKey()) keyBis.append(bi.getId()+\" \");\n }\n DOMSource source = new DOMSource(selectElem);\n StreamSource styleSource = new StreamSource( new StringReader(wrqTransformRowLimitXsltStatic) );\n Transformer transformer = SecureXmlFactory.newTransformerFactory().newTransformer(styleSource);\n transformer.setParameter(\"allBindingItems\", bis.toString());\n transformer.setParameter(\"allKeyBindingItems\", keyBis.toString());\n DOMResult result = new DOMResult();\n transformer.transform(source, result);\n\n selectElem = (Element)result.getNode().getFirstChild();\n }\n }\n \n wrqInfo = new WrqInfo( this, selectElem );\n\n // Complete initialization\n createSelectStatement();\n }",
"public final void mT__79() throws RecognitionException {\n try {\n int _type = T__79;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalMyDsl.g:77:7: ( 'union' )\n // InternalMyDsl.g:77:9: 'union'\n {\n match(\"union\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public ZYSet<ElementType> union(ZYSet<ElementType> otherSet){\n ZYSet<ElementType> result = new ZYArraySet<ElementType>();\n for(ElementType e :this){\n result.add(e);\n }\n for(ElementType e :otherSet){\n result.add(e);\n }\n \n return result;\n }",
"@objid (\"5d1e9f76-f0d9-4b67-a34e-4ac268bb9498\")\n Operation getOBase();",
"ArrayList<Unit> extend(){\n return list;\n }",
"private IExtendsContext createExtendsContext() throws RodinDBException {\n\t\tfinal IContextRoot ctx = createContext(\"ctx\");\n\t\treturn ctx.createChild(IExtendsContext.ELEMENT_TYPE, null, null);\n\t}",
"public ArrBag<T> union( ArrBag<T> other )\n {\n ArrBag<T> unionArray = new ArrBag<T>(other.size() + this.size()); \n\n int unionCount = 0; \n for (int i = 0; i <this.size(); i++ ){\n unionArray.add(this.get(i));\n unionCount++;\n } for (int i = 0; i<other.size(); i++){\n if (!unionArray.contains(other.get(i))){\n unionArray.add(other.get(i));\n unionCount ++;\n }\n }\n return unionArray;\n }",
"public org.apache.gora.cascading.test.storage.TestRow getUnionRecursive() {\n\t throw new java.lang.UnsupportedOperationException(\"Get is not supported on tombstones\");\n\t }",
"public T caseIncludeDirective(IncludeDirective object)\n\t{\n\t\treturn null;\n\t}",
"public final void rule__JvmUpperBound__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:16453:1: ( ( 'extends' ) )\r\n // InternalDroneScript.g:16454:1: ( 'extends' )\r\n {\r\n // InternalDroneScript.g:16454:1: ( 'extends' )\r\n // InternalDroneScript.g:16455:2: 'extends'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \r\n }\r\n match(input,45,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"@Test void testInterpretUnion() {\n rootSchema.add(\"simple\", new ScannableTableTest.SimpleTable());\n final String sql = \"select * from \\\"simple\\\"\\n\"\n + \"union\\n\"\n + \"select * from \\\"simple\\\"\";\n sql(sql).returnsRowsUnordered(\"[0]\", \"[10]\", \"[20]\", \"[30]\");\n }",
"public void setUnionForImplementsClause(NodeUnion<? extends DeclaredTypeListNode> implementsClause) throws NullPointerException;",
"public T caseIncludeDeclaration(IncludeDeclaration object)\n {\n return null;\n }",
"@Override\n public void visit(final OpUnion opUnion) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpUnion\");\n }\n final OpRewriter rewriter = new OpRewriter(securityEvaluator, graphIRI);\n addOp(OpUnion.create(rewriteOp2(opUnion, rewriter), rewriter.getResult()));\n }",
"void union(int level, Taint<E> tag) {\n if (containsKey(level)) {\n get(level).setUnion(tag);\n } else {\n set(level, new Node<>(tag, null));\n }\n }",
"public boolean isUnion() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: laload \n // 1: dastore \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- ---- -------------------------------------------\n // 0 2 0 this Lcom/sun/xml/xsom/impl/UnionSimpleTypeImpl;\n // \n // The error that occurred was:\n // \n // java.lang.ArrayIndexOutOfBoundsException\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }",
"public ITool getSuperClass();",
"UnionTypeDefinition createUnionTypeDefinition();",
"public AggregateOperator getAggregation(){\n for(Operator op:_operators){\n if (op instanceof AggregateOperator) return (AggregateOperator) op;\n }\n return null;\n }",
"public JwSqlSelect getSelect()\n {\n JwSqlSelect st = createSelect();\n populateSelectColumnsToCompose(st, ALIAS);\n st.from(TABLE, ALIAS);\n return st;\n }"
] |
[
"0.6943468",
"0.6450773",
"0.6355112",
"0.62538475",
"0.60250396",
"0.5913894",
"0.58715045",
"0.581256",
"0.5756305",
"0.5745982",
"0.5624865",
"0.55759215",
"0.5499168",
"0.5445393",
"0.5409359",
"0.54042995",
"0.5338307",
"0.52523303",
"0.5181088",
"0.5181088",
"0.5181088",
"0.5150325",
"0.5146764",
"0.5132038",
"0.51111954",
"0.5076793",
"0.5020566",
"0.5001134",
"0.49619278",
"0.4960587",
"0.49557784",
"0.49365047",
"0.49082586",
"0.49063623",
"0.48828644",
"0.48605907",
"0.4830755",
"0.48213914",
"0.4819105",
"0.47905263",
"0.47479317",
"0.47227475",
"0.4674907",
"0.46435907",
"0.46324077",
"0.4624437",
"0.46040106",
"0.45998764",
"0.45902726",
"0.45897818",
"0.4583034",
"0.4567845",
"0.45242032",
"0.45242032",
"0.45242032",
"0.45156625",
"0.44868955",
"0.4482605",
"0.4478639",
"0.44782472",
"0.44782472",
"0.44782472",
"0.44642854",
"0.44562203",
"0.44476166",
"0.44350362",
"0.44267496",
"0.44173688",
"0.44157895",
"0.44108906",
"0.43811446",
"0.43752417",
"0.4373151",
"0.43702465",
"0.43694395",
"0.43677324",
"0.43636483",
"0.43537217",
"0.43526208",
"0.43487218",
"0.43391997",
"0.43203032",
"0.42972535",
"0.42964077",
"0.42907864",
"0.42898422",
"0.42815658",
"0.42734557",
"0.42549768",
"0.4227509",
"0.42229545",
"0.42181492",
"0.420821",
"0.42071086",
"0.42063785",
"0.42037958",
"0.41932848",
"0.4186792",
"0.4182031",
"0.4181971"
] |
0.81268996
|
0
|
Changes the extends clause.
|
public void setExtendsClause(DeclaredTypeNode extendsClause);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public DeclaredTypeNode getExtendsClause()throws ClassCastException;",
"public void setUnionForExtendsClause(NodeUnion<? extends DeclaredTypeNode> extendsClause) throws NullPointerException;",
"void extend();",
"@Override\r\n\tpublic void shiftExtends() throws ParserException\r\n\t{\r\n\t\tchangeToState(new MDJ_19());\r\n\t}",
"protected abstract void _extends( ClassOutlineImpl derived, ClassOutlineImpl base );",
"String getExtends();",
"@Override\n\tpublic void extends_(JDefinedClass cls) {\n\n\t}",
"public void setExtends(final SQLEngine engine) {\r\n _extends = engine;\r\n }",
"public final void mT__67() throws RecognitionException {\r\n try {\r\n int _type = T__67;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // ../org.openmodelica.modelicaml.editor.xtext.modification.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/modification/ui/contentassist/antlr/internal/InternalModification.g:64:7: ( 'extends' )\r\n // ../org.openmodelica.modelicaml.editor.xtext.modification.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/modification/ui/contentassist/antlr/internal/InternalModification.g:64:9: 'extends'\r\n {\r\n match(\"extends\"); \r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }",
"public static void testExtends() {\n List<Integer> list2 = new ArrayList<>();\n inputExtends(list2);\n\n List<Double> list3 = new ArrayList<>();\n inputExtends(list3);\n\n }",
"public final void mT__17() throws RecognitionException {\r\n try {\r\n int _type = T__17;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // ../org.ow2.mindEd.adl.textual/src-gen/org/ow2/mindEd/adl/textual/parser/antlr/internal/InternalFractal.g:15:7: ( 'extends' )\r\n // ../org.ow2.mindEd.adl.textual/src-gen/org/ow2/mindEd/adl/textual/parser/antlr/internal/InternalFractal.g:15:9: 'extends'\r\n {\r\n match(\"extends\"); \r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }",
"public ClassDescriptor getExtends() {\n return _extends;\n }",
"public final void mT__67() throws RecognitionException {\n try {\n int _type = T__67;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalMyDsl.g:65:7: ( 'extends' )\n // InternalMyDsl.g:65:9: 'extends'\n {\n match(\"extends\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public final void rule__JvmUpperBound__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:16453:1: ( ( 'extends' ) )\r\n // InternalDroneScript.g:16454:1: ( 'extends' )\r\n {\r\n // InternalDroneScript.g:16454:1: ( 'extends' )\r\n // InternalDroneScript.g:16455:2: 'extends'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \r\n }\r\n match(input,45,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__JvmUpperBound__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:3016:1: ( ( 'extends' ) )\n // InternalCsv.g:3017:1: ( 'extends' )\n {\n // InternalCsv.g:3017:1: ( 'extends' )\n // InternalCsv.g:3018:2: 'extends'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \n }\n match(input,35,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"void setSuperEffectiveFrom(List<Type> superEffectiveFrom) {\n this.superEffectiveFrom = superEffectiveFrom;\n }",
"public final void mT__36() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = T__36;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:27:7: ( 'extends' )\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:27:9: 'extends'\n\t\t\t{\n\t\t\tmatch(\"extends\"); \n\n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public void setExtends(XMLClassDescriptor classDesc) {\n\n FieldDescriptor[] fields = null;\n //-- remove reference to previous extended descriptor\n if (_extends != null) {\n sortDescriptors();\n fields = _extends.getFields();\n for (int i = 0; i < fields.length; i++) {\n removeFieldDescriptor((XMLFieldDescriptor)fields[i]);\n }\n }\n\n this._extends = classDesc;\n\n //-- flatten out the hierarchy\n if (_extends != null) {\n fields = classDesc.getFields();\n for (int i = 0; i < fields.length; i++) {\n addFieldDescriptor((XMLFieldDescriptor)fields[i]);\n }\n }\n\n }",
"Rule Inheritance() {\n return Sequence(\"extends \", Identifier());\n }",
"public void extend(String inputFileName) \n\t{\n\t\tsuper.append(inputFileName);\t\n\t}",
"public boolean isExtending()\n {\n return this.extending;\n }",
"public org.exolab.castor.mapping.ClassDescriptor getExtends()\n {\n return null;\n }",
"public org.exolab.castor.mapping.ClassDescriptor getExtends()\n {\n return null;\n }",
"public org.exolab.castor.mapping.ClassDescriptor getExtends()\n {\n return null;\n }",
"public interface Extendable {\n void extend();\n}",
"@Override\n public void visit(final OpExtend opExtend) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpExtend\");\n }\n addOp(OpExtend.extend(rewriteOp1(opExtend), opExtend.getVarExprList()));\n }",
"void setSuperEffectiveTo(List<Type> superEffectiveTo) {\n this.superEffectiveTo = superEffectiveTo;\n }",
"public void extend() {\n if (ON < OLast / 2) {\n compress();\n return;\n }\n klasse o[] = (klasse[]) (new Object[2 * OSize]);\n System.arraycopy(O, 0, o, 0, OLast);\n OSize *= 2;\n O = o;\n }",
"AlgOptTable extend( List<AlgDataTypeField> extendedFields );",
"private IExtendsContext createExtendsContext() throws RodinDBException {\n\t\tfinal IContextRoot ctx = createContext(\"ctx\");\n\t\treturn ctx.createChild(IExtendsContext.ELEMENT_TYPE, null, null);\n\t}",
"public final void mT__45() throws RecognitionException {\n try {\n int _type = T__45;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalSpeADL.g:43:7: ( 'extends' )\n // InternalSpeADL.g:43:9: 'extends'\n {\n match(\"extends\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public boolean setToExtend(AccessGroup group)\n {\n if (!isParent(group))\n {\n this.extendGroup = group;\n if (this.extendGroup != null)\n {\n this.extendGroup_name = this.extendGroup.getName();\n }\n return true;\n }\n return false;\n }",
"public NodeUnion<? extends DeclaredTypeNode> getUnionForExtendsClause();",
"protected void addExtendsPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_Bean_extends_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_Bean_extends_feature\", \"_UI_Bean_type\"),\n\t\t\t\t BeansPackage.Literals.BEAN__EXTENDS,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}",
"public void extend(){\n\t\tsolenoid1.set(true);\n\t\tsolenoid2.set(true);\n\t}",
"public Environment extend(Environment ext) throws AstCreatorException\n \t{\n \t\tEnvironment result = Environment.getFromBase(base, ext.getAnalysisPackage(), ext.getDefaultPackage());\n \n \t\tresult.setTemplateAnalysisPackage(base.getAnalysisPackage());\n \t\tresult.setTemplateDefaultPackage(base.getDefaultPackage());\n \n \t\t// 1 every class and interface from the base environment is added to result\n \t\taddBaseAstClassesAndInterfaces(result, base);\n \n \t\t// 2 include classes from the extension that we will need\n \t\tincludeClassesFromExtension(result, ext, base);\n \n \t\t// 3 include interfaces from the extension that we will need\n \t\tincludeInterfacesFromExtension(result, ext, base);\n \n \t\t// 4a generate new extension productions that is P and S interface\n \t\tMap<String, IInterfaceDefinition> iReplacementMap = generateExtensionInterfaces(result, ext, base);\n \n \t\t// 4b generate new base classes for the P and S interface generated in 4a\n \t\tMap<String, IClassDefinition> cReplacementMap = generateExtensionClasses(result, ext, base, iReplacementMap);\n \n \t\t// 5 Update classToType\n \t\tupdateClassToType(result,ext,base);\n \n \t\t// 6 Update super definitions\n \t\tupdateSuperDefinitions(result,ext,cReplacementMap);\n \n \t\t// 7 Update treeNode to interface mapping (that is the common implements relationship)\n \t\tupdateTreeNodeToInterface(result, ext,base, iReplacementMap);\n \n \t\t// 8 Fields on nodes from the ext environment may have unresolved types\n \t\tupdateFieldsWithUnresolvedTypes(result,ext,base);\n \n \t\treturn result;\n \t}",
"public boolean try_extend() {\n if (Pneumatics.get_instance().get_solenoids() || base_conflicting_extend() || in_inner_thresh()) {\n return false;\n }\n Pneumatics.get_instance().set_solenoids(true);\n return true;\n }",
"private void extend() {\n for (Object o : table) {\n if (o == null)\n return;\n }\n\n TABLE_SIZE *= 2;\n Object[] entries = entrySet();\n this.table = new Object[TABLE_SIZE];\n\n rebuild(entries);\n }",
"public final void rule__JvmUpperBound__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16609:1: ( ( 'extends' ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16610:1: ( 'extends' )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16610:1: ( 'extends' )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16611:1: 'extends'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \r\n }\r\n match(input,126,FOLLOW_126_in_rule__JvmUpperBound__Group__0__Impl33523); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public void override() {\n isOverridden = true;\n }",
"private void updateSuperDefinitions(Environment result, Environment ext,\n \t\t\tMap<String, IClassDefinition> cReplacementMap) {\n \t\tfor(IClassDefinition cdef : ext.getClasses())\n \t\t{\n \t\t\tIClassDefinition superDef = cdef.getSuperDef();\n \t\t\tif (superDef != null){\n \n \t\t\t\t// Update super to be newly generated production if necessary\n \t\t\t\tIClassDefinition replacementSuperDef = cReplacementMap.get(superDef.getName().getName());\n \t\t\t\tif (replacementSuperDef != null)\n \t\t\t\t\tcdef.setSuper(replacementSuperDef);\n \n \t\t\t\t// Update super to the result-ast if necessary\n \t\t\t\tif (superDef == ext.node)\n \t\t\t\t\tcdef.setSuper(result.node);\n \n \t\t\t\t// RWL: Hmm, node is not an interface and should not be present in supers, right?\n \t\t\t\tif (cdef.getSuperDefs().contains(base.node) || cdef.getSuperDefs().contains(ext.node))\n \t\t\t\t{\n \t\t\t\t\tcdef.getSuperDefs().remove(base.node);\n \t\t\t\t\tcdef.getSuperDefs().remove(ext.node);\n \t\t\t\t\tcdef.getSuperDefs().add(result.node);\n \t\t\t\t}\n\t\t\t\t\n \t\t\t\tif (cdef.getSuperDefs().contains(base.iNode) || cdef.getSuperDefs().contains(ext.iNode))\n \t\t\t\t{\n \t\t\t\t\tcdef.getSuperDefs().remove(base.iNode);\n \t\t\t\t\tcdef.getSuperDefs().remove(ext.iNode);\n \t\t\t\t\tcdef.getSuperDefs().add(result.iNode);\n \t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n \n\t\tfor (IInterfaceDefinition idef : ext.getInterfaces())\n\t\t{\n\t\t\tif (idef.getSuperDefs().contains(base.iNode) || idef.getSuperDefs().contains(ext.iNode))\n\t\t\t{\n\t\t\t\tidef.getSuperDefs().remove(base.iNode);\n\t\t\t\tidef.getSuperDefs().remove(ext.iNode);\n\t\t\t\tidef.getSuperDefs().add(result.iNode);\n \t\t\t}\n\t\t\t\n \t\t}\n \n \t}",
"public String getSkinExtends()\n {\n return _skinExtends;\n }",
"public void setInheritAll(boolean value) {\n inheritAll = value;\n }",
"public final void rule__JvmUpperBound__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11760:1: ( ( 'extends' ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11761:1: ( 'extends' )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11761:1: ( 'extends' )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11762:1: 'extends'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \n }\n match(input,65,FOLLOW_65_in_rule__JvmUpperBound__Group__0__Impl23587); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public Environment extend(Environment ext) throws AstCreatorException\n\t{\n\t\tEnvironment result = Environment.getFromBase(base, ext.getAnalysisPackage(), ext.getDefaultPackage(), ext.getName());\n\n\t\tresult.setTemplateAnalysisPackage(base.getAnalysisPackage());\n\t\tresult.setTemplateDefaultPackage(base.getDefaultPackage());\n\n\t\tSystem.out.println(\"***********************************************\");\n\t\tSystem.out.println(\"AST Creator Extensions\");\n\t\tSystem.out.println(\"***********************************************\");\n\n\t\t// 1 every class and interface from the base environment is added to\n\t\t// result\n\t\taddBaseAstClassesAndInterfaces(result, base);\n\n\t\t// 2 include classes from the extension that we will need\n\t\tincludeClassesFromExtension(result, ext, base);\n\n\t\t// 3 include interfaces from the extension that we will need\n\t\tincludeInterfacesFromExtension(result, ext, base);\n\n\t\t// 4a generate new extension productions that is P and S interface\n\t\tMap<String, IInterfaceDefinition> iReplacementMap = generateExtensionInterfaces(result, ext, base);\n\n\t\t// 4b generate new base classes for the P and S interface generated in\n\t\t// 4a\n\t\tMap<String, IClassDefinition> cReplacementMap = generateExtensionClasses(result, ext, base, iReplacementMap);\n\n\t\t// 5 Update classToType\n\t\tupdateClassToType(result, ext, base);\n\n\t\t// 6 Update super definitions\n\t\tupdateSuperDefinitions(result, ext, cReplacementMap, iReplacementMap);\n\n\t\t// 7 Update treeNode to interface mapping (that is the common implements\n\t\t// relationship)\n\t\tupdateTreeNodeToInterface(result, ext, base, iReplacementMap);\n\n\t\t// 8 Fields on nodes from the ext environment may have unresolved types\n\t\tupdateFieldsWithUnresolvedTypes(result, ext, base);\n\n\t\treturn result;\n\t}",
"private void doIncludeModule(RubyModule baseModule) {\n List<RubyModule> modulesToInclude = gatherModules(baseModule);\n \n RubyModule currentInclusionPoint = this;\n ModuleLoop: for (RubyModule nextModule : modulesToInclude) {\n checkForCyclicInclude(nextModule);\n \n boolean superclassSeen = false;\n \n // scan class hierarchy for module\n for (RubyClass nextClass = this.getSuperClass(); nextClass != null; nextClass = nextClass.getSuperClass()) {\n if (doesTheClassWrapTheModule(nextClass, nextModule)) {\n // next in hierarchy is an included version of the module we're attempting,\n // so we skip including it\n \n // if we haven't encountered a real superclass, use the found module as the new inclusion point\n if (!superclassSeen) currentInclusionPoint = nextClass;\n \n continue ModuleLoop;\n } else {\n superclassSeen = true;\n }\n }\n \n currentInclusionPoint = proceedWithInclude(currentInclusionPoint, nextModule);\n }\n }",
"public void addInheritanceRelation(InheritanceRelation relation);",
"public void setSuperClass(TypeData sclas) {\n m_superClass = sclas;\n if (sclas != null) {\n boolean imported = m_importsTracker.addImport(sclas.getFullName(), false);\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"Set superclass of \" + getFullName() + \" to \" + sclas.getFullName() +\n (imported ? \" (imported)\" : \"\"));\n }\n }\n }",
"public AccessGroup getExtendGroup()\n {\n return this.extendGroup;\n }",
"public void setInheritall(boolean b) {\r\n this.inheritAll = b;\r\n }",
"@Override\n protected void extend(ServerConnector target) {\n\n }",
"void extend(Dimension dimension)\n\t\t{\n\t\t\tsides = sides+1;\n\t\t\t\n\t Dimension[] dime1 = new Dimension[d.length+1];\n\t \n\t\t\tfor (int i =0; i< d.length; i++)\n\t\t\t{\n\t\t\t\tdime1[i] = d[i];\n\t\t\t}\n\t\t\t\n\t\t\tdime1[d.length]=dimension;\n\t\t\t\n\t\t\td = new Dimension[d.length + 1];\n\t\t\tfor(int i = 0; i< dime1.length; i++)\n\t\t\t{\n\t\t\t\td[i] = dime1[i];\n\t\t\t}\t\t\n\t\t}",
"protected void applyNewStatements() {\r\n\t\tbldInfView.updateCurrentDirectory(bldInfView.getModel().getPath());\r\n\r\n\t\tapplyNewListArgumentStatements();\r\n\t\tapplyNewBlockStatements();\r\n\t}",
"public interface ExtendsFrom extends ViewDefinition\n{\n /**\n * Gets all the placeholder definitions for this view.\n *\n * @return A map with the name of the placeholder an the corresponding\n * Defines object.\n */\n Map<String, Defines> getDefinesMap();\n\n /**\n * Gets the list of defines for this view.\n *\n * @return A list of Defines objects.\n */\n List<Defines> getDefines();\n\n /**\n * The name of the parent layout.\n * \n * @return An string with the name of the parent layout.\n */\n String getLayout();\n}",
"private void updateSuperDefinitions(Environment result, Environment ext,\n\t\t\tMap<String, IClassDefinition> cReplacementMap,\n\t\t\tMap<String, IInterfaceDefinition> iReplacementMap)\n\t{\n\t\tfor (IClassDefinition cdef : ext.getClasses())\n\t\t{\n\t\t\tIClassDefinition superDef = cdef.getSuperDef();\n\t\t\tif (superDef != null)\n\t\t\t{\n\n\t\t\t\t// Update super to be newly generated production if necessary\n\t\t\t\tIClassDefinition replacementSuperDef = cReplacementMap.get(superDef.getName().getName());\n\t\t\t\tif (replacementSuperDef != null)\n\t\t\t\t\tcdef.setSuper(replacementSuperDef);\n\n\t\t\t\t// Update super to the result-ast if necessary\n\t\t\t\tif (superDef == ext.node)\n\t\t\t\t\tcdef.setSuper(result.node);\n\n\t\t\t\t// RWL: Hmm, node is not an interface and should not be present\n\t\t\t\t// in supers, right?\n\t\t\t\tif (cdef.getSuperDefs().contains(base.node)\n\t\t\t\t\t\t|| cdef.getSuperDefs().contains(ext.node))\n\t\t\t\t{\n\t\t\t\t\tcdef.getSuperDefs().remove(base.node);\n\t\t\t\t\tcdef.getSuperDefs().remove(ext.node);\n\t\t\t\t\tcdef.getSuperDefs().add(result.node);\n\t\t\t\t}\n\n\t\t\t\tif (cdef.getSuperDefs().contains(base.iNode)\n\t\t\t\t\t\t|| cdef.getSuperDefs().contains(ext.iNode))\n\t\t\t\t{\n\t\t\t\t\tcdef.getSuperDefs().remove(base.iNode);\n\t\t\t\t\tcdef.getSuperDefs().remove(ext.iNode);\n\t\t\t\t\tcdef.getSuperDefs().add(result.iNode);\n\t\t\t\t}\n\n\t\t\t\t// Replace supers\n\t\t\t\tList<IInterfaceDefinition> tbr = new LinkedList<IInterfaceDefinition>();\n\t\t\t\tList<IInterfaceDefinition> tba = new LinkedList<IInterfaceDefinition>();\n\t\t\t\tfor (IInterfaceDefinition idef : cdef.getSuperDefs())\n\t\t\t\t\tif (cReplacementMap.containsKey(idef.getName().getName()))\n\t\t\t\t\t{\n\t\t\t\t\t\tIClassDefinition newDef = cReplacementMap.get(idef.getName().getName());\n\t\t\t\t\t\ttbr.add(idef);\n\t\t\t\t\t\ttba.add(newDef);\n\t\t\t\t\t}\n\t\t\t\tcdef.getSuperDefs().removeAll(tbr);\n\t\t\t\tcdef.getSuperDefs().addAll(tba);\n\n\t\t\t}\n\n\t\t}\n\n\t\tfor (IInterfaceDefinition idef : ext.getInterfaces())\n\t\t{\n\t\t\tif (idef.getSuperDefs().contains(base.iNode)\n\t\t\t\t\t|| idef.getSuperDefs().contains(ext.iNode))\n\t\t\t{\n\t\t\t\tidef.getSuperDefs().remove(base.iNode);\n\t\t\t\tidef.getSuperDefs().remove(ext.iNode);\n\t\t\t\tidef.getSuperDefs().add(result.iNode);\n\t\t\t}\n\n\t\t\tList<IInterfaceDefinition> tbr = new LinkedList<IInterfaceDefinition>();\n\t\t\tList<IInterfaceDefinition> tba = new LinkedList<IInterfaceDefinition>();\n\t\t\tfor (IInterfaceDefinition sidef : idef.getSuperDefs())\n\t\t\t{\n\t\t\t\tif (iReplacementMap.containsKey(sidef.getName().getName()))\n\t\t\t\t{\n\t\t\t\t\tIInterfaceDefinition replacement = iReplacementMap.get(sidef.getName().getName());\n\t\t\t\t\ttbr.add(sidef);\n\t\t\t\t\ttba.add(replacement);\n\t\t\t\t}\n\t\t\t}\n\t\t\tidef.getSuperDefs().removeAll(tbr);\n\t\t\tidef.getSuperDefs().addAll(tba);\n\t\t}\n\n\t}",
"private Vector getExtendImplement(ClassType c)\r\n {\r\n String st;\r\n Vector v = new Vector();\r\n\r\n if (c.extend.name != null && c.extend.scope == null)\r\n {\r\n st = c.extend.name.string;\r\n if (!c.unresolved.contains(st))\r\n for(Iterator iter = c.unresolved.iterator(); iter.hasNext();)\r\n {\r\n String s = (String)iter.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n v.add(st);\r\n }\r\n\r\n for(int j = 0; j < c.implement.length; j++)\r\n if (c.implement[j].scope == null)\r\n {\r\n st = c.implement[j].name.string;\r\n\r\n if (!c.unresolved.contains(st))\r\n for(Iterator iter = c.unresolved.iterator(); iter.hasNext();)\r\n {\r\n String s = (String)iter.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n if (!v.contains(st))\r\n v.add(st);\r\n }\r\n\r\n return v;\r\n }",
"private void conditionalExtendFile() {\n\n // maximum allowed size of an Azure page blob (1 terabyte)\n final long MAX_PAGE_BLOB_SIZE = 1024L * 1024L * 1024L * 1024L;\n\n // If blob is already at the maximum size, then don't try to extend it.\n if (currentBlobSize == MAX_PAGE_BLOB_SIZE) {\n return;\n }\n\n // If we are within the maximum write size of the end of the file,\n if (currentBlobSize - currentBlobOffset <= MAX_RAW_BYTES_PER_REQUEST) {\n\n // Extend the file. Retry up to 3 times with back-off.\n CloudPageBlob cloudPageBlob = (CloudPageBlob) blob.getBlob();\n long newSize = currentBlobSize + configuredPageBlobExtensionSize;\n\n // Make sure we don't exceed maximum blob size.\n if (newSize > MAX_PAGE_BLOB_SIZE) {\n newSize = MAX_PAGE_BLOB_SIZE;\n }\n final int MAX_RETRIES = 3;\n int retries = 1;\n boolean resizeDone = false;\n while(!resizeDone && retries <= MAX_RETRIES) {\n try {\n cloudPageBlob.resize(newSize);\n resizeDone = true;\n currentBlobSize = newSize;\n } catch (StorageException e) {\n LOG.warn(\"Failed to extend size of \" + cloudPageBlob.getUri());\n try {\n\n // sleep 2, 8, 18 seconds for up to 3 retries\n Thread.sleep(2000 * retries * retries);\n } catch (InterruptedException e1) {\n\n // Restore the interrupted status\n Thread.currentThread().interrupt();\n }\n } finally {\n retries++;\n }\n }\n }\n }",
"public interface TestExtend {\n}",
"public void addOverrides(List<JMethod> toAdd) {\n assert canBePolymorphic();\n overrides = Lists.addAll(overrides, toAdd);\n }",
"public void visit(ClassDeclExtends node) {\n Symbol key = Symbol.symbol(node.name.s);\n ClassInfo data = new ClassInfo(key);\n\n // Chama o firstPass() para as variaveis\n VarDeclListHandler.firstPass(env, data, node.varList);\n\n // Chama o firstPass() para os metodos\n MethodDeclListHandler.firstPass(env, data, node.methodList);\n\n // Insere a classe na tabela\n if (!env.classes.put(key, data)) {\n env.err.Error(node, new Object[] {\"Nome de classe redefinido: \" + key});\n }\n }",
"public void EXTENDED() {\n ea = IMMWORD();\n }",
"public void setAllowOverridingParameter(final boolean newAllowOverridingParameter) {\n allowOverridingParameter = newAllowOverridingParameter;\n }",
"SolutionChange getSuperChange();",
"protected final void setSuperscript() {\n setFontSize((int) (getFontSize() * 0.5d));\n yOffset -= getFontSize();\n }",
"public void testExtendsRebuild() {\n testExtendsRebuild(new LinkerDef());\n }",
"boolean overrides(MethodDeclaration sub, MethodDeclaration sup);",
"public boolean isSuperResolutionEnabled() {\n return false;\n }",
"@Override\n protected void readAttributes(XMLStreamReader in)\n throws XMLStreamException {\n super.readAttributes(in);\n\n String extendString = in.getAttributeValue(null, \"extends\");\n BuildingType parent = (extendString == null) ? this :\n getSpecification().getBuildingType(extendString);\n String upgradeString = in.getAttributeValue(null, \"upgradesFrom\");\n if (upgradeString == null) {\n level = 1;\n } else {\n upgradesFrom = getSpecification().getBuildingType(upgradeString);\n upgradesFrom.upgradesTo = this;\n level = upgradesFrom.level + 1;\n }\n setPopulationRequired(getAttribute(in, \"required-population\", parent.getPopulationRequired()));\n\n workPlaces = getAttribute(in, \"workplaces\", parent.workPlaces);\n basicProduction = getAttribute(in, \"basicProduction\", parent.basicProduction);\n\n consumes = getSpecification().getType(in, \"consumes\", GoodsType.class, parent.consumes);\n produces = getSpecification().getType(in, \"produces\", GoodsType.class, parent.produces);\n\n if (produces != null && basicProduction > 0) {\n productionModifier = new Modifier(produces.getId(), this, basicProduction,\n Modifier.Type.ADDITIVE);\n }\n\n minSkill = getAttribute(in, \"minSkill\", parent.minSkill);\n maxSkill = getAttribute(in, \"maxSkill\", parent.maxSkill);\n\n priority = getAttribute(in, \"priority\", parent.priority);\n upkeep = getAttribute(in, \"upkeep\", parent.upkeep);\n\n if (parent != this) {\n getFeatureContainer().add(parent.getFeatureContainer());\n if (parent.isAbstractType()) {\n getFeatureContainer().replaceSource(parent, this);\n }\n }\n }",
"public interface ExtenderInterface {\r\n\r\n\t/**\r\n\t * Extends the diagram for new generated elements.\r\n\t */\r\n\tvoid extend();\r\n\t\r\n}",
"public void addOverride(JMethod toAdd) {\n assert canBePolymorphic();\n overrides = Lists.add(overrides, toAdd);\n }",
"public void setExtendable(boolean extendable)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EXTENDABLE$22);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(EXTENDABLE$22);\r\n }\r\n target.setBooleanValue(extendable);\r\n }\r\n }",
"@Override\n\tprotected void extend(AbstractClientConnector target) {\n\t\tsuper.extend(target);\n\t}",
"public static void addOverride(BaseModOverride override) {\n\t\toverrides.add(override);\n\t}",
"@Override\n\tpublic void enlarge() {\n\t\t\n\t}",
"public Node extend() {\n return node;\n }",
"public final EObject ruleJvmUpperBound() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n EObject lv_typeReference_1_0 = null;\n\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2824:28: ( (otherlv_0= 'extends' ( (lv_typeReference_1_0= ruleJvmTypeReference ) ) ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2825:1: (otherlv_0= 'extends' ( (lv_typeReference_1_0= ruleJvmTypeReference ) ) )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2825:1: (otherlv_0= 'extends' ( (lv_typeReference_1_0= ruleJvmTypeReference ) ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2825:3: otherlv_0= 'extends' ( (lv_typeReference_1_0= ruleJvmTypeReference ) )\n {\n otherlv_0=(Token)match(input,58,FOLLOW_58_in_ruleJvmUpperBound6651); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_0, grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0());\n \n }\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2829:1: ( (lv_typeReference_1_0= ruleJvmTypeReference ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2830:1: (lv_typeReference_1_0= ruleJvmTypeReference )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2830:1: (lv_typeReference_1_0= ruleJvmTypeReference )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2831:3: lv_typeReference_1_0= ruleJvmTypeReference\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getJvmUpperBoundAccess().getTypeReferenceJvmTypeReferenceParserRuleCall_1_0()); \n \t \n }\n pushFollow(FOLLOW_ruleJvmTypeReference_in_ruleJvmUpperBound6672);\n lv_typeReference_1_0=ruleJvmTypeReference();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getJvmUpperBoundRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"typeReference\",\n \t\tlv_typeReference_1_0, \n \t\t\"JvmTypeReference\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"private static void includeInterfacesFromExtension(Environment result, Environment extEnv, Environment base)\n \t{\n \t\tfor(IInterfaceDefinition iDef : extEnv.getInterfaces())\n \t\t\tif (!willGenerateExtentionFor(iDef, base))\n \t\t\t\tresult.getInterfaces().add(iDef);\n \n \t}",
"private void superTypes(TypeSpec.Builder classBuilder, TypeElement originClassType, String packageName, Set<ColumnDefinition> columnDefinitions) {\n if( originClassType == null )\n return;\n\n final TypeMirror objectClassType = elements.getTypeElement( Object.class.getName() ).asType();\n final TypeMirror originSuperClassType = originClassType.getSuperclass();\n if( !types.isSameType( originSuperClassType, objectClassType ) && types.asElement( originSuperClassType ).getAnnotation( Contract.class ) == null ) {\n final TypeElement originSuperClass = elements.getTypeElement( originSuperClassType.toString() );\n generateInterface( originSuperClass, packageName, columnDefinitions );\n classBuilder.addSuperinterface( ClassName.bestGuess( originSuperClass.getQualifiedName().toString() + \"Model\" ) );\n }\n }",
"public void setVoucherExtend(VoucherExtendBriefEntity voucherExtend) {\n\t\tthis.voucherExtend = voucherExtend;\n\t}",
"protected void grow() {\n }",
"_ExtendsNotAbstract() {\n super(\"s\"); // needs this if not default ctor;\n }",
"public void setExtendCatId(Integer extendCatId) {\n this.extendCatId = extendCatId;\n }",
"private void setBlocksInheritance(boolean blocksInheritance) {\n\t\tthis.blocksInheritance = blocksInheritance;\n\t}",
"public void toggleSuperAS() {\n this.isSuperAS = true;\n }",
"public void setExtended(boolean value) {\n this.extended = value;\n }",
"private static void includeInterfacesFromExtension(Environment result,\n\t\t\tEnvironment extEnv, Environment base)\n\t{\n\t\tfor (IInterfaceDefinition iDef : extEnv.getInterfaces())\n\t\t{\n\t\t\tif (!willGenerateExtensionFor(iDef, base))\n\t\t\t{\n\t\t\t\tiDef.setIsExtTree(true);\n\t\t\t\tresult.getInterfaces().add(iDef);\n\t\t\t}\n\t\t}\n\t}",
"public void extendDuration(int r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.widget.OppoScroller.extendDuration(int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.widget.OppoScroller.extendDuration(int):void\");\n }",
"public void myMethod(){\n\t\t\tsuper.myMethod();\n\t\t\tSystem.out.println(\"Overriding method\");\n\t\t }",
"public void base() {\n APIlib.getInstance().addJSLine(jsBase + \".base();\");\n }",
"private void fireSubsetDefinitionListChanged() {\n fireSubsetDefinitionListChanged(this, null);\n }",
"public Type visit(ClassDeclExtends n) {\n\t\tthis.currClass = this.symbolTable.getClass(n.i.toString());\n\n\t\tif (this.currClass.parent() != n.j.s) {\n\t\t\tSystem.out.println(\"Extensão de classe errada\");\n\t\t}\n\n\t\tn.i.accept(this);\n\t\tn.j.accept(this);\n\t\tfor (int i = 0; i < n.vl.size(); i++) {\n\t\t\tn.vl.elementAt(i).accept(this);\n\t\t}\n\t\tfor (int i = 0; i < n.ml.size(); i++) {\n\t\t\tn.ml.elementAt(i).accept(this);\n\t\t}\n\t\treturn null;\n\t}",
"public AbstractClassExtend() {\n\t\tsuper(\"hello\");\n\t}",
"public void swim() {\n\tfloatInWater(); // package access to superclass\n\tSystem.out.println(text); // package access to superclass\n }",
"private void superAttachBaseContext(Context context) {\n super.attachBaseContext(context);\n }",
"public void xsetExtendable(org.apache.xmlbeans.XmlBoolean extendable)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlBoolean target = null;\r\n target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(EXTENDABLE$22);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlBoolean)get_store().add_attribute_user(EXTENDABLE$22);\r\n }\r\n target.set(extendable);\r\n }\r\n }",
"@Override\n\tpublic void beginSubInterval(GraphChiContext ctx, VertexInterval interval) {\n\t\t\n\t}",
"public void expand(boolean inclChildren) {\n isExtended = true;\n if (inclChildren)\n for (BudgetAccountTableRow child : children)\n child.reduce(true);\n updateUItoExtState();\n }",
"public JavaType refine(Class<?> contentClass, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces)\n/* */ {\n/* 124 */ return null;\n/* */ }",
"@Override\n protected void attachBaseContext(Context newBase) {\n super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));\n }",
"@Override\n protected void attachBaseContext(Context newBase) {\n super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));\n }"
] |
[
"0.6621436",
"0.62962013",
"0.6232582",
"0.61661804",
"0.6043416",
"0.5933054",
"0.5821906",
"0.579257",
"0.5718948",
"0.5702107",
"0.55411154",
"0.5430927",
"0.5426688",
"0.53554183",
"0.53540546",
"0.53005254",
"0.5296033",
"0.52916294",
"0.52765733",
"0.52657515",
"0.5263946",
"0.5255432",
"0.5255432",
"0.5255432",
"0.5241948",
"0.52239937",
"0.51609015",
"0.5152642",
"0.5114567",
"0.5109125",
"0.5104901",
"0.509396",
"0.50699073",
"0.5068955",
"0.49689358",
"0.4941135",
"0.49185714",
"0.4882642",
"0.4882587",
"0.48482996",
"0.4813695",
"0.4809068",
"0.48080125",
"0.48058322",
"0.47877058",
"0.47864076",
"0.47639704",
"0.46796498",
"0.46716118",
"0.46501765",
"0.46443668",
"0.45841178",
"0.45761395",
"0.45694792",
"0.4563707",
"0.4551951",
"0.45412743",
"0.4536358",
"0.45096695",
"0.45015505",
"0.44838485",
"0.44811505",
"0.44803742",
"0.44657132",
"0.44632196",
"0.44570935",
"0.4443361",
"0.4438284",
"0.44291618",
"0.4423954",
"0.4418925",
"0.441235",
"0.44055977",
"0.44037902",
"0.44012138",
"0.43942",
"0.43911946",
"0.43882266",
"0.43864492",
"0.438426",
"0.43788856",
"0.43758085",
"0.43662205",
"0.4333114",
"0.43282786",
"0.43208",
"0.4311947",
"0.43083176",
"0.4307614",
"0.43052292",
"0.42952943",
"0.4288254",
"0.4272094",
"0.42673612",
"0.42650267",
"0.42545688",
"0.4249782",
"0.4248239",
"0.42474166",
"0.42474166"
] |
0.7538853
|
0
|
Changes the extends clause.
|
public void setUnionForExtendsClause(NodeUnion<? extends DeclaredTypeNode> extendsClause) throws NullPointerException;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setExtendsClause(DeclaredTypeNode extendsClause);",
"public DeclaredTypeNode getExtendsClause()throws ClassCastException;",
"void extend();",
"@Override\r\n\tpublic void shiftExtends() throws ParserException\r\n\t{\r\n\t\tchangeToState(new MDJ_19());\r\n\t}",
"protected abstract void _extends( ClassOutlineImpl derived, ClassOutlineImpl base );",
"String getExtends();",
"@Override\n\tpublic void extends_(JDefinedClass cls) {\n\n\t}",
"public void setExtends(final SQLEngine engine) {\r\n _extends = engine;\r\n }",
"public final void mT__67() throws RecognitionException {\r\n try {\r\n int _type = T__67;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // ../org.openmodelica.modelicaml.editor.xtext.modification.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/modification/ui/contentassist/antlr/internal/InternalModification.g:64:7: ( 'extends' )\r\n // ../org.openmodelica.modelicaml.editor.xtext.modification.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/modification/ui/contentassist/antlr/internal/InternalModification.g:64:9: 'extends'\r\n {\r\n match(\"extends\"); \r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }",
"public static void testExtends() {\n List<Integer> list2 = new ArrayList<>();\n inputExtends(list2);\n\n List<Double> list3 = new ArrayList<>();\n inputExtends(list3);\n\n }",
"public final void mT__17() throws RecognitionException {\r\n try {\r\n int _type = T__17;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // ../org.ow2.mindEd.adl.textual/src-gen/org/ow2/mindEd/adl/textual/parser/antlr/internal/InternalFractal.g:15:7: ( 'extends' )\r\n // ../org.ow2.mindEd.adl.textual/src-gen/org/ow2/mindEd/adl/textual/parser/antlr/internal/InternalFractal.g:15:9: 'extends'\r\n {\r\n match(\"extends\"); \r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }",
"public ClassDescriptor getExtends() {\n return _extends;\n }",
"public final void mT__67() throws RecognitionException {\n try {\n int _type = T__67;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalMyDsl.g:65:7: ( 'extends' )\n // InternalMyDsl.g:65:9: 'extends'\n {\n match(\"extends\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public final void rule__JvmUpperBound__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:16453:1: ( ( 'extends' ) )\r\n // InternalDroneScript.g:16454:1: ( 'extends' )\r\n {\r\n // InternalDroneScript.g:16454:1: ( 'extends' )\r\n // InternalDroneScript.g:16455:2: 'extends'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \r\n }\r\n match(input,45,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void rule__JvmUpperBound__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:3016:1: ( ( 'extends' ) )\n // InternalCsv.g:3017:1: ( 'extends' )\n {\n // InternalCsv.g:3017:1: ( 'extends' )\n // InternalCsv.g:3018:2: 'extends'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \n }\n match(input,35,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"void setSuperEffectiveFrom(List<Type> superEffectiveFrom) {\n this.superEffectiveFrom = superEffectiveFrom;\n }",
"public final void mT__36() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = T__36;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:27:7: ( 'extends' )\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:27:9: 'extends'\n\t\t\t{\n\t\t\tmatch(\"extends\"); \n\n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public void setExtends(XMLClassDescriptor classDesc) {\n\n FieldDescriptor[] fields = null;\n //-- remove reference to previous extended descriptor\n if (_extends != null) {\n sortDescriptors();\n fields = _extends.getFields();\n for (int i = 0; i < fields.length; i++) {\n removeFieldDescriptor((XMLFieldDescriptor)fields[i]);\n }\n }\n\n this._extends = classDesc;\n\n //-- flatten out the hierarchy\n if (_extends != null) {\n fields = classDesc.getFields();\n for (int i = 0; i < fields.length; i++) {\n addFieldDescriptor((XMLFieldDescriptor)fields[i]);\n }\n }\n\n }",
"Rule Inheritance() {\n return Sequence(\"extends \", Identifier());\n }",
"public void extend(String inputFileName) \n\t{\n\t\tsuper.append(inputFileName);\t\n\t}",
"public boolean isExtending()\n {\n return this.extending;\n }",
"public org.exolab.castor.mapping.ClassDescriptor getExtends()\n {\n return null;\n }",
"public org.exolab.castor.mapping.ClassDescriptor getExtends()\n {\n return null;\n }",
"public org.exolab.castor.mapping.ClassDescriptor getExtends()\n {\n return null;\n }",
"public interface Extendable {\n void extend();\n}",
"@Override\n public void visit(final OpExtend opExtend) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpExtend\");\n }\n addOp(OpExtend.extend(rewriteOp1(opExtend), opExtend.getVarExprList()));\n }",
"void setSuperEffectiveTo(List<Type> superEffectiveTo) {\n this.superEffectiveTo = superEffectiveTo;\n }",
"public void extend() {\n if (ON < OLast / 2) {\n compress();\n return;\n }\n klasse o[] = (klasse[]) (new Object[2 * OSize]);\n System.arraycopy(O, 0, o, 0, OLast);\n OSize *= 2;\n O = o;\n }",
"AlgOptTable extend( List<AlgDataTypeField> extendedFields );",
"private IExtendsContext createExtendsContext() throws RodinDBException {\n\t\tfinal IContextRoot ctx = createContext(\"ctx\");\n\t\treturn ctx.createChild(IExtendsContext.ELEMENT_TYPE, null, null);\n\t}",
"public final void mT__45() throws RecognitionException {\n try {\n int _type = T__45;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalSpeADL.g:43:7: ( 'extends' )\n // InternalSpeADL.g:43:9: 'extends'\n {\n match(\"extends\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public boolean setToExtend(AccessGroup group)\n {\n if (!isParent(group))\n {\n this.extendGroup = group;\n if (this.extendGroup != null)\n {\n this.extendGroup_name = this.extendGroup.getName();\n }\n return true;\n }\n return false;\n }",
"public NodeUnion<? extends DeclaredTypeNode> getUnionForExtendsClause();",
"protected void addExtendsPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_Bean_extends_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_Bean_extends_feature\", \"_UI_Bean_type\"),\n\t\t\t\t BeansPackage.Literals.BEAN__EXTENDS,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}",
"public void extend(){\n\t\tsolenoid1.set(true);\n\t\tsolenoid2.set(true);\n\t}",
"public Environment extend(Environment ext) throws AstCreatorException\n \t{\n \t\tEnvironment result = Environment.getFromBase(base, ext.getAnalysisPackage(), ext.getDefaultPackage());\n \n \t\tresult.setTemplateAnalysisPackage(base.getAnalysisPackage());\n \t\tresult.setTemplateDefaultPackage(base.getDefaultPackage());\n \n \t\t// 1 every class and interface from the base environment is added to result\n \t\taddBaseAstClassesAndInterfaces(result, base);\n \n \t\t// 2 include classes from the extension that we will need\n \t\tincludeClassesFromExtension(result, ext, base);\n \n \t\t// 3 include interfaces from the extension that we will need\n \t\tincludeInterfacesFromExtension(result, ext, base);\n \n \t\t// 4a generate new extension productions that is P and S interface\n \t\tMap<String, IInterfaceDefinition> iReplacementMap = generateExtensionInterfaces(result, ext, base);\n \n \t\t// 4b generate new base classes for the P and S interface generated in 4a\n \t\tMap<String, IClassDefinition> cReplacementMap = generateExtensionClasses(result, ext, base, iReplacementMap);\n \n \t\t// 5 Update classToType\n \t\tupdateClassToType(result,ext,base);\n \n \t\t// 6 Update super definitions\n \t\tupdateSuperDefinitions(result,ext,cReplacementMap);\n \n \t\t// 7 Update treeNode to interface mapping (that is the common implements relationship)\n \t\tupdateTreeNodeToInterface(result, ext,base, iReplacementMap);\n \n \t\t// 8 Fields on nodes from the ext environment may have unresolved types\n \t\tupdateFieldsWithUnresolvedTypes(result,ext,base);\n \n \t\treturn result;\n \t}",
"public boolean try_extend() {\n if (Pneumatics.get_instance().get_solenoids() || base_conflicting_extend() || in_inner_thresh()) {\n return false;\n }\n Pneumatics.get_instance().set_solenoids(true);\n return true;\n }",
"private void extend() {\n for (Object o : table) {\n if (o == null)\n return;\n }\n\n TABLE_SIZE *= 2;\n Object[] entries = entrySet();\n this.table = new Object[TABLE_SIZE];\n\n rebuild(entries);\n }",
"public final void rule__JvmUpperBound__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16609:1: ( ( 'extends' ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16610:1: ( 'extends' )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16610:1: ( 'extends' )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:16611:1: 'extends'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \r\n }\r\n match(input,126,FOLLOW_126_in_rule__JvmUpperBound__Group__0__Impl33523); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public void override() {\n isOverridden = true;\n }",
"private void updateSuperDefinitions(Environment result, Environment ext,\n \t\t\tMap<String, IClassDefinition> cReplacementMap) {\n \t\tfor(IClassDefinition cdef : ext.getClasses())\n \t\t{\n \t\t\tIClassDefinition superDef = cdef.getSuperDef();\n \t\t\tif (superDef != null){\n \n \t\t\t\t// Update super to be newly generated production if necessary\n \t\t\t\tIClassDefinition replacementSuperDef = cReplacementMap.get(superDef.getName().getName());\n \t\t\t\tif (replacementSuperDef != null)\n \t\t\t\t\tcdef.setSuper(replacementSuperDef);\n \n \t\t\t\t// Update super to the result-ast if necessary\n \t\t\t\tif (superDef == ext.node)\n \t\t\t\t\tcdef.setSuper(result.node);\n \n \t\t\t\t// RWL: Hmm, node is not an interface and should not be present in supers, right?\n \t\t\t\tif (cdef.getSuperDefs().contains(base.node) || cdef.getSuperDefs().contains(ext.node))\n \t\t\t\t{\n \t\t\t\t\tcdef.getSuperDefs().remove(base.node);\n \t\t\t\t\tcdef.getSuperDefs().remove(ext.node);\n \t\t\t\t\tcdef.getSuperDefs().add(result.node);\n \t\t\t\t}\n\t\t\t\t\n \t\t\t\tif (cdef.getSuperDefs().contains(base.iNode) || cdef.getSuperDefs().contains(ext.iNode))\n \t\t\t\t{\n \t\t\t\t\tcdef.getSuperDefs().remove(base.iNode);\n \t\t\t\t\tcdef.getSuperDefs().remove(ext.iNode);\n \t\t\t\t\tcdef.getSuperDefs().add(result.iNode);\n \t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n \n\t\tfor (IInterfaceDefinition idef : ext.getInterfaces())\n\t\t{\n\t\t\tif (idef.getSuperDefs().contains(base.iNode) || idef.getSuperDefs().contains(ext.iNode))\n\t\t\t{\n\t\t\t\tidef.getSuperDefs().remove(base.iNode);\n\t\t\t\tidef.getSuperDefs().remove(ext.iNode);\n\t\t\t\tidef.getSuperDefs().add(result.iNode);\n \t\t\t}\n\t\t\t\n \t\t}\n \n \t}",
"public String getSkinExtends()\n {\n return _skinExtends;\n }",
"public void setInheritAll(boolean value) {\n inheritAll = value;\n }",
"public final void rule__JvmUpperBound__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11760:1: ( ( 'extends' ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11761:1: ( 'extends' )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11761:1: ( 'extends' )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:11762:1: 'extends'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \n }\n match(input,65,FOLLOW_65_in_rule__JvmUpperBound__Group__0__Impl23587); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public Environment extend(Environment ext) throws AstCreatorException\n\t{\n\t\tEnvironment result = Environment.getFromBase(base, ext.getAnalysisPackage(), ext.getDefaultPackage(), ext.getName());\n\n\t\tresult.setTemplateAnalysisPackage(base.getAnalysisPackage());\n\t\tresult.setTemplateDefaultPackage(base.getDefaultPackage());\n\n\t\tSystem.out.println(\"***********************************************\");\n\t\tSystem.out.println(\"AST Creator Extensions\");\n\t\tSystem.out.println(\"***********************************************\");\n\n\t\t// 1 every class and interface from the base environment is added to\n\t\t// result\n\t\taddBaseAstClassesAndInterfaces(result, base);\n\n\t\t// 2 include classes from the extension that we will need\n\t\tincludeClassesFromExtension(result, ext, base);\n\n\t\t// 3 include interfaces from the extension that we will need\n\t\tincludeInterfacesFromExtension(result, ext, base);\n\n\t\t// 4a generate new extension productions that is P and S interface\n\t\tMap<String, IInterfaceDefinition> iReplacementMap = generateExtensionInterfaces(result, ext, base);\n\n\t\t// 4b generate new base classes for the P and S interface generated in\n\t\t// 4a\n\t\tMap<String, IClassDefinition> cReplacementMap = generateExtensionClasses(result, ext, base, iReplacementMap);\n\n\t\t// 5 Update classToType\n\t\tupdateClassToType(result, ext, base);\n\n\t\t// 6 Update super definitions\n\t\tupdateSuperDefinitions(result, ext, cReplacementMap, iReplacementMap);\n\n\t\t// 7 Update treeNode to interface mapping (that is the common implements\n\t\t// relationship)\n\t\tupdateTreeNodeToInterface(result, ext, base, iReplacementMap);\n\n\t\t// 8 Fields on nodes from the ext environment may have unresolved types\n\t\tupdateFieldsWithUnresolvedTypes(result, ext, base);\n\n\t\treturn result;\n\t}",
"private void doIncludeModule(RubyModule baseModule) {\n List<RubyModule> modulesToInclude = gatherModules(baseModule);\n \n RubyModule currentInclusionPoint = this;\n ModuleLoop: for (RubyModule nextModule : modulesToInclude) {\n checkForCyclicInclude(nextModule);\n \n boolean superclassSeen = false;\n \n // scan class hierarchy for module\n for (RubyClass nextClass = this.getSuperClass(); nextClass != null; nextClass = nextClass.getSuperClass()) {\n if (doesTheClassWrapTheModule(nextClass, nextModule)) {\n // next in hierarchy is an included version of the module we're attempting,\n // so we skip including it\n \n // if we haven't encountered a real superclass, use the found module as the new inclusion point\n if (!superclassSeen) currentInclusionPoint = nextClass;\n \n continue ModuleLoop;\n } else {\n superclassSeen = true;\n }\n }\n \n currentInclusionPoint = proceedWithInclude(currentInclusionPoint, nextModule);\n }\n }",
"public void addInheritanceRelation(InheritanceRelation relation);",
"public void setSuperClass(TypeData sclas) {\n m_superClass = sclas;\n if (sclas != null) {\n boolean imported = m_importsTracker.addImport(sclas.getFullName(), false);\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"Set superclass of \" + getFullName() + \" to \" + sclas.getFullName() +\n (imported ? \" (imported)\" : \"\"));\n }\n }\n }",
"public AccessGroup getExtendGroup()\n {\n return this.extendGroup;\n }",
"public void setInheritall(boolean b) {\r\n this.inheritAll = b;\r\n }",
"@Override\n protected void extend(ServerConnector target) {\n\n }",
"void extend(Dimension dimension)\n\t\t{\n\t\t\tsides = sides+1;\n\t\t\t\n\t Dimension[] dime1 = new Dimension[d.length+1];\n\t \n\t\t\tfor (int i =0; i< d.length; i++)\n\t\t\t{\n\t\t\t\tdime1[i] = d[i];\n\t\t\t}\n\t\t\t\n\t\t\tdime1[d.length]=dimension;\n\t\t\t\n\t\t\td = new Dimension[d.length + 1];\n\t\t\tfor(int i = 0; i< dime1.length; i++)\n\t\t\t{\n\t\t\t\td[i] = dime1[i];\n\t\t\t}\t\t\n\t\t}",
"protected void applyNewStatements() {\r\n\t\tbldInfView.updateCurrentDirectory(bldInfView.getModel().getPath());\r\n\r\n\t\tapplyNewListArgumentStatements();\r\n\t\tapplyNewBlockStatements();\r\n\t}",
"public interface ExtendsFrom extends ViewDefinition\n{\n /**\n * Gets all the placeholder definitions for this view.\n *\n * @return A map with the name of the placeholder an the corresponding\n * Defines object.\n */\n Map<String, Defines> getDefinesMap();\n\n /**\n * Gets the list of defines for this view.\n *\n * @return A list of Defines objects.\n */\n List<Defines> getDefines();\n\n /**\n * The name of the parent layout.\n * \n * @return An string with the name of the parent layout.\n */\n String getLayout();\n}",
"private void updateSuperDefinitions(Environment result, Environment ext,\n\t\t\tMap<String, IClassDefinition> cReplacementMap,\n\t\t\tMap<String, IInterfaceDefinition> iReplacementMap)\n\t{\n\t\tfor (IClassDefinition cdef : ext.getClasses())\n\t\t{\n\t\t\tIClassDefinition superDef = cdef.getSuperDef();\n\t\t\tif (superDef != null)\n\t\t\t{\n\n\t\t\t\t// Update super to be newly generated production if necessary\n\t\t\t\tIClassDefinition replacementSuperDef = cReplacementMap.get(superDef.getName().getName());\n\t\t\t\tif (replacementSuperDef != null)\n\t\t\t\t\tcdef.setSuper(replacementSuperDef);\n\n\t\t\t\t// Update super to the result-ast if necessary\n\t\t\t\tif (superDef == ext.node)\n\t\t\t\t\tcdef.setSuper(result.node);\n\n\t\t\t\t// RWL: Hmm, node is not an interface and should not be present\n\t\t\t\t// in supers, right?\n\t\t\t\tif (cdef.getSuperDefs().contains(base.node)\n\t\t\t\t\t\t|| cdef.getSuperDefs().contains(ext.node))\n\t\t\t\t{\n\t\t\t\t\tcdef.getSuperDefs().remove(base.node);\n\t\t\t\t\tcdef.getSuperDefs().remove(ext.node);\n\t\t\t\t\tcdef.getSuperDefs().add(result.node);\n\t\t\t\t}\n\n\t\t\t\tif (cdef.getSuperDefs().contains(base.iNode)\n\t\t\t\t\t\t|| cdef.getSuperDefs().contains(ext.iNode))\n\t\t\t\t{\n\t\t\t\t\tcdef.getSuperDefs().remove(base.iNode);\n\t\t\t\t\tcdef.getSuperDefs().remove(ext.iNode);\n\t\t\t\t\tcdef.getSuperDefs().add(result.iNode);\n\t\t\t\t}\n\n\t\t\t\t// Replace supers\n\t\t\t\tList<IInterfaceDefinition> tbr = new LinkedList<IInterfaceDefinition>();\n\t\t\t\tList<IInterfaceDefinition> tba = new LinkedList<IInterfaceDefinition>();\n\t\t\t\tfor (IInterfaceDefinition idef : cdef.getSuperDefs())\n\t\t\t\t\tif (cReplacementMap.containsKey(idef.getName().getName()))\n\t\t\t\t\t{\n\t\t\t\t\t\tIClassDefinition newDef = cReplacementMap.get(idef.getName().getName());\n\t\t\t\t\t\ttbr.add(idef);\n\t\t\t\t\t\ttba.add(newDef);\n\t\t\t\t\t}\n\t\t\t\tcdef.getSuperDefs().removeAll(tbr);\n\t\t\t\tcdef.getSuperDefs().addAll(tba);\n\n\t\t\t}\n\n\t\t}\n\n\t\tfor (IInterfaceDefinition idef : ext.getInterfaces())\n\t\t{\n\t\t\tif (idef.getSuperDefs().contains(base.iNode)\n\t\t\t\t\t|| idef.getSuperDefs().contains(ext.iNode))\n\t\t\t{\n\t\t\t\tidef.getSuperDefs().remove(base.iNode);\n\t\t\t\tidef.getSuperDefs().remove(ext.iNode);\n\t\t\t\tidef.getSuperDefs().add(result.iNode);\n\t\t\t}\n\n\t\t\tList<IInterfaceDefinition> tbr = new LinkedList<IInterfaceDefinition>();\n\t\t\tList<IInterfaceDefinition> tba = new LinkedList<IInterfaceDefinition>();\n\t\t\tfor (IInterfaceDefinition sidef : idef.getSuperDefs())\n\t\t\t{\n\t\t\t\tif (iReplacementMap.containsKey(sidef.getName().getName()))\n\t\t\t\t{\n\t\t\t\t\tIInterfaceDefinition replacement = iReplacementMap.get(sidef.getName().getName());\n\t\t\t\t\ttbr.add(sidef);\n\t\t\t\t\ttba.add(replacement);\n\t\t\t\t}\n\t\t\t}\n\t\t\tidef.getSuperDefs().removeAll(tbr);\n\t\t\tidef.getSuperDefs().addAll(tba);\n\t\t}\n\n\t}",
"private Vector getExtendImplement(ClassType c)\r\n {\r\n String st;\r\n Vector v = new Vector();\r\n\r\n if (c.extend.name != null && c.extend.scope == null)\r\n {\r\n st = c.extend.name.string;\r\n if (!c.unresolved.contains(st))\r\n for(Iterator iter = c.unresolved.iterator(); iter.hasNext();)\r\n {\r\n String s = (String)iter.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n v.add(st);\r\n }\r\n\r\n for(int j = 0; j < c.implement.length; j++)\r\n if (c.implement[j].scope == null)\r\n {\r\n st = c.implement[j].name.string;\r\n\r\n if (!c.unresolved.contains(st))\r\n for(Iterator iter = c.unresolved.iterator(); iter.hasNext();)\r\n {\r\n String s = (String)iter.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n if (!v.contains(st))\r\n v.add(st);\r\n }\r\n\r\n return v;\r\n }",
"private void conditionalExtendFile() {\n\n // maximum allowed size of an Azure page blob (1 terabyte)\n final long MAX_PAGE_BLOB_SIZE = 1024L * 1024L * 1024L * 1024L;\n\n // If blob is already at the maximum size, then don't try to extend it.\n if (currentBlobSize == MAX_PAGE_BLOB_SIZE) {\n return;\n }\n\n // If we are within the maximum write size of the end of the file,\n if (currentBlobSize - currentBlobOffset <= MAX_RAW_BYTES_PER_REQUEST) {\n\n // Extend the file. Retry up to 3 times with back-off.\n CloudPageBlob cloudPageBlob = (CloudPageBlob) blob.getBlob();\n long newSize = currentBlobSize + configuredPageBlobExtensionSize;\n\n // Make sure we don't exceed maximum blob size.\n if (newSize > MAX_PAGE_BLOB_SIZE) {\n newSize = MAX_PAGE_BLOB_SIZE;\n }\n final int MAX_RETRIES = 3;\n int retries = 1;\n boolean resizeDone = false;\n while(!resizeDone && retries <= MAX_RETRIES) {\n try {\n cloudPageBlob.resize(newSize);\n resizeDone = true;\n currentBlobSize = newSize;\n } catch (StorageException e) {\n LOG.warn(\"Failed to extend size of \" + cloudPageBlob.getUri());\n try {\n\n // sleep 2, 8, 18 seconds for up to 3 retries\n Thread.sleep(2000 * retries * retries);\n } catch (InterruptedException e1) {\n\n // Restore the interrupted status\n Thread.currentThread().interrupt();\n }\n } finally {\n retries++;\n }\n }\n }\n }",
"public interface TestExtend {\n}",
"public void addOverrides(List<JMethod> toAdd) {\n assert canBePolymorphic();\n overrides = Lists.addAll(overrides, toAdd);\n }",
"public void visit(ClassDeclExtends node) {\n Symbol key = Symbol.symbol(node.name.s);\n ClassInfo data = new ClassInfo(key);\n\n // Chama o firstPass() para as variaveis\n VarDeclListHandler.firstPass(env, data, node.varList);\n\n // Chama o firstPass() para os metodos\n MethodDeclListHandler.firstPass(env, data, node.methodList);\n\n // Insere a classe na tabela\n if (!env.classes.put(key, data)) {\n env.err.Error(node, new Object[] {\"Nome de classe redefinido: \" + key});\n }\n }",
"public void EXTENDED() {\n ea = IMMWORD();\n }",
"public void setAllowOverridingParameter(final boolean newAllowOverridingParameter) {\n allowOverridingParameter = newAllowOverridingParameter;\n }",
"SolutionChange getSuperChange();",
"protected final void setSuperscript() {\n setFontSize((int) (getFontSize() * 0.5d));\n yOffset -= getFontSize();\n }",
"public void testExtendsRebuild() {\n testExtendsRebuild(new LinkerDef());\n }",
"boolean overrides(MethodDeclaration sub, MethodDeclaration sup);",
"public boolean isSuperResolutionEnabled() {\n return false;\n }",
"@Override\n protected void readAttributes(XMLStreamReader in)\n throws XMLStreamException {\n super.readAttributes(in);\n\n String extendString = in.getAttributeValue(null, \"extends\");\n BuildingType parent = (extendString == null) ? this :\n getSpecification().getBuildingType(extendString);\n String upgradeString = in.getAttributeValue(null, \"upgradesFrom\");\n if (upgradeString == null) {\n level = 1;\n } else {\n upgradesFrom = getSpecification().getBuildingType(upgradeString);\n upgradesFrom.upgradesTo = this;\n level = upgradesFrom.level + 1;\n }\n setPopulationRequired(getAttribute(in, \"required-population\", parent.getPopulationRequired()));\n\n workPlaces = getAttribute(in, \"workplaces\", parent.workPlaces);\n basicProduction = getAttribute(in, \"basicProduction\", parent.basicProduction);\n\n consumes = getSpecification().getType(in, \"consumes\", GoodsType.class, parent.consumes);\n produces = getSpecification().getType(in, \"produces\", GoodsType.class, parent.produces);\n\n if (produces != null && basicProduction > 0) {\n productionModifier = new Modifier(produces.getId(), this, basicProduction,\n Modifier.Type.ADDITIVE);\n }\n\n minSkill = getAttribute(in, \"minSkill\", parent.minSkill);\n maxSkill = getAttribute(in, \"maxSkill\", parent.maxSkill);\n\n priority = getAttribute(in, \"priority\", parent.priority);\n upkeep = getAttribute(in, \"upkeep\", parent.upkeep);\n\n if (parent != this) {\n getFeatureContainer().add(parent.getFeatureContainer());\n if (parent.isAbstractType()) {\n getFeatureContainer().replaceSource(parent, this);\n }\n }\n }",
"public interface ExtenderInterface {\r\n\r\n\t/**\r\n\t * Extends the diagram for new generated elements.\r\n\t */\r\n\tvoid extend();\r\n\t\r\n}",
"public void addOverride(JMethod toAdd) {\n assert canBePolymorphic();\n overrides = Lists.add(overrides, toAdd);\n }",
"public void setExtendable(boolean extendable)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EXTENDABLE$22);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(EXTENDABLE$22);\r\n }\r\n target.setBooleanValue(extendable);\r\n }\r\n }",
"@Override\n\tprotected void extend(AbstractClientConnector target) {\n\t\tsuper.extend(target);\n\t}",
"public static void addOverride(BaseModOverride override) {\n\t\toverrides.add(override);\n\t}",
"@Override\n\tpublic void enlarge() {\n\t\t\n\t}",
"public Node extend() {\n return node;\n }",
"public final EObject ruleJvmUpperBound() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n EObject lv_typeReference_1_0 = null;\n\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2824:28: ( (otherlv_0= 'extends' ( (lv_typeReference_1_0= ruleJvmTypeReference ) ) ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2825:1: (otherlv_0= 'extends' ( (lv_typeReference_1_0= ruleJvmTypeReference ) ) )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2825:1: (otherlv_0= 'extends' ( (lv_typeReference_1_0= ruleJvmTypeReference ) ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2825:3: otherlv_0= 'extends' ( (lv_typeReference_1_0= ruleJvmTypeReference ) )\n {\n otherlv_0=(Token)match(input,58,FOLLOW_58_in_ruleJvmUpperBound6651); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_0, grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0());\n \n }\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2829:1: ( (lv_typeReference_1_0= ruleJvmTypeReference ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2830:1: (lv_typeReference_1_0= ruleJvmTypeReference )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2830:1: (lv_typeReference_1_0= ruleJvmTypeReference )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2831:3: lv_typeReference_1_0= ruleJvmTypeReference\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getJvmUpperBoundAccess().getTypeReferenceJvmTypeReferenceParserRuleCall_1_0()); \n \t \n }\n pushFollow(FOLLOW_ruleJvmTypeReference_in_ruleJvmUpperBound6672);\n lv_typeReference_1_0=ruleJvmTypeReference();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getJvmUpperBoundRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"typeReference\",\n \t\tlv_typeReference_1_0, \n \t\t\"JvmTypeReference\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"private static void includeInterfacesFromExtension(Environment result, Environment extEnv, Environment base)\n \t{\n \t\tfor(IInterfaceDefinition iDef : extEnv.getInterfaces())\n \t\t\tif (!willGenerateExtentionFor(iDef, base))\n \t\t\t\tresult.getInterfaces().add(iDef);\n \n \t}",
"private void superTypes(TypeSpec.Builder classBuilder, TypeElement originClassType, String packageName, Set<ColumnDefinition> columnDefinitions) {\n if( originClassType == null )\n return;\n\n final TypeMirror objectClassType = elements.getTypeElement( Object.class.getName() ).asType();\n final TypeMirror originSuperClassType = originClassType.getSuperclass();\n if( !types.isSameType( originSuperClassType, objectClassType ) && types.asElement( originSuperClassType ).getAnnotation( Contract.class ) == null ) {\n final TypeElement originSuperClass = elements.getTypeElement( originSuperClassType.toString() );\n generateInterface( originSuperClass, packageName, columnDefinitions );\n classBuilder.addSuperinterface( ClassName.bestGuess( originSuperClass.getQualifiedName().toString() + \"Model\" ) );\n }\n }",
"public void setVoucherExtend(VoucherExtendBriefEntity voucherExtend) {\n\t\tthis.voucherExtend = voucherExtend;\n\t}",
"protected void grow() {\n }",
"_ExtendsNotAbstract() {\n super(\"s\"); // needs this if not default ctor;\n }",
"public void setExtendCatId(Integer extendCatId) {\n this.extendCatId = extendCatId;\n }",
"private void setBlocksInheritance(boolean blocksInheritance) {\n\t\tthis.blocksInheritance = blocksInheritance;\n\t}",
"public void toggleSuperAS() {\n this.isSuperAS = true;\n }",
"public void setExtended(boolean value) {\n this.extended = value;\n }",
"private static void includeInterfacesFromExtension(Environment result,\n\t\t\tEnvironment extEnv, Environment base)\n\t{\n\t\tfor (IInterfaceDefinition iDef : extEnv.getInterfaces())\n\t\t{\n\t\t\tif (!willGenerateExtensionFor(iDef, base))\n\t\t\t{\n\t\t\t\tiDef.setIsExtTree(true);\n\t\t\t\tresult.getInterfaces().add(iDef);\n\t\t\t}\n\t\t}\n\t}",
"public void extendDuration(int r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: android.widget.OppoScroller.extendDuration(int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.widget.OppoScroller.extendDuration(int):void\");\n }",
"public void myMethod(){\n\t\t\tsuper.myMethod();\n\t\t\tSystem.out.println(\"Overriding method\");\n\t\t }",
"public void base() {\n APIlib.getInstance().addJSLine(jsBase + \".base();\");\n }",
"private void fireSubsetDefinitionListChanged() {\n fireSubsetDefinitionListChanged(this, null);\n }",
"public Type visit(ClassDeclExtends n) {\n\t\tthis.currClass = this.symbolTable.getClass(n.i.toString());\n\n\t\tif (this.currClass.parent() != n.j.s) {\n\t\t\tSystem.out.println(\"Extensão de classe errada\");\n\t\t}\n\n\t\tn.i.accept(this);\n\t\tn.j.accept(this);\n\t\tfor (int i = 0; i < n.vl.size(); i++) {\n\t\t\tn.vl.elementAt(i).accept(this);\n\t\t}\n\t\tfor (int i = 0; i < n.ml.size(); i++) {\n\t\t\tn.ml.elementAt(i).accept(this);\n\t\t}\n\t\treturn null;\n\t}",
"public AbstractClassExtend() {\n\t\tsuper(\"hello\");\n\t}",
"public void swim() {\n\tfloatInWater(); // package access to superclass\n\tSystem.out.println(text); // package access to superclass\n }",
"private void superAttachBaseContext(Context context) {\n super.attachBaseContext(context);\n }",
"public void xsetExtendable(org.apache.xmlbeans.XmlBoolean extendable)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlBoolean target = null;\r\n target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(EXTENDABLE$22);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlBoolean)get_store().add_attribute_user(EXTENDABLE$22);\r\n }\r\n target.set(extendable);\r\n }\r\n }",
"@Override\n\tpublic void beginSubInterval(GraphChiContext ctx, VertexInterval interval) {\n\t\t\n\t}",
"public void expand(boolean inclChildren) {\n isExtended = true;\n if (inclChildren)\n for (BudgetAccountTableRow child : children)\n child.reduce(true);\n updateUItoExtState();\n }",
"public JavaType refine(Class<?> contentClass, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces)\n/* */ {\n/* 124 */ return null;\n/* */ }",
"@Override\n protected void attachBaseContext(Context newBase) {\n super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));\n }",
"@Override\n protected void attachBaseContext(Context newBase) {\n super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));\n }"
] |
[
"0.7538853",
"0.6621436",
"0.6232582",
"0.61661804",
"0.6043416",
"0.5933054",
"0.5821906",
"0.579257",
"0.5718948",
"0.5702107",
"0.55411154",
"0.5430927",
"0.5426688",
"0.53554183",
"0.53540546",
"0.53005254",
"0.5296033",
"0.52916294",
"0.52765733",
"0.52657515",
"0.5263946",
"0.5255432",
"0.5255432",
"0.5255432",
"0.5241948",
"0.52239937",
"0.51609015",
"0.5152642",
"0.5114567",
"0.5109125",
"0.5104901",
"0.509396",
"0.50699073",
"0.5068955",
"0.49689358",
"0.4941135",
"0.49185714",
"0.4882642",
"0.4882587",
"0.48482996",
"0.4813695",
"0.4809068",
"0.48080125",
"0.48058322",
"0.47877058",
"0.47864076",
"0.47639704",
"0.46796498",
"0.46716118",
"0.46501765",
"0.46443668",
"0.45841178",
"0.45761395",
"0.45694792",
"0.4563707",
"0.4551951",
"0.45412743",
"0.4536358",
"0.45096695",
"0.45015505",
"0.44838485",
"0.44811505",
"0.44803742",
"0.44657132",
"0.44632196",
"0.44570935",
"0.4443361",
"0.4438284",
"0.44291618",
"0.4423954",
"0.4418925",
"0.441235",
"0.44055977",
"0.44037902",
"0.44012138",
"0.43942",
"0.43911946",
"0.43882266",
"0.43864492",
"0.438426",
"0.43788856",
"0.43758085",
"0.43662205",
"0.4333114",
"0.43282786",
"0.43208",
"0.4311947",
"0.43083176",
"0.4307614",
"0.43052292",
"0.42952943",
"0.4288254",
"0.4272094",
"0.42673612",
"0.42650267",
"0.42545688",
"0.4249782",
"0.4248239",
"0.42474166",
"0.42474166"
] |
0.62962013
|
2
|
Gets the implements clause.
|
public DeclaredTypeListNode getImplementsClause()throws ClassCastException;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Enumeration getImplements()\n {\n ensureLoaded();\n return m_tblInterface.keys();\n }",
"public void setImplementsClause(DeclaredTypeListNode implementsClause);",
"public Object _get_interface_def()\n {\n // First try to call the delegate implementation class's\n // \"Object get_interface_def(..)\" method (will work for JDK1.2\n // ORBs).\n // Else call the delegate implementation class's\n // \"InterfaceDef get_interface(..)\" method using reflection\n // (will work for pre-JDK1.2 ORBs).\n\n throw new NO_IMPLEMENT(reason);\n }",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] getImplementsInterfaceArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(IMPLEMENTSINTERFACE$10, targetList);\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] result = new com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface addNewImplementsInterface()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface target = null;\r\n target = (com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface)get_store().add_element_user(IMPLEMENTSINTERFACE$10);\r\n return target;\r\n }\r\n }",
"public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }",
"String getInterfaces();",
"Interface_decl getInterface();",
"@Override\n public org.omg.CORBA.Object _get_interface_def()\n {\n if (interfaceDef != null)\n return interfaceDef;\n else\n return super._get_interface_def();\n }",
"org.omg.CORBA.Object _get_interface_def();",
"public final String implements_spec() throws RecognitionException {\n String type = null;\n\n\n CommonTree CLASS_DESCRIPTOR12 = null;\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:200:3: ( ^( I_IMPLEMENTS CLASS_DESCRIPTOR ) )\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:200:5: ^( I_IMPLEMENTS CLASS_DESCRIPTOR )\n {\n match(input, I_IMPLEMENTS, FOLLOW_I_IMPLEMENTS_in_implements_spec152);\n match(input, Token.DOWN, null);\n CLASS_DESCRIPTOR12 = (CommonTree) match(input, CLASS_DESCRIPTOR, FOLLOW_CLASS_DESCRIPTOR_in_implements_spec154);\n match(input, Token.UP, null);\n\n\n type = (CLASS_DESCRIPTOR12 != null ? CLASS_DESCRIPTOR12.getText() : null);\n\n }\n\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return type;\n }",
"public final List<String> implements_list() throws RecognitionException {\n List<String> implementsList = null;\n\n\n String implements_spec13 = null;\n\n List<String> typeList;\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:207:3: ( ( implements_spec )* )\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:207:5: ( implements_spec )*\n {\n typeList = Lists.newArrayList();\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:208:5: ( implements_spec )*\n loop2:\n while (true) {\n int alt2 = 2;\n int LA2_0 = input.LA(1);\n if ((LA2_0 == I_IMPLEMENTS)) {\n alt2 = 1;\n }\n\n switch (alt2) {\n case 1:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:208:6: implements_spec\n {\n pushFollow(FOLLOW_implements_spec_in_implements_list184);\n implements_spec13 = implements_spec();\n state._fsp--;\n\n typeList.add(implements_spec13);\n }\n break;\n\n default:\n break loop2;\n }\n }\n\n\n if (typeList.size() > 0) {\n implementsList = typeList;\n } else {\n implementsList = null;\n }\n\n }\n\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return implementsList;\n }",
"public static String interfaceDecl()\n {\n read_if_needed_();\n \n return _interface_decl;\n }",
"public void setUnionForImplementsClause(NodeUnion<? extends DeclaredTypeListNode> implementsClause) throws NullPointerException;",
"public NodeUnion<? extends DeclaredTypeListNode> getUnionForImplementsClause();",
"public boolean isInterface();",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface getImplementsInterfaceArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface target = null;\r\n target = (com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface)get_store().find_element_user(IMPLEMENTSINTERFACE$10, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }",
"public boolean implementsInterface(Class<?> ifType) {\n boolean result = false;\n\n if (ifList.contains(ifType)) {\n result = true;\n }\n return result;\n }",
"@SuppressWarnings(\"rawtypes\")\n\tpublic List getInterfaces(){\n\t\treturn targetClass.interfaces;\n\t}",
"public interface In extends Clause {}",
"boolean isDeclaredInInterface() {\n return (declaringClass != null) && (declaringClass.isInterface());\n }",
"Interface getInterface();",
"Interface getInterface();",
"public List<ClassOrInterfaceDeclaration> getInterfaces() {\n return this.clsOrInterfDeclrs;\n }",
"@Override\n public List<JavaType> getInterfaces() {\n return ImmutableList.of();\n }",
"public int[] getInterfaces() {\n return interfaces;\n }",
"Set<Interface> getInterfaces();",
"@Override\n\tpublic void implements_(JDefinedClass cls) {\n\n\t}",
"public final void mT__107() throws RecognitionException {\n try {\n int _type = T__107;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:77:8: ( 'implements-interfaces' )\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:77:10: 'implements-interfaces'\n {\n match(\"implements-interfaces\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public List getInterfaceExtensions();",
"public abstract boolean hasInterface(String strInterfaceName_p);",
"public InclusionOrExclusionType getInterfacesInclusionOrExclusionType() {\n return interfacesInclusionOrExclusionType;\n }",
"public String[] getInterfaces() {\n return m_classBuilder.getInterfaces();\n }",
"public int sizeOfImplementsInterfaceArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(IMPLEMENTSINTERFACE$10);\r\n }\r\n }",
"private boolean interfaceImplementsInterface(AClass ith) {\n\t\tEnumeration e = getImplements();\n\t\twhile (e.hasMoreElements()) {\n\t\t\tAClass i = ((Type) e.nextElement()).getRefType();\n\t\t\tif (i == ith) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (i.interfaceImplementsInterface(ith)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public void addImplements(String sInterface)\n {\n ensureLoaded();\n m_tblInterface.put(sInterface.replace('.', '/'), new ClassConstant(sInterface));\n setModified(true);\n }",
"public String getInterfaceName();",
"public String getImplementation()\n {\n return implementation;\n }",
"public Collection<Interface> getInterfaces() {\n\t\treturn this.interfaces;\n\t}",
"IInterfaceDefinition[] resolveImplementedInterfaces(ICompilerProject project);",
"public String getEjbInterface();",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface insertNewImplementsInterface(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface target = null;\r\n target = (com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface)get_store().insert_element_user(IMPLEMENTSINTERFACE$10, i);\r\n return target;\r\n }\r\n }",
"public com.guidewire.datamodel.ImplementsEntityDocument.ImplementsEntity addNewImplementsEntity()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ImplementsEntityDocument.ImplementsEntity target = null;\r\n target = (com.guidewire.datamodel.ImplementsEntityDocument.ImplementsEntity)get_store().add_element_user(IMPLEMENTSENTITY$8);\r\n return target;\r\n }\r\n }",
"public AIDLInterface getInterface()\n\t{\n\t\t//System.out.println(\"---- mInterface -----\" + mInterface);\n\t\treturn mInterface;\n\t}",
"@Override\n\tpublic void add() {\n\t\tSystem.out.println(\"This is an implemented interface\");\n\t}",
"public abstract List<AbstractNodeTypeImplementation> getImplementations();",
"public interface InterfaceService\n extends ListenerService<InterfaceEvent, InterfaceListener> {\n\n /**\n * Returns the set of all interfaces in the system.\n *\n * @return set of interfaces\n */\n Set<Interface> getInterfaces();\n\n /**\n * Returns the interface with the given name.\n *\n * @param connectPoint connect point of the interface\n * @param name name of the interface\n * @return interface if it exists, otherwise null\n */\n Interface getInterfaceByName(ConnectPoint connectPoint, String name);\n\n /**\n * Returns the set of interfaces configured on the given port.\n *\n * @param port connect point\n * @return set of interfaces\n */\n Set<Interface> getInterfacesByPort(ConnectPoint port);\n\n /**\n * Returns the set of interfaces with the given IP address.\n *\n * @param ip IP address\n * @return set of interfaces\n */\n Set<Interface> getInterfacesByIp(IpAddress ip);\n\n /**\n * Returns the set of interfaces in the given VLAN.\n *\n * @param vlan VLAN ID of the interfaces\n * @return set of interfaces\n */\n Set<Interface> getInterfacesByVlan(VlanId vlan);\n\n /**\n * Returns an interface that has an address that is in the same subnet as\n * the given IP address.\n *\n * @param ip IP address to find matching subnet interface for\n * @return interface\n */\n Interface getMatchingInterface(IpAddress ip);\n\n /**\n * Returns all interfaces that have an address that is in the same\n * subnet as the given IP address.\n *\n * @param ip IP address to find matching subnet interface for\n * @return a set of interfaces\n */\n Set<Interface> getMatchingInterfaces(IpAddress ip);\n\n /**\n * Returns untagged VLAN configured on given connect point.\n * <p>\n * Only returns the first match if there are multiple untagged VLAN configured\n * on the connect point.\n *\n * @param connectPoint connect point\n * @return untagged VLAN or null if not configured\n */\n default VlanId getUntaggedVlanId(ConnectPoint connectPoint) {\n return null;\n }\n\n /**\n * Returns tagged VLAN configured on given connect point.\n * <p>\n * Returns all matches if there are multiple tagged VLAN configured\n * on the connect point.\n *\n * @param connectPoint connect point\n * @return tagged VLAN or empty set if not configured\n */\n default Set<VlanId> getTaggedVlanId(ConnectPoint connectPoint) {\n return ImmutableSet.of();\n }\n\n /**\n * Returns native VLAN configured on given connect point.\n * <p>\n * Only returns the first match if there are multiple native VLAN configured\n * on the connect point.\n *\n * @param connectPoint connect point\n * @return native VLAN or null if not configured\n */\n default VlanId getNativeVlanId(ConnectPoint connectPoint) {\n return null;\n }\n\n /**\n * Returns true if given connectPoint has an IP address or vlan configured\n * on any of its interfaces.\n *\n * @param connectPoint the port on a device\n * @return true if connectpoint has a configured interface\n */\n default boolean isConfigured(ConnectPoint connectPoint) {\n throw new NotImplementedException(\"isConfigured is not implemented\");\n }\n\n /**\n * Returns true if given vlanId is in use due to configuration on any of the\n * interfaces in the system.\n *\n * @param vlanId the vlan id being queried\n * @return true if vlan is configured on any interface\n */\n default boolean inUse(VlanId vlanId) {\n throw new NotImplementedException(\"isConfigured is not implemented\");\n }\n}",
"public Collection<ClassTranslator> getInterfaces();",
"@Override\n\tpublic boolean isImplemented() {\n\t\treturn false;\n\t}",
"public InterfaceName getInterfaceName() {\n\t\treturn ifpName;\n\t}",
"public static Interface getInterface() {\n return null;\n }",
"@Override\n public boolean isInterface() { return false; }",
"@AssignableSubInterfaces(get={})\n\n@ImplementationClass(get=Brain.class)\n public interface IBrain\n extends ICentralNervousSystem{\n\n}",
"public interface IsisInterface {\n\n /**\n * Sets interface index.\n *\n * @param interfaceIndex interface index\n */\n void setInterfaceIndex(int interfaceIndex);\n\n /**\n * Sets intermediate system name.\n *\n * @param intermediateSystemName intermediate system name\n */\n void setIntermediateSystemName(String intermediateSystemName);\n\n /**\n * Sets system ID.\n *\n * @param systemId system ID\n */\n void setSystemId(String systemId);\n\n /**\n * Sets LAN ID.\n *\n * @param lanId LAN ID\n */\n void setLanId(String lanId);\n\n /**\n * Sets ID length.\n *\n * @param idLength ID length\n */\n void setIdLength(int idLength);\n\n /**\n * Sets max area addresses.\n *\n * @param maxAreaAddresses max area addresses\n */\n void setMaxAreaAddresses(int maxAreaAddresses);\n\n /**\n * Sets reserved packet circuit type.\n *\n * @param reservedPacketCircuitType reserved packet circuit type\n */\n void setReservedPacketCircuitType(int reservedPacketCircuitType);\n\n /**\n * Sets point to point.\n *\n * @param p2p point to point\n */\n void setP2p(int p2p);\n\n /**\n * Sets area address.\n *\n * @param areaAddress area address\n */\n void setAreaAddress(String areaAddress);\n\n /**\n * Sets area length.\n *\n * @param areaLength area length\n */\n void setAreaLength(int areaLength);\n\n /**\n * Sets link state packet ID.\n *\n * @param lspId link state packet ID\n */\n void setLspId(String lspId);\n\n /**\n * Sets holding time.\n *\n * @param holdingTime holding time\n */\n void setHoldingTime(int holdingTime);\n\n /**\n * Sets priority.\n *\n * @param priority priority\n */\n void setPriority(int priority);\n\n /**\n * Sets hello interval.\n *\n * @param helloInterval hello interval\n */\n void setHelloInterval(int helloInterval);\n}",
"public Class getImplementedInterface()\n {\n // This method will be autogenerated for user classes.\n return G2__Base.class; \n }",
"public com.guidewire.datamodel.ImplementsEntityDocument.ImplementsEntity[] getImplementsEntityArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(IMPLEMENTSENTITY$8, targetList);\r\n com.guidewire.datamodel.ImplementsEntityDocument.ImplementsEntity[] result = new com.guidewire.datamodel.ImplementsEntityDocument.ImplementsEntity[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"public org.exolab.castor.mapping.ClassDescriptor getExtends()\n {\n return null;\n }",
"public org.exolab.castor.mapping.ClassDescriptor getExtends()\n {\n return null;\n }",
"public org.exolab.castor.mapping.ClassDescriptor getExtends()\n {\n return null;\n }",
"public boolean isInterface()\n {\n ensureLoaded();\n return m_flags.isInterface();\n }",
"@Override public boolean isA(InterfaceId in_interfaceId)\n {\n return (in_interfaceId == INTERFACE_ID);\n }",
"public interface eit {\n}",
"public interface IsisInterface {\n\n /**\n * Returns interface index.\n *\n * @return interface index\n */\n int interfaceIndex();\n\n /**\n * Sets interface index.\n *\n * @param interfaceIndex interface index\n */\n void setInterfaceIndex(int interfaceIndex);\n\n /**\n * Returns the interface IP address.\n *\n * @return interface IP address\n */\n Ip4Address interfaceIpAddress();\n\n /**\n * Sets the interface IP address.\n *\n * @param interfaceIpAddress interface IP address interface IP address\n */\n void setInterfaceIpAddress(Ip4Address interfaceIpAddress);\n\n /**\n * Returns the network mask.\n *\n * @return network mask\n */\n byte[] networkMask();\n\n /**\n * Sets the network mask.\n *\n * @param networkMask network mask\n */\n void setNetworkMask(byte[] networkMask);\n\n /**\n * Sets the interface MAC address.\n *\n * @param interfaceMacAddress interface MAC address\n */\n void setInterfaceMacAddress(MacAddress interfaceMacAddress);\n\n /**\n * Returns the neighbors list.\n *\n * @return neighbors list\n */\n Set<MacAddress> neighbors();\n\n /**\n * Sets intermediate system name.\n *\n * @param intermediateSystemName intermediate system name\n */\n void setIntermediateSystemName(String intermediateSystemName);\n\n /**\n * Returns system ID.\n *\n * @return systemID system ID\n */\n String systemId();\n\n /**\n * Sets system ID.\n *\n * @param systemId system ID\n */\n void setSystemId(String systemId);\n\n /**\n * Returns LAN ID.\n *\n * @return LAN ID\n */\n String l1LanId();\n\n /**\n * Sets LAN ID.\n *\n * @param lanId LAN ID\n */\n void setL1LanId(String lanId);\n\n /**\n * Returns LAN ID.\n *\n * @return LAN ID\n */\n String l2LanId();\n\n /**\n * Sets LAN ID.\n *\n * @param lanId LAN ID\n */\n void setL2LanId(String lanId);\n\n /**\n * Sets ID length.\n *\n * @param idLength ID length\n */\n void setIdLength(int idLength);\n\n /**\n * Sets max area addresses.\n *\n * @param maxAreaAddresses max area addresses\n */\n void setMaxAreaAddresses(int maxAreaAddresses);\n\n /**\n * Returns reserved packet circuit type.\n *\n * @return reserved packet circuit type\n */\n int reservedPacketCircuitType();\n\n /**\n * Sets reserved packet circuit type.\n *\n * @param reservedPacketCircuitType reserved packet circuit type\n */\n void setReservedPacketCircuitType(int reservedPacketCircuitType);\n\n /**\n * Returns point to point or broadcast.\n *\n * @return 1 if point to point, 2 broadcast\n */\n IsisNetworkType networkType();\n\n /**\n * Sets point to point.\n *\n * @param networkType point to point\n */\n void setNetworkType(IsisNetworkType networkType);\n\n /**\n * Returns area address.\n *\n * @return area address\n */\n String areaAddress();\n\n /**\n * Sets area address.\n *\n * @param areaAddress area address\n */\n void setAreaAddress(String areaAddress);\n\n /**\n * Sets area length.\n *\n * @param areaLength area length\n */\n void setAreaLength(int areaLength);\n\n /**\n * Returns holding time.\n *\n * @return holding time\n */\n int holdingTime();\n\n /**\n * Sets holding time.\n *\n * @param holdingTime holding time\n */\n void setHoldingTime(int holdingTime);\n\n /**\n * Returns priority.\n *\n * @return priority\n */\n int priority();\n\n /**\n * Sets priority.\n *\n * @param priority priority\n */\n void setPriority(int priority);\n\n /**\n * Returns hello interval.\n *\n * @return hello interval\n */\n public int helloInterval();\n\n /**\n * Sets hello interval.\n *\n * @param helloInterval hello interval\n */\n void setHelloInterval(int helloInterval);\n\n /**\n * Starts the hello timer which sends hello packet every configured seconds.\n *\n * @param channel netty channel instance\n */\n void startHelloSender(Channel channel);\n\n /**\n * Stops the hello timer which sends hello packet every configured seconds.\n */\n void stopHelloSender();\n\n /**\n * Processes an ISIS message which is received on this interface.\n *\n * @param isisMessage ISIS message instance\n * @param isisLsdb ISIS LSDB instance\n * @param channel channel instance\n */\n void processIsisMessage(IsisMessage isisMessage, IsisLsdb isisLsdb, Channel channel);\n\n /**\n * Returns the interface state.\n *\n * @return interface state\n */\n IsisInterfaceState interfaceState();\n\n /**\n * Sets the interface state.\n *\n * @param interfaceState the interface state\n */\n void setInterfaceState(IsisInterfaceState interfaceState);\n\n /**\n * Returns the LSDB instance.\n *\n * @return LSDB instance\n */\n IsisLsdb isisLsdb();\n\n /**\n * Returns intermediate system name.\n *\n * @return intermediate system name\n */\n String intermediateSystemName();\n\n /**\n * Returns the ISIS neighbor instance if exists.\n *\n * @param isisNeighborMac mac address of the neighbor router\n * @return ISIS neighbor instance if exists else null\n */\n IsisNeighbor lookup(MacAddress isisNeighborMac);\n\n /**\n * Returns circuit ID.\n *\n * @return circuit ID\n */\n String circuitId();\n\n /**\n * Sets circuit ID.\n *\n * @param circuitId circuit ID\n */\n void setCircuitId(String circuitId);\n\n /**\n * Removes neighbor from the interface neighbor map.\n *\n * @param isisNeighbor ISIS neighbor instance\n */\n void removeNeighbor(IsisNeighbor isisNeighbor);\n\n /**\n * Removes all the neighbors.\n */\n void removeNeighbors();\n}",
"public Object[] getImplementations() {\n\t\tObject[] res = { HackProjectLearner.class };\n\t\treturn res;\n\t}",
"public interface Impl extends Element.Impl {\n static final long serialVersionUID =2037286733482347462L;\n /** Get the modifier flags for this element.\n * Constrained by {@link MemberElement#getModifiersMask}.\n * @return disjunction of constants from {@link Modifier}\n */\n public int getModifiers();\n\n /** Set the modifier flags for this element.\n * @param mod disjunction of constants from {@link Modifier}\n * @throws SourceException if impossible (e.g. if <code>mod & ~ memberElt.getModifiersMask() != 0</code>)\n */\n public void setModifiers(int mod) throws SourceException;\n\n /** Get the name of this member.\n * @return the name\n */\n public Identifier getName();\n\n /** Set the name of this member.\n * @param name the name\n * @throws SourceException if impossible\n */\n public void setName(Identifier name) throws SourceException;\n }",
"@Property DOMImplementation getImplementation();",
"@Override\n\tpublic String InterfaceName() {\n\t\treturn \"b2c.order.get_delivery\";\n\t}",
"public interface Implementor {\n // 实现抽象部分需要的某些具体功能\n void operationImpl();\n}",
"public interface e {\n}",
"public interface a {\n }",
"public ClassDescriptor getExtends() {\n return _extends;\n }",
"<T> IList<T> getImplementingObjects(Class<T> interfaceType);",
"public List<InterfaceBean> readInterface() {\n\t\tlog.info(\"## readInterface() : \");\n\t\treturn sqlSelectForList(\"com.lgcns.ikep4.workflow.engine.model.InterfaceBean.readInterface\");\n\t}",
"boolean supportsImplementation(String implementationId);",
"public static HashMap getInterfaces() {\n\t\treturn interfacehashmapAlreadyImpl;\r\n\t\t\r\n\t}",
"private Vector getExtendImplement(ClassType c)\r\n {\r\n String st;\r\n Vector v = new Vector();\r\n\r\n if (c.extend.name != null && c.extend.scope == null)\r\n {\r\n st = c.extend.name.string;\r\n if (!c.unresolved.contains(st))\r\n for(Iterator iter = c.unresolved.iterator(); iter.hasNext();)\r\n {\r\n String s = (String)iter.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n v.add(st);\r\n }\r\n\r\n for(int j = 0; j < c.implement.length; j++)\r\n if (c.implement[j].scope == null)\r\n {\r\n st = c.implement[j].name.string;\r\n\r\n if (!c.unresolved.contains(st))\r\n for(Iterator iter = c.unresolved.iterator(); iter.hasNext();)\r\n {\r\n String s = (String)iter.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n if (!v.contains(st))\r\n v.add(st);\r\n }\r\n\r\n return v;\r\n }",
"@AssignableSubInterfaces(get={})\n\n@ImplementationClass(get=DistractorDevices.class)\n public interface IDistractorDevices\n extends IInjuryDevice{\n\n}",
"public interface ServConstrainsManagement {\n /**\n * Obtien la lista de componentes visuales a los cuales no tendra accesso\n * el rol (perfil) que esta operando el sistema\n * @return Lista de componentes visuales que no tiene acceso\n */\n public List<ViewConstrainsEnum> getViewConstrainsUIComponent();\n \n}",
"public String interfaceName() {\n return this.innerProperties() == null ? null : this.innerProperties().interfaceName();\n }",
"public static String getImplementString()\n\t{\n\t\treturn \"ngat.message.ISS_INST.CONFIG\";\n\t}",
"public String listenInterface() {\n return alert.listen_interface();\n }",
"public String getEndpointInterface()\r\n {\r\n return endpointInterface;\r\n }",
"@Override\r\n\tpublic Class<?> interfaceAdapted() {\n\t\treturn null;\r\n\t}",
"interface b {\n boolean eD();\n}",
"public interface IPlatform \n{\n /**\n * Main function of the interface. Returns the boolean representing if the given actor\n * can stand on it.\n * \n * @param a The entity to query\n */\n boolean canSupportEntity(Entity a);\n \n boolean bottomIsCollidable();\n}",
"public interface INotificationPresenter extends IPresenter {\n}",
"public Set<EndpointInterface> getEndpointInterfaces() {\n return endpointInterfaces;\n }",
"public interface CacheInvalidationStrategyIF {\n\t\n}",
"public interface ComposerPluginGetters$ProvidesPluginHasUserEditedContentGetter {\n @Nullable\n ComposerPluginGetters$BooleanGetter aq();\n}",
"public WhatClauseElements getWhatClauseAccess() {\n\t\treturn pWhatClause;\n\t}",
"public interface Element_itf {\n\n// Gestion de la position\n\t/** Obtenir la position\n\t * @return position la position\n\t */\n\tpublic Position getPosition();\n\n// Méthode estDestructible\n\t/** Renvoie vrai si l'élément est destructible a la position\n\t * @param position la position depuis laquelle on tente de détruire l'élément\n\t * @return true si on peut le detruire, false sinon\n\t */\n\tpublic boolean estDestructible (Position position);\n\n// Affichage du niveau\n\t/** afficher tous les détails de l'element\n\t * @return string détail de l'element\n\t */\n\tpublic String toString();\n\n}",
"public interface Specification {\n}",
"public interface IPermissions {\n}",
"public String getImplementationName();",
"@Override\n public int getImplVersion() {\n return EVOLVABLE_VERSION;\n }",
"public interface AnInterface {\n void f();\n\n void g();\n\n void h();\n}",
"public interface a extends IInterface {\n}",
"public interface i {\n}",
"@Override\n public List<AlgorithmClass> getAllImplementations() {\n return Arrays.asList(mAllImplementations);\n }",
"public interface OnPresentationListFragmentListener {\n public void onPresentationSelected();\n }"
] |
[
"0.6700378",
"0.64344096",
"0.6139996",
"0.6099222",
"0.592432",
"0.59190416",
"0.5894551",
"0.58760643",
"0.5842374",
"0.5730293",
"0.57082206",
"0.5702091",
"0.5697647",
"0.56964713",
"0.56938607",
"0.5665493",
"0.566386",
"0.5661304",
"0.56187046",
"0.5589023",
"0.55540246",
"0.5494309",
"0.5494309",
"0.5465408",
"0.54096884",
"0.5396602",
"0.53955007",
"0.53940696",
"0.5385254",
"0.53699476",
"0.53587383",
"0.5347028",
"0.5283058",
"0.5281795",
"0.52803224",
"0.5280153",
"0.52682215",
"0.52559924",
"0.5254198",
"0.51760834",
"0.51697165",
"0.5155268",
"0.5153452",
"0.51479316",
"0.5141189",
"0.5140743",
"0.5125435",
"0.51067454",
"0.5063492",
"0.5058477",
"0.50210977",
"0.4998226",
"0.49923423",
"0.49809632",
"0.49794012",
"0.4972808",
"0.4971479",
"0.4971479",
"0.4971479",
"0.49396065",
"0.49334994",
"0.49282023",
"0.49095526",
"0.4902025",
"0.48900026",
"0.48870194",
"0.48796633",
"0.48791093",
"0.48693323",
"0.48640528",
"0.48538274",
"0.48525602",
"0.48514572",
"0.48499742",
"0.484894",
"0.4842733",
"0.48360595",
"0.4822282",
"0.4814424",
"0.48114672",
"0.4810879",
"0.4810477",
"0.4809628",
"0.48033267",
"0.48015466",
"0.47593877",
"0.4733063",
"0.47313958",
"0.47280025",
"0.47262076",
"0.4716237",
"0.47149792",
"0.47138467",
"0.4713522",
"0.47059342",
"0.4698341",
"0.46956348",
"0.46926814",
"0.46897203",
"0.46826065"
] |
0.71090406
|
0
|
Gets the union object for the implements clause.
|
public NodeUnion<? extends DeclaredTypeListNode> getUnionForImplementsClause();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setUnionForImplementsClause(NodeUnion<? extends DeclaredTypeListNode> implementsClause) throws NullPointerException;",
"public NodeUnion<? extends DeclaredTypeNode> getUnionForExtendsClause();",
"public org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union getUnion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union target = null;\n target = (org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union)get_store().find_element_user(UNION$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public PipeUnion<T> getUnion();",
"public DeclaredTypeListNode getImplementsClause()throws ClassCastException;",
"public XSUnionSimpleType asUnion() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: ddiv \n // 1: fdiv \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- ---- -------------------------------------------\n // 0 2 0 this Lcom/sun/xml/xsom/impl/UnionSimpleTypeImpl;\n // \n // The error that occurred was:\n // \n // java.lang.ArrayIndexOutOfBoundsException\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }",
"public NodeUnion<? extends DeclaredTypeListNode> getUnionForBounds();",
"public NodeUnion<? extends IdentifierListNode> getUnionForTargets();",
"public Object _get_interface_def()\n {\n // First try to call the delegate implementation class's\n // \"Object get_interface_def(..)\" method (will work for JDK1.2\n // ORBs).\n // Else call the delegate implementation class's\n // \"InterfaceDef get_interface(..)\" method using reflection\n // (will work for pre-JDK1.2 ORBs).\n\n throw new NO_IMPLEMENT(reason);\n }",
"UnionSecuenciaLuz createUnionSecuenciaLuz();",
"public NodeUnion<? extends T> getUnionForModifiers();",
"public Enumeration getImplements()\n {\n ensureLoaded();\n return m_tblInterface.keys();\n }",
"Interface_decl getInterface();",
"org.omg.CORBA.Object _get_interface_def();",
"public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }",
"public interface Union0<First> {\n /**\n * Executes one of the continuations depending on the element type\n */\n void continued(Consumer<First> continuationFirst);\n\n /**\n * Transforms the element in the union to a new type\n * \n * @param <R> result type\n * @return an object of the result type\n */\n <R> R join(Function<First, R> mapFirst);\n\n /**\n * Creator class for Union1\n */\n interface Factory<First> {\n /**\n * Creates a Union0 wrapping a value\n * \n * @param single the value\n * @return a Union0 object wrapping the value\n */\n Union0<First> first(First single);\n }\n}",
"public T caseUnion(Union object) {\n\t\treturn null;\n\t}",
"public NodeUnion<? extends ClassBodyNode> getUnionForBody();",
"BUnion createBUnion();",
"Interface getInterface();",
"Interface getInterface();",
"public org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union addNewUnion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union target = null;\n target = (org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union)get_store().add_element_user(UNION$0);\n return target;\n }\n }",
"UnionCancionSecuencia createUnionCancionSecuencia();",
"public void setImplementsClause(DeclaredTypeListNode implementsClause);",
"public abstract Object getInterface(String strInterfaceName_p, Object oObject_p) throws Exception;",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] getImplementsInterfaceArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(IMPLEMENTSINTERFACE$10, targetList);\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] result = new com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"void union(int p, int q) {}",
"List<ProtocolPo> queryByUnion(ProtocolPo query);",
"public Object getUnion(int vectorIndex) {\n UnionVector vector = (UnionVector) table.getVector(vectorIndex);\n return vector.getObject(rowNumber);\n }",
"public NodeUnion<? extends IdentifierNode> getUnionForIdentifier();",
"String getInterfaces();",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface addNewImplementsInterface()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface target = null;\r\n target = (com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface)get_store().add_element_user(IMPLEMENTSINTERFACE$10);\r\n return target;\r\n }\r\n }",
"public Class getImplementedInterface()\n {\n // This method will be autogenerated for user classes.\n return G2__Base.class; \n }",
"public interface In extends Clause {}",
"public String getUnionAnthor() {\n return unionAnthor;\n }",
"public static info.guardianproject.otr.app.im.plugin.IPresenceMapping asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof info.guardianproject.otr.app.im.plugin.IPresenceMapping))) {\nreturn ((info.guardianproject.otr.app.im.plugin.IPresenceMapping)iin);\n}\nreturn new info.guardianproject.otr.app.im.plugin.IPresenceMapping.Stub.Proxy(obj);\n}",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface getImplementsInterfaceArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface target = null;\r\n target = (com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface)get_store().find_element_user(IMPLEMENTSINTERFACE$10, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }",
"@Override\n public org.omg.CORBA.Object _get_interface_def()\n {\n if (interfaceDef != null)\n return interfaceDef;\n else\n return super._get_interface_def();\n }",
"@Override\n public boolean supportsUnionAll() {\n return true;\n }",
"@Override\r\n protected void reflectRelationOnUnionQuery(ConditionQuery bq, ConditionQuery uq) {\r\n String msg = \"InlineView must not need UNION method: \" + bq + \" : \" + uq;\r\n throw new IllegalConditionBeanOperationException(msg);\r\n }",
"public void setUnionForExtendsClause(NodeUnion<? extends DeclaredTypeNode> extendsClause) throws NullPointerException;",
"public T caseInterface(Interface object)\n {\n return null;\n }",
"IInterfaceDefinition[] resolveImplementedInterfaces(ICompilerProject project);",
"public static Interface getInterface() {\n return null;\n }",
"Object getIf();",
"public NodeUnion<? extends TypeParameterListNode> getUnionForTypeParameters();",
"Set<Interface> getInterfaces();",
"public interface u {\n t a();\n}",
"public interface RegionalRecordManipulator extends RegionalRecordManipulatorOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}",
"public Bag union(Bag u) {\n return u;\n }",
"public T caseImplementation(Implementation object)\n {\n return null;\n }",
"public AIDLInterface getInterface()\n\t{\n\t\t//System.out.println(\"---- mInterface -----\" + mInterface);\n\t\treturn mInterface;\n\t}",
"public interface Implementor {\n // 实现抽象部分需要的某些具体功能\n void operationImpl();\n}",
"UnionTypeDefinition createUnionTypeDefinition();",
"@Override\r\n\tpublic Class<?> interfaceAdapted() {\n\t\treturn null;\r\n\t}",
"public boolean supportsUnionAll() {\n \t\treturn false;\n \t}",
"public interface InterFace2 extends InterFace2Operations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}",
"@Override\n\tpublic <T> T unwrap(java.lang.Class<T> iface) \n throws java.sql.SQLException {\n return null;\n }",
"public abstract Class<?> getImplementation();",
"public InclusionOrExclusionType getInterfacesInclusionOrExclusionType() {\n return interfacesInclusionOrExclusionType;\n }",
"public Object getUnion(String columnName) {\n UnionVector vector = (UnionVector) table.getVector(columnName);\n return vector.getObject(rowNumber);\n }",
"public interface Vehiculos extends VehiculosOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}",
"public final void mT__79() throws RecognitionException {\n try {\n int _type = T__79;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalMyDsl.g:77:7: ( 'union' )\n // InternalMyDsl.g:77:9: 'union'\n {\n match(\"union\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public java.lang.CharSequence getUnionString() {\n return unionString;\n }",
"public interface Ops extends OpsOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}",
"public java.lang.CharSequence getUnionString() {\n return unionString;\n }",
"@Override\r\n\t\t\tpublic <T> T unwrap(Class<T> iface) throws SQLException {\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic <T> T unwrap(Class<T> iface) throws SQLException {\n\t\t\t\treturn null;\r\n\t\t\t}",
"public static com.sogou.speech.wakeup.wakeupservice.IWakeupService asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof com.sogou.speech.wakeup.wakeupservice.IWakeupService))) {\nreturn ((com.sogou.speech.wakeup.wakeupservice.IWakeupService)iin);\n}\nreturn new com.sogou.speech.wakeup.wakeupservice.IWakeupService.Stub.Proxy(obj);\n}",
"public abstract List<AbstractNodeTypeImplementation> getImplementations();",
"public interface IORPersistenceImplementor {\n\n\t/**\n\t * Adds an annotated class which will be used as OR-class to map into the\n\t * database.\n\t * \n\t * @param clazz\n\t * the clazz which is annotated\n\t */\n\tvoid addAnnotatedClass( Class clazz );\n\n\t/**\n\t * Insert command.\n\t * \n\t * @param entity\n\t * the entity to insert something\n\t * @return true, if successful\n\t */\n\tboolean insert( Object entity );\n\n\t/**\n\t * Update command.\n\t * \n\t * @return true, if successful\n\t */\n\tboolean update();\n\n\t/**\n\t * Query sql command.\n\t * \n\t * @param queryString\n\t * the string to query something from database\n\t * @return the list of matched objects\n\t */\n\tList< Object > querySQL( String queryString );\n\n\t/**\n\t * Delete command.\n\t * \n\t * @return true, if successful\n\t */\n\tboolean delete();\n}",
"public static com.gofun.voice.IGFVoiceWakeupListener asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof com.gofun.voice.IGFVoiceWakeupListener))) {\nreturn ((com.gofun.voice.IGFVoiceWakeupListener)iin);\n}\nreturn new com.gofun.voice.IGFVoiceWakeupListener.Stub.Proxy(obj);\n}",
"@SuppressWarnings(\"rawtypes\")\n\tpublic List getInterfaces(){\n\t\treturn targetClass.interfaces;\n\t}",
"public Object getDenseUnion(int vectorIndex) {\n DenseUnionVector vector = (DenseUnionVector) table.getVector(vectorIndex);\n return vector.getObject(rowNumber);\n }",
"public String getInterfaceName();",
"public T caseUnionRule(UnionRule object)\n {\n return null;\n }",
"public String getImplementation()\n {\n return implementation;\n }",
"public interface DatabaseCondition extends SQLObject {\n \n}",
"@SuppressWarnings(\"null\")\n private ServiceInterface3 getDefaultImplFromReference() throws InvalidSyntaxException {\n Collection<ServiceReference<ServiceInterface3>> references = bundleContext.getServiceReferences(ServiceInterface3.class, \"(!(prop1=abc))\");\n ServiceInterface3 service = bundleContext.getService(references.iterator().next());\n return ((ServiceInterface3ImplSelfReferencing)service).getDefaultImplementation();\n }",
"public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }",
"public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }",
"public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }",
"protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) {\r\n }",
"@Override\r\n\tpublic <T> T unwrap(Class<T> iface) throws SQLException {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic <T> T unwrap(Class<T> iface) throws SQLException {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic <T> T unwrap(Class<T> iface) throws SQLException {\n\t\treturn null;\r\n\t}",
"public List<ClassOrInterfaceDeclaration> getInterfaces() {\n return this.clsOrInterfDeclrs;\n }",
"private ExtractorBuilder getBuilder(Annotation label) throws Exception {\r\n if(label instanceof ElementUnion) {\r\n return new ExtractorBuilder(ElementUnion.class, ElementExtractor.class);\r\n }\r\n if(label instanceof ElementListUnion) {\r\n return new ExtractorBuilder(ElementListUnion.class, ElementListExtractor.class);\r\n }\r\n if(label instanceof ElementMapUnion) {\r\n return new ExtractorBuilder(ElementMapUnion.class, ElementMapExtractor.class);\r\n }\r\n throw new PersistenceException(\"Annotation %s is not a union\", label);\r\n }",
"private Vector getExtendImplement(ClassType c)\r\n {\r\n String st;\r\n Vector v = new Vector();\r\n\r\n if (c.extend.name != null && c.extend.scope == null)\r\n {\r\n st = c.extend.name.string;\r\n if (!c.unresolved.contains(st))\r\n for(Iterator iter = c.unresolved.iterator(); iter.hasNext();)\r\n {\r\n String s = (String)iter.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n v.add(st);\r\n }\r\n\r\n for(int j = 0; j < c.implement.length; j++)\r\n if (c.implement[j].scope == null)\r\n {\r\n st = c.implement[j].name.string;\r\n\r\n if (!c.unresolved.contains(st))\r\n for(Iterator iter = c.unresolved.iterator(); iter.hasNext();)\r\n {\r\n String s = (String)iter.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n if (!v.contains(st))\r\n v.add(st);\r\n }\r\n\r\n return v;\r\n }",
"public interface Universal {\n supprotBrands();\n}",
"@Override\n\tpublic <T> T unwrap(Class<T> iface) throws SQLException {\n\t\treturn null;\n\t}",
"public Interval getUnionWith(Interval i){\n\t\t\n\t\t//Assumes that are adjacent\n\t\treturn new Interval(\n\t\t\t\t\tmin(leftbound, i.getLeftBound()),\n\t\t\t\t\tmax(rightbound, i.getRightBound())\n\t\t\t\t);\n\t\t\n\t\t\n\t}",
"public static com.itheima.alipay.IALiPayService asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof com.itheima.alipay.IALiPayService))) {\nreturn ((com.itheima.alipay.IALiPayService)iin);\n}\nreturn new com.itheima.alipay.IALiPayService.Stub.Proxy(obj);\n}",
"public ORB _orb() {\n throw new NO_IMPLEMENT(reason);\n }",
"public interface CurrentMaintenanceOperationIterator_I extends CurrentMaintenanceOperationIterator_IOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}",
"public String getUnionid() {\n return unionid;\n }",
"public String getUnionid() {\n return unionid;\n }",
"public String getUnionid() {\n return unionid;\n }",
"public CreateUnionResponse createUnion(CreateUnionRequest request) throws GPUdbException {\n CreateUnionResponse actualResponse_ = new CreateUnionResponse();\n submitRequest(\"/create/union\", request, actualResponse_, false);\n return actualResponse_;\n }",
"interface U {\n public void A() ;\n public void B() ;\n public void C() ;\n}"
] |
[
"0.6883017",
"0.6363261",
"0.63318825",
"0.62947035",
"0.6150482",
"0.57895774",
"0.5693686",
"0.56599486",
"0.5589029",
"0.55446595",
"0.5383242",
"0.53793913",
"0.5349474",
"0.53396803",
"0.5327891",
"0.5318201",
"0.53168285",
"0.5307277",
"0.52991146",
"0.5266483",
"0.5266483",
"0.5211613",
"0.5158715",
"0.51575595",
"0.515712",
"0.5150335",
"0.51360357",
"0.50947404",
"0.5089134",
"0.5044533",
"0.50295985",
"0.49963337",
"0.4994187",
"0.49865317",
"0.4973625",
"0.49529767",
"0.49492344",
"0.4926307",
"0.49132696",
"0.48844928",
"0.48523337",
"0.48385063",
"0.4836165",
"0.48335567",
"0.48220098",
"0.48184714",
"0.4815843",
"0.4814605",
"0.47693077",
"0.47452202",
"0.47438073",
"0.47328153",
"0.47325298",
"0.4730916",
"0.47307098",
"0.47305644",
"0.47057137",
"0.47026914",
"0.4699145",
"0.4664543",
"0.46628398",
"0.46609342",
"0.46529928",
"0.46490207",
"0.46454883",
"0.4639551",
"0.4636825",
"0.4636825",
"0.46365",
"0.4626199",
"0.4618167",
"0.45993853",
"0.4594804",
"0.45913145",
"0.45823145",
"0.45816275",
"0.45815587",
"0.4572674",
"0.45672965",
"0.45672673",
"0.45672673",
"0.45672673",
"0.45646828",
"0.45450872",
"0.45450872",
"0.45450872",
"0.45447835",
"0.4544713",
"0.45351195",
"0.45244303",
"0.45226902",
"0.45212838",
"0.4514732",
"0.45132196",
"0.4509663",
"0.45058024",
"0.45058024",
"0.45058024",
"0.449958",
"0.44952938"
] |
0.77485347
|
0
|
Changes the implements clause.
|
public void setImplementsClause(DeclaredTypeListNode implementsClause);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\tpublic void implements_(JDefinedClass cls) {\n\n\t}",
"public void addImplements(String sInterface)\n {\n ensureLoaded();\n m_tblInterface.put(sInterface.replace('.', '/'), new ClassConstant(sInterface));\n setModified(true);\n }",
"public DeclaredTypeListNode getImplementsClause()throws ClassCastException;",
"public void setUnionForImplementsClause(NodeUnion<? extends DeclaredTypeListNode> implementsClause) throws NullPointerException;",
"public Enumeration getImplements()\n {\n ensureLoaded();\n return m_tblInterface.keys();\n }",
"@Override\n public boolean isInterface() { return false; }",
"private void interfaceDeclaration(Modifier modify, Scope scope, String basename)\r\n {\r\n HashSet dummy = unresolved;\r\n ClassType x = new ClassType();\r\n x.modify = (x.modify & ~Keyword.CLASSSY.value) | Keyword.INTERFACESY.value;\r\n unresolved = x.unresolved;\r\n\r\n if (comment != null && comment.length() > 0)\r\n {\r\n x.comment = comment + '\\n';\r\n resetComment();\r\n }\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n matchKeyword(Keyword.INTERFACESY);\r\n\r\n x.name = nextToken;\r\n\r\n //if (basename.compareTo(nextToken.string) != 0 && basename.length() > 0)\r\n // modify.access &= ~Keyword.PUBLICSY.value;\r\n\r\n modify.check(modify.interfaces | modify.access & (basename.compareToIgnoreCase(nextToken.string) != 0 && basename.length() > 0?~Keyword.PUBLICSY.value:-1));\r\n\r\n matchKeyword(Keyword.IDENTSY);\r\n\r\n declMember(scope, x);\r\n\r\n if (nextSymbol == Keyword.EXTENDSSY)\r\n {\r\n lookAhead();\r\n x.implement = typeList();\r\n }\r\n else\r\n x.implement = new ClassType[0];\r\n\r\n x.extend = new ClassType(\"Object\");//!!!!!!!!!!!!!!!!!!!\r\n x.scope = new Scope(scope, Scope.heap, x.name.string);\r\n\r\n if ((modify.cur & modify.constructors) == 0)\r\n modify.cur |= Keyword.PUBLICSY.value & modify.access;\r\n\r\n interfaceBody(modify, x);\r\n\r\n unresolved = dummy;\r\n writeList(x);\r\n }",
"public boolean implementsInterface(Class<?> ifType) {\n boolean result = false;\n\n if (ifList.contains(ifType)) {\n result = true;\n }\n return result;\n }",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface addNewImplementsInterface()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface target = null;\r\n target = (com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface)get_store().add_element_user(IMPLEMENTSINTERFACE$10);\r\n return target;\r\n }\r\n }",
"@Override\n\tpublic void add() {\n\t\tSystem.out.println(\"This is an implemented interface\");\n\t}",
"public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }",
"@Override\n\tpublic boolean isImplemented() {\n\t\treturn false;\n\t}",
"public final void mT__107() throws RecognitionException {\n try {\n int _type = T__107;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:77:8: ( 'implements-interfaces' )\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:77:10: 'implements-interfaces'\n {\n match(\"implements-interfaces\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public boolean isInterface();",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] getImplementsInterfaceArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(IMPLEMENTSINTERFACE$10, targetList);\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] result = new com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"public interface a extends IInterface {\n}",
"public interface PhrasingContent extends ContentInterface {\r\n\r\n}",
"public void setImplementsInterfaceArray(int i, com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface implementsInterface)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface target = null;\r\n target = (com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface)get_store().find_element_user(IMPLEMENTSINTERFACE$10, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n target.set(implementsInterface);\r\n }\r\n }",
"@Override\n public List<JavaType> getInterfaces() {\n return ImmutableList.of();\n }",
"@AssignableSubInterfaces(get={})\n\n@ImplementationClass(get=Brain.class)\n public interface IBrain\n extends ICentralNervousSystem{\n\n}",
"public interface IsisInterface {\n\n /**\n * Sets interface index.\n *\n * @param interfaceIndex interface index\n */\n void setInterfaceIndex(int interfaceIndex);\n\n /**\n * Sets intermediate system name.\n *\n * @param intermediateSystemName intermediate system name\n */\n void setIntermediateSystemName(String intermediateSystemName);\n\n /**\n * Sets system ID.\n *\n * @param systemId system ID\n */\n void setSystemId(String systemId);\n\n /**\n * Sets LAN ID.\n *\n * @param lanId LAN ID\n */\n void setLanId(String lanId);\n\n /**\n * Sets ID length.\n *\n * @param idLength ID length\n */\n void setIdLength(int idLength);\n\n /**\n * Sets max area addresses.\n *\n * @param maxAreaAddresses max area addresses\n */\n void setMaxAreaAddresses(int maxAreaAddresses);\n\n /**\n * Sets reserved packet circuit type.\n *\n * @param reservedPacketCircuitType reserved packet circuit type\n */\n void setReservedPacketCircuitType(int reservedPacketCircuitType);\n\n /**\n * Sets point to point.\n *\n * @param p2p point to point\n */\n void setP2p(int p2p);\n\n /**\n * Sets area address.\n *\n * @param areaAddress area address\n */\n void setAreaAddress(String areaAddress);\n\n /**\n * Sets area length.\n *\n * @param areaLength area length\n */\n void setAreaLength(int areaLength);\n\n /**\n * Sets link state packet ID.\n *\n * @param lspId link state packet ID\n */\n void setLspId(String lspId);\n\n /**\n * Sets holding time.\n *\n * @param holdingTime holding time\n */\n void setHoldingTime(int holdingTime);\n\n /**\n * Sets priority.\n *\n * @param priority priority\n */\n void setPriority(int priority);\n\n /**\n * Sets hello interval.\n *\n * @param helloInterval hello interval\n */\n void setHelloInterval(int helloInterval);\n}",
"public void setImplementsInterfaceArray(com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] implementsInterfaceArray)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n arraySetterHelper(implementsInterfaceArray, IMPLEMENTSINTERFACE$10);\r\n }\r\n }",
"public interface a {\n }",
"public void removeImplements(String sInterface)\n {\n ensureLoaded();\n m_tblInterface.remove(sInterface.replace('.', '/'));\n setModified(true);\n }",
"public interface Implementor {\n // 实现抽象部分需要的某些具体功能\n void operationImpl();\n}",
"public interface Understandability extends Usability {\n}",
"@AssignableSubInterfaces(get={})\n\n@ImplementationClass(get=DistractorDevices.class)\n public interface IDistractorDevices\n extends IInjuryDevice{\n\n}",
"boolean isDeclaredInInterface() {\n return (declaringClass != null) && (declaringClass.isInterface());\n }",
"public final List<String> implements_list() throws RecognitionException {\n List<String> implementsList = null;\n\n\n String implements_spec13 = null;\n\n List<String> typeList;\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:207:3: ( ( implements_spec )* )\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:207:5: ( implements_spec )*\n {\n typeList = Lists.newArrayList();\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:208:5: ( implements_spec )*\n loop2:\n while (true) {\n int alt2 = 2;\n int LA2_0 = input.LA(1);\n if ((LA2_0 == I_IMPLEMENTS)) {\n alt2 = 1;\n }\n\n switch (alt2) {\n case 1:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:208:6: implements_spec\n {\n pushFollow(FOLLOW_implements_spec_in_implements_list184);\n implements_spec13 = implements_spec();\n state._fsp--;\n\n typeList.add(implements_spec13);\n }\n break;\n\n default:\n break loop2;\n }\n }\n\n\n if (typeList.size() > 0) {\n implementsList = typeList;\n } else {\n implementsList = null;\n }\n\n }\n\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return implementsList;\n }",
"public interface e {\n}",
"public Object _get_interface_def()\n {\n // First try to call the delegate implementation class's\n // \"Object get_interface_def(..)\" method (will work for JDK1.2\n // ORBs).\n // Else call the delegate implementation class's\n // \"InterfaceDef get_interface(..)\" method using reflection\n // (will work for pre-JDK1.2 ORBs).\n\n throw new NO_IMPLEMENT(reason);\n }",
"public void setInterfaces(String[] interfaces)\n {\n this.interfaces = interfaces;\n }",
"public interface Changed extends Editable.Changed\n {\n }",
"public static void set_InterfaceDecl(String v) throws RuntimeException\n {\n UmlCom.send_cmd(CmdFamily.javaSettingsCmd, JavaSettingsCmd._setJavaInterfaceDeclCmd, v);\n UmlCom.check();\n \n _interface_decl = v;\n \n }",
"public interface interfaceA extends LocationListener, SensorEventListener {\n}",
"public void interfaceMethod() {\n\t\tSystem.out.println(\"overriden method from interface\");\t\t\r\n\t}",
"public void removeImplementsInterface(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(IMPLEMENTSINTERFACE$10, i);\r\n }\r\n }",
"private void setInterfaces() {\n\t\tif (interfaceNames == null) {\n\t\t\treturn;\n\t\t}\n\t\tif (interfaces != null) {\n\t\t\treturn;\n\t\t}\n\t\tinterfaces = new HashMap();\n\t\tfor (int i = 0; i < interfaceNames.length; i++) {\n\t\t\tBCClass _interface =\n\t\t\t\tJavaApplication.Application.getClass(interfaceNames[i]);\n\t\t\tinterfaces.put(interfaceNames[i], _interface);\n\t\t}\n\t}",
"public final String implements_spec() throws RecognitionException {\n String type = null;\n\n\n CommonTree CLASS_DESCRIPTOR12 = null;\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:200:3: ( ^( I_IMPLEMENTS CLASS_DESCRIPTOR ) )\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:200:5: ^( I_IMPLEMENTS CLASS_DESCRIPTOR )\n {\n match(input, I_IMPLEMENTS, FOLLOW_I_IMPLEMENTS_in_implements_spec152);\n match(input, Token.DOWN, null);\n CLASS_DESCRIPTOR12 = (CommonTree) match(input, CLASS_DESCRIPTOR, FOLLOW_CLASS_DESCRIPTOR_in_implements_spec154);\n match(input, Token.UP, null);\n\n\n type = (CLASS_DESCRIPTOR12 != null ? CLASS_DESCRIPTOR12.getText() : null);\n\n }\n\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return type;\n }",
"public interface C21597a {\n }",
"interface NewInterface extends Interface1,Interface2,Interface3{\n\n\tpublic void getD();\n\n}",
"public interface IOverride extends IMeasurement_descriptor{\n\n\tpublic IRI iri();\n\n}",
"public interface C0385a {\n }",
"public interface i {\n}",
"public interface AnInterface {\n void f();\n\n void g();\n\n void h();\n}",
"private boolean interfaceImplementsInterface(AClass ith) {\n\t\tEnumeration e = getImplements();\n\t\twhile (e.hasMoreElements()) {\n\t\t\tAClass i = ((Type) e.nextElement()).getRefType();\n\t\t\tif (i == ith) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (i.interfaceImplementsInterface(ith)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"IInterfaceDefinition[] resolveImplementedInterfaces(ICompilerProject project);",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public interface a {\n void a();\n }",
"public interface a {\n void a();\n }",
"public interface IBibliotheque {\n\t// Start of user code (user defined attributes for IBibliotheque)\n\n\t// End of user code\n\n\t/**\n\t * Description of the method listeDesEmpruntsEnCours.\n\t */\n\tpublic void listeDesEmpruntsEnCours();\n\n\t// Start of user code (user defined methods for IBibliotheque)\n\n\t// End of user code\n\n}",
"@SuppressWarnings(\"rawtypes\")\n\tpublic List getInterfaces(){\n\t\treturn targetClass.interfaces;\n\t}",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface insertNewImplementsInterface(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface target = null;\r\n target = (com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface)get_store().insert_element_user(IMPLEMENTSINTERFACE$10, i);\r\n return target;\r\n }\r\n }",
"public interface eit {\n}",
"public interface Test {\n}",
"interface Iface {\n void usedIface();\n}",
"ISModifyInterface createISModifyInterface();",
"@ImplementationClass(get=SensoryTest.class)\n\n@AssignableSubInterfaces(get={IAdhesiveRemovalTest.class, IHindpawSensationTest.class, })\n public interface ISensoryTest\n extends IFunctionalTest{\n\n}",
"public void buildImplementedInterfacesInfo() {\n\t\twriter.writeImplementedInterfacesInfo();\n\t}",
"public interface AInterface {\n\n public void say();\n\n}",
"@Override\n\tpublic void subtract() {\n\t\tSystem.out.println(\"This is an implementation of an interface\");\n\t}",
"public interface In extends Clause {}",
"public interface A {\n void f();\n}",
"String getInterfaces();",
"private static void includeInterfacesFromExtension(Environment result, Environment extEnv, Environment base)\n \t{\n \t\tfor(IInterfaceDefinition iDef : extEnv.getInterfaces())\n \t\t\tif (!willGenerateExtentionFor(iDef, base))\n \t\t\t\tresult.getInterfaces().add(iDef);\n \n \t}",
"@Override\r\n\tpublic Class<?> interfaceAdapted() {\n\t\treturn null;\r\n\t}",
"interface Test4{\r\n\tpublic void m1();\r\n}",
"public interface IfcFaceOuterBound extends IfcFaceBound {\n}",
"public interface B extends A {\n void b();\n}",
"Set<Interface> getInterfaces();",
"public interface IAnswer extends IComment{\r\n\t\r\n\t\r\n}",
"public interface IFaci {\n}",
"public interface EventDefinition extends EObject {\r\n}",
"public interface AdditionalOperations extends Statements {\n}",
"public interface AdapterInterface {\n}",
"@Override\n public org.omg.CORBA.Object _get_interface_def()\n {\n if (interfaceDef != null)\n return interfaceDef;\n else\n return super._get_interface_def();\n }",
"void ModifyInterface(AirPollution airPollution);",
"public interface b {\n void a();\n }",
"public interface b {\n void a();\n }",
"interface Hi {\n // MUST BE IMPLEMENTED IN IMPLEMENTING CLASS!!\n void Okay(String q);\n}",
"public interface AbstractC2502fH1 extends IInterface {\n}",
"public interface IEvenListener {\n}",
"public static boolean implementsCompatible(Mode actual, Mode formal) {\n boolean result;\n\n if (formal.equals(REASSIGNS) || actual.equals(REASSIGNS)) {\n result = true;\n }\n else {\n if (formal.equals(UPDATES)) {\n result = updatesImplementsCompatible(actual);\n }\n else if (formal.equals(ALTERS)) {\n result = altersImplementsCompatible(actual);\n }\n else if (formal.equals(REPLACES)) {\n result = replacesImplementsCompatible(actual);\n }\n else if (formal.equals(CLEARS)) {\n result = clearsImplementsCompatible(actual);\n }\n else if (formal.equals(RESTORES)) {\n result = restoresImplementsCompatible(actual);\n }\n else if (formal.equals(PRESERVES)) {\n result = preservesImplementsCompatible(actual);\n }\n else if (formal.equals(EVALUATES)) {\n result = evaluatesImplementsCompatible(actual);\n }\n else if (formal.equals(REASSIGNS)) {\n result = evaluatesImplementsCompatible(actual);\n }\n else {\n result = false;\n }\n }\n return result;\n }",
"public interface IInventoryObject extends IID\n{\n}",
"public interface IGosuStatementList extends IGosuStatement, PsiCodeBlock\n{\n}",
"public interface IPermissions {\n}",
"public interface C19588a {\n }",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface getImplementsInterfaceArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface target = null;\r\n target = (com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface)get_store().find_element_user(IMPLEMENTSINTERFACE$10, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }",
"public interface EntradaPontosDAO extends EntradaPontosSQL{\n\n}",
"Interface_decl getInterface();",
"public interface hp extends Menu {\n}",
"public void setInterface(Class aInterface) { theInterface = aInterface ; }",
"public abstract boolean hasInterface(String strInterfaceName_p);",
"interface C34503a {\n void bMl();\n }",
"public interface OnConnectionOptionSelected {\r\n public void onDownloadSelected();\r\n public void onUploadSelected();\r\n}",
"public interface b {\n}",
"public interface b {\n}",
"public interface SimpleInterface {\n void f();\n}",
"public interface Listener {}",
"public void setImplementsEntityArray(int i, com.guidewire.datamodel.ImplementsEntityDocument.ImplementsEntity implementsEntity)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ImplementsEntityDocument.ImplementsEntity target = null;\r\n target = (com.guidewire.datamodel.ImplementsEntityDocument.ImplementsEntity)get_store().find_element_user(IMPLEMENTSENTITY$8, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n target.set(implementsEntity);\r\n }\r\n }"
] |
[
"0.6863674",
"0.6339385",
"0.63383836",
"0.63131005",
"0.62537843",
"0.6148563",
"0.60698205",
"0.60432",
"0.6022255",
"0.6004779",
"0.5913834",
"0.5903366",
"0.5873373",
"0.5796808",
"0.57661635",
"0.5750375",
"0.57477856",
"0.5734019",
"0.57205945",
"0.57136273",
"0.57080805",
"0.5695288",
"0.5663723",
"0.56541944",
"0.5632892",
"0.5628958",
"0.56100667",
"0.5603158",
"0.55843544",
"0.557103",
"0.5566728",
"0.5559461",
"0.5557623",
"0.5538798",
"0.55096096",
"0.5497035",
"0.54801583",
"0.5461842",
"0.5450653",
"0.5446409",
"0.5431013",
"0.54273045",
"0.5423974",
"0.5422858",
"0.54205024",
"0.54117614",
"0.5409855",
"0.54020727",
"0.53924763",
"0.53924763",
"0.5391411",
"0.5388337",
"0.53856623",
"0.53830343",
"0.5382661",
"0.53823954",
"0.537854",
"0.53712875",
"0.5366421",
"0.53632957",
"0.5361654",
"0.53480035",
"0.53443927",
"0.5338234",
"0.5325342",
"0.5315718",
"0.53057456",
"0.53043485",
"0.5299085",
"0.52895993",
"0.5287312",
"0.5286288",
"0.52765083",
"0.5268925",
"0.52665615",
"0.5265103",
"0.5264027",
"0.5262771",
"0.5262771",
"0.5261471",
"0.5256593",
"0.5253663",
"0.52451843",
"0.52416724",
"0.52414566",
"0.5230924",
"0.5230344",
"0.5230151",
"0.5224675",
"0.52243394",
"0.52084625",
"0.5206502",
"0.52039886",
"0.52006894",
"0.5196126",
"0.51939374",
"0.51939374",
"0.5188761",
"0.51871026",
"0.51827174"
] |
0.6927022
|
0
|
Changes the implements clause.
|
public void setUnionForImplementsClause(NodeUnion<? extends DeclaredTypeListNode> implementsClause) throws NullPointerException;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setImplementsClause(DeclaredTypeListNode implementsClause);",
"@Override\n\tpublic void implements_(JDefinedClass cls) {\n\n\t}",
"public void addImplements(String sInterface)\n {\n ensureLoaded();\n m_tblInterface.put(sInterface.replace('.', '/'), new ClassConstant(sInterface));\n setModified(true);\n }",
"public DeclaredTypeListNode getImplementsClause()throws ClassCastException;",
"public Enumeration getImplements()\n {\n ensureLoaded();\n return m_tblInterface.keys();\n }",
"@Override\n public boolean isInterface() { return false; }",
"private void interfaceDeclaration(Modifier modify, Scope scope, String basename)\r\n {\r\n HashSet dummy = unresolved;\r\n ClassType x = new ClassType();\r\n x.modify = (x.modify & ~Keyword.CLASSSY.value) | Keyword.INTERFACESY.value;\r\n unresolved = x.unresolved;\r\n\r\n if (comment != null && comment.length() > 0)\r\n {\r\n x.comment = comment + '\\n';\r\n resetComment();\r\n }\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n matchKeyword(Keyword.INTERFACESY);\r\n\r\n x.name = nextToken;\r\n\r\n //if (basename.compareTo(nextToken.string) != 0 && basename.length() > 0)\r\n // modify.access &= ~Keyword.PUBLICSY.value;\r\n\r\n modify.check(modify.interfaces | modify.access & (basename.compareToIgnoreCase(nextToken.string) != 0 && basename.length() > 0?~Keyword.PUBLICSY.value:-1));\r\n\r\n matchKeyword(Keyword.IDENTSY);\r\n\r\n declMember(scope, x);\r\n\r\n if (nextSymbol == Keyword.EXTENDSSY)\r\n {\r\n lookAhead();\r\n x.implement = typeList();\r\n }\r\n else\r\n x.implement = new ClassType[0];\r\n\r\n x.extend = new ClassType(\"Object\");//!!!!!!!!!!!!!!!!!!!\r\n x.scope = new Scope(scope, Scope.heap, x.name.string);\r\n\r\n if ((modify.cur & modify.constructors) == 0)\r\n modify.cur |= Keyword.PUBLICSY.value & modify.access;\r\n\r\n interfaceBody(modify, x);\r\n\r\n unresolved = dummy;\r\n writeList(x);\r\n }",
"public boolean implementsInterface(Class<?> ifType) {\n boolean result = false;\n\n if (ifList.contains(ifType)) {\n result = true;\n }\n return result;\n }",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface addNewImplementsInterface()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface target = null;\r\n target = (com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface)get_store().add_element_user(IMPLEMENTSINTERFACE$10);\r\n return target;\r\n }\r\n }",
"@Override\n\tpublic void add() {\n\t\tSystem.out.println(\"This is an implemented interface\");\n\t}",
"public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }",
"@Override\n\tpublic boolean isImplemented() {\n\t\treturn false;\n\t}",
"public final void mT__107() throws RecognitionException {\n try {\n int _type = T__107;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:77:8: ( 'implements-interfaces' )\n // ../org.sqlproc.meta/src-gen/org/sqlproc/meta/parser/antlr/internal/InternalProcessorMeta.g:77:10: 'implements-interfaces'\n {\n match(\"implements-interfaces\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public boolean isInterface();",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] getImplementsInterfaceArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(IMPLEMENTSINTERFACE$10, targetList);\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] result = new com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"public interface a extends IInterface {\n}",
"public interface PhrasingContent extends ContentInterface {\r\n\r\n}",
"public void setImplementsInterfaceArray(int i, com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface implementsInterface)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface target = null;\r\n target = (com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface)get_store().find_element_user(IMPLEMENTSINTERFACE$10, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n target.set(implementsInterface);\r\n }\r\n }",
"@Override\n public List<JavaType> getInterfaces() {\n return ImmutableList.of();\n }",
"@AssignableSubInterfaces(get={})\n\n@ImplementationClass(get=Brain.class)\n public interface IBrain\n extends ICentralNervousSystem{\n\n}",
"public interface IsisInterface {\n\n /**\n * Sets interface index.\n *\n * @param interfaceIndex interface index\n */\n void setInterfaceIndex(int interfaceIndex);\n\n /**\n * Sets intermediate system name.\n *\n * @param intermediateSystemName intermediate system name\n */\n void setIntermediateSystemName(String intermediateSystemName);\n\n /**\n * Sets system ID.\n *\n * @param systemId system ID\n */\n void setSystemId(String systemId);\n\n /**\n * Sets LAN ID.\n *\n * @param lanId LAN ID\n */\n void setLanId(String lanId);\n\n /**\n * Sets ID length.\n *\n * @param idLength ID length\n */\n void setIdLength(int idLength);\n\n /**\n * Sets max area addresses.\n *\n * @param maxAreaAddresses max area addresses\n */\n void setMaxAreaAddresses(int maxAreaAddresses);\n\n /**\n * Sets reserved packet circuit type.\n *\n * @param reservedPacketCircuitType reserved packet circuit type\n */\n void setReservedPacketCircuitType(int reservedPacketCircuitType);\n\n /**\n * Sets point to point.\n *\n * @param p2p point to point\n */\n void setP2p(int p2p);\n\n /**\n * Sets area address.\n *\n * @param areaAddress area address\n */\n void setAreaAddress(String areaAddress);\n\n /**\n * Sets area length.\n *\n * @param areaLength area length\n */\n void setAreaLength(int areaLength);\n\n /**\n * Sets link state packet ID.\n *\n * @param lspId link state packet ID\n */\n void setLspId(String lspId);\n\n /**\n * Sets holding time.\n *\n * @param holdingTime holding time\n */\n void setHoldingTime(int holdingTime);\n\n /**\n * Sets priority.\n *\n * @param priority priority\n */\n void setPriority(int priority);\n\n /**\n * Sets hello interval.\n *\n * @param helloInterval hello interval\n */\n void setHelloInterval(int helloInterval);\n}",
"public void setImplementsInterfaceArray(com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface[] implementsInterfaceArray)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n arraySetterHelper(implementsInterfaceArray, IMPLEMENTSINTERFACE$10);\r\n }\r\n }",
"public interface a {\n }",
"public void removeImplements(String sInterface)\n {\n ensureLoaded();\n m_tblInterface.remove(sInterface.replace('.', '/'));\n setModified(true);\n }",
"public interface Implementor {\n // 实现抽象部分需要的某些具体功能\n void operationImpl();\n}",
"public interface Understandability extends Usability {\n}",
"@AssignableSubInterfaces(get={})\n\n@ImplementationClass(get=DistractorDevices.class)\n public interface IDistractorDevices\n extends IInjuryDevice{\n\n}",
"boolean isDeclaredInInterface() {\n return (declaringClass != null) && (declaringClass.isInterface());\n }",
"public final List<String> implements_list() throws RecognitionException {\n List<String> implementsList = null;\n\n\n String implements_spec13 = null;\n\n List<String> typeList;\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:207:3: ( ( implements_spec )* )\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:207:5: ( implements_spec )*\n {\n typeList = Lists.newArrayList();\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:208:5: ( implements_spec )*\n loop2:\n while (true) {\n int alt2 = 2;\n int LA2_0 = input.LA(1);\n if ((LA2_0 == I_IMPLEMENTS)) {\n alt2 = 1;\n }\n\n switch (alt2) {\n case 1:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:208:6: implements_spec\n {\n pushFollow(FOLLOW_implements_spec_in_implements_list184);\n implements_spec13 = implements_spec();\n state._fsp--;\n\n typeList.add(implements_spec13);\n }\n break;\n\n default:\n break loop2;\n }\n }\n\n\n if (typeList.size() > 0) {\n implementsList = typeList;\n } else {\n implementsList = null;\n }\n\n }\n\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return implementsList;\n }",
"public interface e {\n}",
"public Object _get_interface_def()\n {\n // First try to call the delegate implementation class's\n // \"Object get_interface_def(..)\" method (will work for JDK1.2\n // ORBs).\n // Else call the delegate implementation class's\n // \"InterfaceDef get_interface(..)\" method using reflection\n // (will work for pre-JDK1.2 ORBs).\n\n throw new NO_IMPLEMENT(reason);\n }",
"public void setInterfaces(String[] interfaces)\n {\n this.interfaces = interfaces;\n }",
"public interface Changed extends Editable.Changed\n {\n }",
"public static void set_InterfaceDecl(String v) throws RuntimeException\n {\n UmlCom.send_cmd(CmdFamily.javaSettingsCmd, JavaSettingsCmd._setJavaInterfaceDeclCmd, v);\n UmlCom.check();\n \n _interface_decl = v;\n \n }",
"public interface interfaceA extends LocationListener, SensorEventListener {\n}",
"public void interfaceMethod() {\n\t\tSystem.out.println(\"overriden method from interface\");\t\t\r\n\t}",
"public void removeImplementsInterface(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(IMPLEMENTSINTERFACE$10, i);\r\n }\r\n }",
"private void setInterfaces() {\n\t\tif (interfaceNames == null) {\n\t\t\treturn;\n\t\t}\n\t\tif (interfaces != null) {\n\t\t\treturn;\n\t\t}\n\t\tinterfaces = new HashMap();\n\t\tfor (int i = 0; i < interfaceNames.length; i++) {\n\t\t\tBCClass _interface =\n\t\t\t\tJavaApplication.Application.getClass(interfaceNames[i]);\n\t\t\tinterfaces.put(interfaceNames[i], _interface);\n\t\t}\n\t}",
"public final String implements_spec() throws RecognitionException {\n String type = null;\n\n\n CommonTree CLASS_DESCRIPTOR12 = null;\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:200:3: ( ^( I_IMPLEMENTS CLASS_DESCRIPTOR ) )\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:200:5: ^( I_IMPLEMENTS CLASS_DESCRIPTOR )\n {\n match(input, I_IMPLEMENTS, FOLLOW_I_IMPLEMENTS_in_implements_spec152);\n match(input, Token.DOWN, null);\n CLASS_DESCRIPTOR12 = (CommonTree) match(input, CLASS_DESCRIPTOR, FOLLOW_CLASS_DESCRIPTOR_in_implements_spec154);\n match(input, Token.UP, null);\n\n\n type = (CLASS_DESCRIPTOR12 != null ? CLASS_DESCRIPTOR12.getText() : null);\n\n }\n\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return type;\n }",
"public interface C21597a {\n }",
"interface NewInterface extends Interface1,Interface2,Interface3{\n\n\tpublic void getD();\n\n}",
"public interface IOverride extends IMeasurement_descriptor{\n\n\tpublic IRI iri();\n\n}",
"public interface C0385a {\n }",
"public interface i {\n}",
"public interface AnInterface {\n void f();\n\n void g();\n\n void h();\n}",
"private boolean interfaceImplementsInterface(AClass ith) {\n\t\tEnumeration e = getImplements();\n\t\twhile (e.hasMoreElements()) {\n\t\t\tAClass i = ((Type) e.nextElement()).getRefType();\n\t\t\tif (i == ith) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (i.interfaceImplementsInterface(ith)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"IInterfaceDefinition[] resolveImplementedInterfaces(ICompilerProject project);",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public interface a {\n void a();\n }",
"public interface a {\n void a();\n }",
"public interface IBibliotheque {\n\t// Start of user code (user defined attributes for IBibliotheque)\n\n\t// End of user code\n\n\t/**\n\t * Description of the method listeDesEmpruntsEnCours.\n\t */\n\tpublic void listeDesEmpruntsEnCours();\n\n\t// Start of user code (user defined methods for IBibliotheque)\n\n\t// End of user code\n\n}",
"@SuppressWarnings(\"rawtypes\")\n\tpublic List getInterfaces(){\n\t\treturn targetClass.interfaces;\n\t}",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface insertNewImplementsInterface(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface target = null;\r\n target = (com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface)get_store().insert_element_user(IMPLEMENTSINTERFACE$10, i);\r\n return target;\r\n }\r\n }",
"public interface eit {\n}",
"public interface Test {\n}",
"interface Iface {\n void usedIface();\n}",
"ISModifyInterface createISModifyInterface();",
"@ImplementationClass(get=SensoryTest.class)\n\n@AssignableSubInterfaces(get={IAdhesiveRemovalTest.class, IHindpawSensationTest.class, })\n public interface ISensoryTest\n extends IFunctionalTest{\n\n}",
"public void buildImplementedInterfacesInfo() {\n\t\twriter.writeImplementedInterfacesInfo();\n\t}",
"public interface AInterface {\n\n public void say();\n\n}",
"@Override\n\tpublic void subtract() {\n\t\tSystem.out.println(\"This is an implementation of an interface\");\n\t}",
"public interface In extends Clause {}",
"public interface A {\n void f();\n}",
"String getInterfaces();",
"private static void includeInterfacesFromExtension(Environment result, Environment extEnv, Environment base)\n \t{\n \t\tfor(IInterfaceDefinition iDef : extEnv.getInterfaces())\n \t\t\tif (!willGenerateExtentionFor(iDef, base))\n \t\t\t\tresult.getInterfaces().add(iDef);\n \n \t}",
"@Override\r\n\tpublic Class<?> interfaceAdapted() {\n\t\treturn null;\r\n\t}",
"interface Test4{\r\n\tpublic void m1();\r\n}",
"public interface IfcFaceOuterBound extends IfcFaceBound {\n}",
"public interface B extends A {\n void b();\n}",
"Set<Interface> getInterfaces();",
"public interface IAnswer extends IComment{\r\n\t\r\n\t\r\n}",
"public interface IFaci {\n}",
"public interface EventDefinition extends EObject {\r\n}",
"public interface AdditionalOperations extends Statements {\n}",
"public interface AdapterInterface {\n}",
"@Override\n public org.omg.CORBA.Object _get_interface_def()\n {\n if (interfaceDef != null)\n return interfaceDef;\n else\n return super._get_interface_def();\n }",
"void ModifyInterface(AirPollution airPollution);",
"public interface b {\n void a();\n }",
"public interface b {\n void a();\n }",
"interface Hi {\n // MUST BE IMPLEMENTED IN IMPLEMENTING CLASS!!\n void Okay(String q);\n}",
"public interface AbstractC2502fH1 extends IInterface {\n}",
"public interface IEvenListener {\n}",
"public static boolean implementsCompatible(Mode actual, Mode formal) {\n boolean result;\n\n if (formal.equals(REASSIGNS) || actual.equals(REASSIGNS)) {\n result = true;\n }\n else {\n if (formal.equals(UPDATES)) {\n result = updatesImplementsCompatible(actual);\n }\n else if (formal.equals(ALTERS)) {\n result = altersImplementsCompatible(actual);\n }\n else if (formal.equals(REPLACES)) {\n result = replacesImplementsCompatible(actual);\n }\n else if (formal.equals(CLEARS)) {\n result = clearsImplementsCompatible(actual);\n }\n else if (formal.equals(RESTORES)) {\n result = restoresImplementsCompatible(actual);\n }\n else if (formal.equals(PRESERVES)) {\n result = preservesImplementsCompatible(actual);\n }\n else if (formal.equals(EVALUATES)) {\n result = evaluatesImplementsCompatible(actual);\n }\n else if (formal.equals(REASSIGNS)) {\n result = evaluatesImplementsCompatible(actual);\n }\n else {\n result = false;\n }\n }\n return result;\n }",
"public interface IInventoryObject extends IID\n{\n}",
"public interface IGosuStatementList extends IGosuStatement, PsiCodeBlock\n{\n}",
"public interface IPermissions {\n}",
"public interface C19588a {\n }",
"public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface getImplementsInterfaceArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface target = null;\r\n target = (com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface)get_store().find_element_user(IMPLEMENTSINTERFACE$10, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }",
"public interface EntradaPontosDAO extends EntradaPontosSQL{\n\n}",
"Interface_decl getInterface();",
"public interface hp extends Menu {\n}",
"public void setInterface(Class aInterface) { theInterface = aInterface ; }",
"public abstract boolean hasInterface(String strInterfaceName_p);",
"interface C34503a {\n void bMl();\n }",
"public interface OnConnectionOptionSelected {\r\n public void onDownloadSelected();\r\n public void onUploadSelected();\r\n}",
"public interface b {\n}",
"public interface b {\n}",
"public interface SimpleInterface {\n void f();\n}",
"public interface Listener {}",
"public void setImplementsEntityArray(int i, com.guidewire.datamodel.ImplementsEntityDocument.ImplementsEntity implementsEntity)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ImplementsEntityDocument.ImplementsEntity target = null;\r\n target = (com.guidewire.datamodel.ImplementsEntityDocument.ImplementsEntity)get_store().find_element_user(IMPLEMENTSENTITY$8, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n target.set(implementsEntity);\r\n }\r\n }"
] |
[
"0.6927022",
"0.6863674",
"0.6339385",
"0.63383836",
"0.62537843",
"0.6148563",
"0.60698205",
"0.60432",
"0.6022255",
"0.6004779",
"0.5913834",
"0.5903366",
"0.5873373",
"0.5796808",
"0.57661635",
"0.5750375",
"0.57477856",
"0.5734019",
"0.57205945",
"0.57136273",
"0.57080805",
"0.5695288",
"0.5663723",
"0.56541944",
"0.5632892",
"0.5628958",
"0.56100667",
"0.5603158",
"0.55843544",
"0.557103",
"0.5566728",
"0.5559461",
"0.5557623",
"0.5538798",
"0.55096096",
"0.5497035",
"0.54801583",
"0.5461842",
"0.5450653",
"0.5446409",
"0.5431013",
"0.54273045",
"0.5423974",
"0.5422858",
"0.54205024",
"0.54117614",
"0.5409855",
"0.54020727",
"0.53924763",
"0.53924763",
"0.5391411",
"0.5388337",
"0.53856623",
"0.53830343",
"0.5382661",
"0.53823954",
"0.537854",
"0.53712875",
"0.5366421",
"0.53632957",
"0.5361654",
"0.53480035",
"0.53443927",
"0.5338234",
"0.5325342",
"0.5315718",
"0.53057456",
"0.53043485",
"0.5299085",
"0.52895993",
"0.5287312",
"0.5286288",
"0.52765083",
"0.5268925",
"0.52665615",
"0.5265103",
"0.5264027",
"0.5262771",
"0.5262771",
"0.5261471",
"0.5256593",
"0.5253663",
"0.52451843",
"0.52416724",
"0.52414566",
"0.5230924",
"0.5230344",
"0.5230151",
"0.5224675",
"0.52243394",
"0.52084625",
"0.5206502",
"0.52039886",
"0.52006894",
"0.5196126",
"0.51939374",
"0.51939374",
"0.5188761",
"0.51871026",
"0.51827174"
] |
0.63131005
|
4
|
Gets the body of this class.
|
public ClassBodyNode getBody()throws ClassCastException;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Object getBody() {\n return body;\n }",
"public java.lang.String getBody() {\n return instance.getBody();\n }",
"public String getBody() {\r\n return body;\r\n }",
"public String getBody () {\n\t\treturn body;\n\t}",
"public java.lang.String getBody() {\n return body_;\n }",
"public String getBody() {\n return body;\n }",
"public String getBody() {\n return body;\n }",
"public String getBody() {\n return body;\n }",
"public String getBody()\n {\n return body;\n }",
"public String getBody() {\r\n\t\treturn mBody;\r\n\t}",
"public Body getBody() {\n return body;\n }",
"public String getBody() {\n\t\treturn Body;\n\t}",
"public String getBody_() {\n return body_;\n }",
"public String getBody()\n\t{\n\t\treturn m_sBody;\t\n\t}",
"public byte[] getBody() {\n\t\treturn body;\n\t}",
"Body getBody();",
"public byte[] getBody() {\n return body;\n }",
"public String getBody(){\n return body;\n }",
"public abstract Body getBody();",
"public String getBody()\n {\n return super.getBody();\n }",
"public Body getBody() {\n if (jBody == null) {\n throw new RuntimeException(\"No jimplification happened yet, no body available.\");\n }\n return jBody;\n }",
"public AgentBody getBody() {\n\t\treturn body;\n\t}",
"public InputStream body() {\n return body;\n }",
"public com.google.protobuf.ByteString\n getBodyBytes() {\n return instance.getBodyBytes();\n }",
"public String getBody(){\n return bodiesText;\n }",
"@Override\n\tpublic java.lang.String getBody() {\n\t\treturn _news_Blogs.getBody();\n\t}",
"public String getContentBody() {\n return contentBody;\n }",
"public String getBody() {\n Object ref = body_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n body_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public String getBody() {\n\t\tif(body == null) {\n\t\t\ttry {\n\t\t\t\tbody = streamToString(response.getEntity().getContent());\n\t\t\t\treturn body;\n\t\t\t} catch (IllegalStateException e) {\n\t\t\t\tLog.e(Integrum.TAG, e.getStackTrace().toString());\n\t\t\t\treturn \"\";\n\t\t\t} catch (IOException e) {\n\t\t\t\tLog.e(Integrum.TAG, e.getStackTrace().toString());\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t} else {\n\t\t\treturn body;\n\t\t}\n\t}",
"CompoundSt getBody () { return body; }",
"String getBody();",
"String getBody();",
"String getBody();",
"String getBody();",
"public List<Atom> getBody ()\r\n\t{\r\n\t\treturn _body;\r\n\t}",
"public Statement getBody() {\n if (body == null) {\n // lazy initialize - use setter to ensure parent link set too\n setBody(new Block(getAST())); }\n return body; }",
"public com.google.protobuf.ByteString\n getBodyBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(body_);\n }",
"public UserModel getBody() {\n return localBody;\n }",
"public UserModel getBody() {\n return localBody;\n }",
"public Body getBody() {\n return new BufferBody(buffer);\n }",
"public java.lang.String getBody() {\n java.lang.Object ref = body_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n body_ = s;\n return s;\n }\n }",
"public java.lang.String getBody() {\n java.lang.Object ref = body_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n body_ = s;\n }\n return s;\n }\n }",
"public com.google.protobuf.ByteString\n getBodyBytes() {\n Object ref = body_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n body_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Override\n public String getBody() {\n Object ref = body_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n body_ = s;\n return s;\n }\n }",
"SmilBody getBody();",
"java.lang.String getBody();",
"@Override\n public Object getBody() {\n return null;\n }",
"public java.lang.String getBody() {\n java.lang.Object ref = body_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n body_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getBody() {\n java.lang.Object ref = body_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n body_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public DrakonMacro getBody()\r\n {\r\n return body;\r\n }",
"@Override\n public com.google.protobuf.ByteString\n getBodyBytes() {\n Object ref = body_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n body_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"com.google.protobuf.ByteString\n getBodyBytes();",
"com.google.protobuf.ByteString\n getBodyBytes();",
"public LinkedList<Location> getBody() {\n return this.body;\n }",
"public com.google.protobuf.ByteString\n getBodyBytes() {\n java.lang.Object ref = body_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n body_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getBodyBytes() {\n java.lang.Object ref = body_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n body_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getBodyBytes() {\n java.lang.Object ref = body_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n body_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getBodyBytes() {\n java.lang.Object ref = body_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n body_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"DBody getBody();",
"public List<SignatureNode> getBody() {\n return body;\n }",
"public AnimalModel getBody() {\n return localBody;\n }",
"public AnimalModel getBody() {\n return localBody;\n }",
"public HttpEntity body() {\n return body;\n }",
"public String getBodyText() {\n return bodyText;\n }",
"Term getBody();",
"public String getBodyString() {\n return this.bodyString;\n }",
"public GHFrom getBody() {\n return body;\n }",
"public final String getScriptBody() {\n return properties.get(SCRIPT_BODY_PROPERTY);\n }",
"protected String getElementBody() {\n return this.getMessage() == null ? null : this.getMessage();\n }",
"public Body getNativeBody() {\r\n\t\treturn box2dComponent.getBody();\r\n\t}",
"public org.chartacaeli.model.Body[] getBody() {\n org.chartacaeli.model.Body[] array = new org.chartacaeli.model.Body[0];\n return this.bodyList.toArray(array);\n }",
"public Object getBody() throws MessagingException {\n if (body == null) {\n body = getMarshaler().unmarshal(exchange, this);\n }\n return body;\n }",
"public JPanel getBody() {\n\t\treturn contentPane;\n\t}",
"public String body() {\n return request.content().toString(StandardCharsets.UTF_8);\n }",
"public final Body newBody()\n {\n Body body = newBodyImpl();\n \n //addBody(body);\n \n return ( body );\n }",
"public final PB getPerceptionBody() {\n\t\treturn this.__perception_body;\n\t}",
"@Override\n public String getBody() {\n return mSubject; /*mFile.toString();*/\n }",
"public Polygon getBody() {\r\n\t\treturn getRotatedBody(angle);\r\n\t}",
"public List<BodyDecl> getBodyElelemts() {\n return getBodyElelemtList();\n }",
"public java.lang.String getResponseBody() {\n return instance.getResponseBody();\n }",
"public Body getBody1() {\r\n\t\treturn body1;\r\n\t}",
"private String renderBody() {\n return \"\";\n }",
"public String getTypeOfBody() {\n\t\treturn typeOfBody;\n\t}",
"OclExpressionCS getBodyExpression();",
"public CodingDt getBodySite() { \n\t\tif (myBodySite == null) {\n\t\t\tmyBodySite = new CodingDt();\n\t\t}\n\t\treturn myBodySite;\n\t}",
"public String getBodyLoc() {\n return bodyLoc;\n }",
"public Vector<YANG_Body> getBodies() {\n\t\treturn bodies;\n\t}",
"public int getCellBody() {\n\t\treturn cellBody;\n\t}",
"public String getPostBody() {\n return postBody;\n }",
"public Stmt\ngetHirBody();",
"public String getContent() {\n return instance.getContent();\n }",
"public String getContent() {\n return instance.getContent();\n }",
"public CodingDt getBodySiteElement() { \n\t\tif (myBodySite == null) {\n\t\t\tmyBodySite = new CodingDt();\n\t\t}\n\t\treturn myBodySite;\n\t}",
"@ApiModelProperty(required = true, value = \"The body of the approval request to show the user.\")\n public String getBody() {\n return body;\n }",
"public Body getBody2() {\r\n\t\treturn body2;\r\n\t}",
"public String getContent() {\n return instance.getContent();\n }",
"public String getContent() {\n return instance.getContent();\n }",
"private final native NodeRemote getBody0() /*-{\n return this.body;\n\t}-*/;",
"public SWIGTYPE_p_SimTK__MobilizedBody getMobilizedBody() {\n return new SWIGTYPE_p_SimTK__MobilizedBody(opensimSimulationJNI.PhysicalFrame_getMobilizedBody(swigCPtr, this), false);\n }",
"public java.lang.String getResponseBody() {\n return responseBody_;\n }"
] |
[
"0.8429861",
"0.8422382",
"0.8262523",
"0.82542634",
"0.8239205",
"0.82274055",
"0.82274055",
"0.82274055",
"0.81607795",
"0.812982",
"0.8126941",
"0.80816656",
"0.80190635",
"0.79600215",
"0.78965485",
"0.781934",
"0.78034705",
"0.78001726",
"0.77888006",
"0.7727171",
"0.7722697",
"0.7655633",
"0.76214457",
"0.75513756",
"0.7503393",
"0.7489217",
"0.74719983",
"0.7412672",
"0.7408634",
"0.7390541",
"0.7388119",
"0.7388119",
"0.7388119",
"0.7388119",
"0.7311777",
"0.73075825",
"0.7298386",
"0.72919655",
"0.72919655",
"0.7282155",
"0.726345",
"0.72382563",
"0.721831",
"0.72113943",
"0.71812487",
"0.7174579",
"0.71643096",
"0.71310186",
"0.71306956",
"0.71236867",
"0.71134156",
"0.7081347",
"0.7081347",
"0.7074268",
"0.7065947",
"0.70218503",
"0.7021394",
"0.7016742",
"0.7015927",
"0.7010053",
"0.69930005",
"0.69930005",
"0.6992231",
"0.6941227",
"0.69368076",
"0.6873031",
"0.68429285",
"0.68026286",
"0.67922515",
"0.6771949",
"0.6769471",
"0.67090124",
"0.66704744",
"0.66679025",
"0.65847397",
"0.6520667",
"0.6499726",
"0.6489965",
"0.63699704",
"0.6363764",
"0.6358618",
"0.6353175",
"0.6345078",
"0.6342858",
"0.6294177",
"0.62932885",
"0.6233479",
"0.6226752",
"0.615769",
"0.61499494",
"0.61266726",
"0.61266726",
"0.61041975",
"0.60961235",
"0.6088869",
"0.60872054",
"0.60872054",
"0.60734785",
"0.6037836",
"0.5990946"
] |
0.7477811
|
26
|
Gets the union object for the body of this class.
|
public NodeUnion<? extends ClassBodyNode> getUnionForBody();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union getUnion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union target = null;\n target = (org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union)get_store().find_element_user(UNION$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public void setUnionForBody(NodeUnion<? extends ClassBodyNode> body) throws NullPointerException;",
"public PipeUnion<T> getUnion();",
"public ClassBodyNode getBody()throws ClassCastException;",
"public NodeUnion<? extends T> getUnionForModifiers();",
"public XSUnionSimpleType asUnion() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: ddiv \n // 1: fdiv \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- ---- -------------------------------------------\n // 0 2 0 this Lcom/sun/xml/xsom/impl/UnionSimpleTypeImpl;\n // \n // The error that occurred was:\n // \n // java.lang.ArrayIndexOutOfBoundsException\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }",
"BUnion createBUnion();",
"CompoundSt getBody () { return body; }",
"public Object getBody() {\n return body;\n }",
"public abstract Body getBody();",
"public java.lang.Long getUnionLong() {\n return unionLong;\n }",
"public NodeUnion<? extends IdentifierListNode> getUnionForTargets();",
"public java.lang.Long getUnionLong() {\n return unionLong;\n }",
"public NodeUnion<? extends DeclaredTypeListNode> getUnionForBounds();",
"Body getBody();",
"public NodeUnion<? extends DeclaredTypeNode> getUnionForExtendsClause();",
"public NodeUnion<? extends DeclaredTypeListNode> getUnionForImplementsClause();",
"public Body getBody() {\n if (jBody == null) {\n throw new RuntimeException(\"No jimplification happened yet, no body available.\");\n }\n return jBody;\n }",
"public Body getBody() {\n return new BufferBody(buffer);\n }",
"@Override\n\tpublic Type union(Type t) {\n\t\treturn this;\n\t}",
"public AnimalModel getBody() {\n return localBody;\n }",
"public AnimalModel getBody() {\n return localBody;\n }",
"public Bag union(Bag u) {\n return u;\n }",
"public Body getBody() {\n return body;\n }",
"public NodeUnion<? extends IdentifierNode> getUnionForIdentifier();",
"DBody getBody();",
"public Body getNativeBody() {\r\n\t\treturn box2dComponent.getBody();\r\n\t}",
"public List<Atom> getBody ()\r\n\t{\r\n\t\treturn _body;\r\n\t}",
"@Override\n public Object getBody() {\n return null;\n }",
"public String getUnionAnthor() {\n return unionAnthor;\n }",
"public UserModel getBody() {\n return localBody;\n }",
"public UserModel getBody() {\n return localBody;\n }",
"public Polygon getBody() {\r\n\t\treturn getRotatedBody(angle);\r\n\t}",
"public T caseUnion(Union object) {\n\t\treturn null;\n\t}",
"com.google.protobuf.ByteString\n getBodyBytes();",
"com.google.protobuf.ByteString\n getBodyBytes();",
"private final native NodeRemote getBody0() /*-{\n return this.body;\n\t}-*/;",
"public org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union addNewUnion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union target = null;\n target = (org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union)get_store().add_element_user(UNION$0);\n return target;\n }\n }",
"SmilBody getBody();",
"public byte[] getBody() {\n return body;\n }",
"public java.lang.String getBody() {\n return instance.getBody();\n }",
"Term getBody();",
"public java.lang.CharSequence getUnionString() {\n return unionString;\n }",
"public byte[] getBody() {\n\t\treturn body;\n\t}",
"public java.lang.CharSequence getUnionString() {\n return unionString;\n }",
"UnionSecuenciaLuz createUnionSecuenciaLuz();",
"public Object getBody() throws MessagingException {\n if (body == null) {\n body = getMarshaler().unmarshal(exchange, this);\n }\n return body;\n }",
"public com.google.protobuf.ByteString\n getBodyBytes() {\n return instance.getBodyBytes();\n }",
"public java.lang.String getBody() {\n return body_;\n }",
"public Statement getBody() {\n if (body == null) {\n // lazy initialize - use setter to ensure parent link set too\n setBody(new Block(getAST())); }\n return body; }",
"public final Body newBody()\n {\n Body body = newBodyImpl();\n \n //addBody(body);\n \n return ( body );\n }",
"public AgentBody getBody() {\n\t\treturn body;\n\t}",
"public SWIGTYPE_p_SimTK__MobilizedBody getMobilizedBody() {\n return new SWIGTYPE_p_SimTK__MobilizedBody(opensimSimulationJNI.PhysicalFrame_getMobilizedBody(swigCPtr, this), false);\n }",
"public BoundingBox union(BoundingBox b) {\n\t\tRectangle r = getAWTRectangle();\n\t\tr.add(b.getAWTRectangle());\n\t\treturn new BoundingBox(r);\n\t}",
"public Object getUnion(int vectorIndex) {\n UnionVector vector = (UnionVector) table.getVector(vectorIndex);\n return vector.getObject(rowNumber);\n }",
"public String getBody_() {\n return body_;\n }",
"public Body getBody1() {\r\n\t\treturn body1;\r\n\t}",
"public List<SignatureNode> getBody() {\n return body;\n }",
"UnionTypeDefinition createUnionTypeDefinition();",
"public com.google.protobuf.ByteString\n getBodyBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(body_);\n }",
"public java.lang.Long getUnionDefNull() {\n return unionDefNull;\n }",
"public String getBody() {\n Object ref = body_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n body_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public String getBody () {\n\t\treturn body;\n\t}",
"public org.apache.gora.cascading.test.storage.TestRow getUnionRecursive() {\n return unionRecursive;\n }",
"public java.lang.String getBody() {\n java.lang.Object ref = body_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n body_ = s;\n }\n return s;\n }\n }",
"public String getTypeOfBody() {\n\t\treturn typeOfBody;\n\t}",
"public java.lang.Long getUnionDefNull() {\n return unionDefNull;\n }",
"public String getBody()\n\t{\n\t\treturn m_sBody;\t\n\t}",
"public org.apache.gora.cascading.test.storage.TestRow getUnionRecursive() {\n return unionRecursive;\n }",
"@Override\n public String getBody() {\n Object ref = body_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n body_ = s;\n return s;\n }\n }",
"public NodeUnion<? extends TypeParameterListNode> getUnionForTypeParameters();",
"public java.lang.Long getUnionDefNull() {\n\t throw new java.lang.UnsupportedOperationException(\"Get is not supported on tombstones\");\n\t }",
"public String getBody() {\n\t\treturn Body;\n\t}",
"public Body getBody2() {\r\n\t\treturn body2;\r\n\t}",
"@java.lang.Override\n public com.google.protobuf2.AnyOrBuilder getObjectOrBuilder() {\n return getObject();\n }",
"public String getBody() {\r\n\t\treturn mBody;\r\n\t}",
"public java.lang.String getBody() {\n java.lang.Object ref = body_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n body_ = s;\n return s;\n }\n }",
"public String getBody() {\r\n return body;\r\n }",
"@Override\n public com.google.protobuf.ByteString\n getBodyBytes() {\n Object ref = body_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n body_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public Serializable getObject() throws OpenwireException {\n if (object == null && getContent() != null) {\n try {\n Buffer content = getContent();\n InputStream is = new ByteArrayInputStream(content);\n if (isCompressed()) {\n is = new InflaterInputStream(is);\n }\n DataInputStream dataIn = new DataInputStream(is);\n ClassLoadingAwareObjectInputStream objIn = new ClassLoadingAwareObjectInputStream(dataIn);\n try {\n object = (Serializable)objIn.readObject();\n } catch (ClassNotFoundException ce) {\n throw new OpenwireException(\"Failed to build body from content. Serializable class not available to broker. Reason: \" + ce, ce);\n } finally {\n dataIn.close();\n }\n } catch (IOException e) {\n throw new OpenwireException(\"Failed to build body from bytes. Reason: \" + e, e);\n }\n }\n return this.object;\n }",
"OclExpressionCS getBodyExpression();",
"public com.google.protobuf.ByteString\n getBodyBytes() {\n Object ref = body_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n body_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public java.lang.Long getUnionLong() {\n\t throw new java.lang.UnsupportedOperationException(\"Get is not supported on tombstones\");\n\t }",
"public String getBody()\n {\n return body;\n }",
"public InputStream body() {\n return body;\n }",
"public String getBody() {\n return body;\n }",
"public String getBody() {\n return body;\n }",
"public String getBody() {\n return body;\n }",
"public DrakonMacro getBody()\r\n {\r\n return body;\r\n }",
"public java.lang.String getBody() {\n java.lang.Object ref = body_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n body_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public List<BodyDecl> getBodyElelemts() {\n return getBodyElelemtList();\n }",
"public com.google.protobuf.ByteString\n getBodyBytes() {\n java.lang.Object ref = body_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n body_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@SuppressWarnings({\"unchecked\", \"cast\"}) public List<BodyDecl> getBodyElelemtList() {\n return (List<BodyDecl>)getChild(2);\n }",
"public Stmt\ngetHirBody();",
"public Long getIsUnionRule() {\n return this.IsUnionRule;\n }",
"public String getBody() {\n\t\tif(body == null) {\n\t\t\ttry {\n\t\t\t\tbody = streamToString(response.getEntity().getContent());\n\t\t\t\treturn body;\n\t\t\t} catch (IllegalStateException e) {\n\t\t\t\tLog.e(Integrum.TAG, e.getStackTrace().toString());\n\t\t\t\treturn \"\";\n\t\t\t} catch (IOException e) {\n\t\t\t\tLog.e(Integrum.TAG, e.getStackTrace().toString());\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t} else {\n\t\t\treturn body;\n\t\t}\n\t}",
"public Object getUnion(String columnName) {\n UnionVector vector = (UnionVector) table.getVector(columnName);\n return vector.getObject(rowNumber);\n }",
"public String getBody(){\n return body;\n }",
"public com.google.protobuf.ByteString\n getBodyBytes() {\n java.lang.Object ref = body_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n body_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getBodyBytes() {\n java.lang.Object ref = body_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n body_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }"
] |
[
"0.6859513",
"0.6813279",
"0.63182735",
"0.6162809",
"0.61158127",
"0.605581",
"0.6002257",
"0.598952",
"0.5894003",
"0.58877057",
"0.5873633",
"0.5858645",
"0.58540165",
"0.5846467",
"0.5799855",
"0.5694656",
"0.5689931",
"0.5676103",
"0.5656088",
"0.56486505",
"0.5621931",
"0.5621931",
"0.5609662",
"0.558181",
"0.5551716",
"0.55421644",
"0.54965144",
"0.5466139",
"0.5456508",
"0.54446",
"0.54314417",
"0.54314417",
"0.54311246",
"0.5398302",
"0.5367185",
"0.5367185",
"0.53611887",
"0.53562003",
"0.5343767",
"0.5341288",
"0.53402156",
"0.533709",
"0.53365964",
"0.53342825",
"0.5322981",
"0.5318711",
"0.5302524",
"0.5291277",
"0.5275448",
"0.52601737",
"0.52329534",
"0.5223313",
"0.5193484",
"0.5182806",
"0.5175583",
"0.5172044",
"0.5167595",
"0.51460665",
"0.51444554",
"0.5138736",
"0.5132279",
"0.51298845",
"0.51280063",
"0.5112891",
"0.5107013",
"0.5105744",
"0.5098774",
"0.50976986",
"0.50927025",
"0.5065569",
"0.50646",
"0.5064242",
"0.50637966",
"0.5063193",
"0.50586385",
"0.5036181",
"0.50315094",
"0.502656",
"0.5008755",
"0.5007492",
"0.5007396",
"0.5004702",
"0.5002239",
"0.4996306",
"0.4996221",
"0.49938694",
"0.49938694",
"0.49938694",
"0.49895263",
"0.4969202",
"0.4963847",
"0.49626175",
"0.49357006",
"0.4934295",
"0.49310267",
"0.4930646",
"0.49217948",
"0.49192795",
"0.48997012",
"0.48948738"
] |
0.849173
|
0
|
Changes the body of this class.
|
public void setBody(ClassBodyNode body);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setBody(Body body) {\n this.body = body;\n }",
"@Override\n\tpublic void setBody(Object body) {\n\t\tsuper.setBody(body);\n\t}",
"void setBody (DBody body);",
"void setBody(final Body body);",
"public void setBody(Object body) {\n this.body = body;\n }",
"public void setBody_(String body_) {\n this.body_ = body_;\n }",
"public void setBody(ASTNode body) {\n this.body = body;\n }",
"public void setBody(String newValue);",
"public void setBody(BodyType _body) {\n this.body = _body;\n }",
"public void setBody(String body) {\r\n this.body = body;\r\n }",
"public void setBody(AgentBody newBody) {\n\t\tbody = newBody;\n\t}",
"public void setBody(String body)\n {\n this.body = body;\n }",
"public void setBody(String body) {\n this.body = body;\n }",
"public void setBody(Statement statement) {\n if (statement == null) {\n throw new IllegalArgumentException(); }\n // a ForStatement may occur inside a Statement - must check cycles\n replaceChild(this.body, statement, true);\n this.body = statement; }",
"protected abstract Body newBodyImpl();",
"public final Body newBody()\n {\n Body body = newBodyImpl();\n \n //addBody(body);\n \n return ( body );\n }",
"public abstract void body();",
"public void setBody (String body) {\n\t\tresetText(body);\n\t}",
"public Builder body(final Body body) {\n this.body = body;\n return this;\n }",
"public void setBody(ClassBody body) {\n\t\tif(body == null) {\n\t\t\t_componentType.connectTo((Association)createComponentType(new ClassBody()).parentLink());\n\t\t} else {\n\t\t\t_componentType.connectTo((Association) createComponentType(body).parentLink());\n\t\t}\n\t}",
"public void setBody(byte[] body) {\n\t\t\tthis.body = body;\n\t\t}",
"public void setBody(String body)\n\t{\n\t\tm_sBody=body;\t\n\t}",
"public void setBody(byte[] body) {\n\t\tthis.body = body;\n\t}",
"@Override\n\tpublic void setBody(java.lang.String body) {\n\t\t_news_Blogs.setBody(body);\n\t}",
"public void setBody(String v) \n {\n \n if (!ObjectUtils.equals(this.body, v))\n {\n this.body = v;\n setModified(true);\n }\n \n \n }",
"public StacLink body(Object body) {\n this.body = body;\n return this;\n }",
"public void setBody(byte[] content) {\n this.body = content;\n }",
"public void\nsetHirBody( BlockStmt pHirBody );",
"public Builder setBody(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n body_ = value;\n onChanged();\n return this;\n }",
"public Builder setBody(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n body_ = value;\n onChanged();\n return this;\n }",
"private void setBody(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n body_ = value;\n }",
"public Builder setBody(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n body_ = value;\n onChanged();\n return this;\n }",
"public void reset() {\n initBody();\n }",
"public HttpBody setBody(String body) {\n this.body = body;\n return this;\n }",
"protected void writeBody ()\n {\n if (entry instanceof ValueBoxEntry)\n stream.println (\" public \" + holderType + \" value;\");\n else\n Util.writeInitializer (\" public \", \"value\", \"\", entry, stream);\n stream.println ();\n writeCtors ();\n writeRead ();\n writeWrite ();\n writeType ();\n }",
"public Object getBody() {\n return body;\n }",
"protected abstract void addBodyImpl( Body body );",
"public void setBody(AnimalModel param) {\n localBodyTracker = true;\n\n this.localBody = param;\n }",
"public void setBody(AnimalModel param) {\n localBodyTracker = true;\n\n this.localBody = param;\n }",
"public String getBody() {\r\n return body;\r\n }",
"public String getBody_() {\n return body_;\n }",
"public void setBody (String s) {\n if (autoFormat) {\n body = s.replace(\"\\n\", \"<p>\\n\");\n }\n else {\n body = s;\n }\n }",
"@Override\n\tpublic void buildBody() {\n\t\tg.drawRect(60, 50, 10, 50);\n\t}",
"private void clearBody() {\n \n body_ = getDefaultInstance().getBody();\n }",
"public String getBody() {\n return body;\n }",
"public String getBody() {\n return body;\n }",
"public String getBody() {\n return body;\n }",
"public Builder clearBody() {\n \n body_ = getDefaultInstance().getBody();\n onChanged();\n return this;\n }",
"public Body getBody() {\n return body;\n }",
"public HttpsConnection setBody(final String body){\n this.mBody = body;\n return this;\n }",
"@Override\r\n\tpublic void BuildBody() {\n\t\tg.drawRoundRect(0, 0, 60, 50, 10, 50);\r\n\t}",
"CompoundSt getBody () { return body; }",
"public void setBody(UserModel param) {\n localBodyTracker = true;\n\n this.localBody = param;\n }",
"public void setBody(UserModel param) {\n localBodyTracker = true;\n\n this.localBody = param;\n }",
"public String getBody()\n {\n return body;\n }",
"public String getBody() {\n\t\treturn Body;\n\t}",
"public Builder clearBody() {\n\n body_ = getDefaultInstance().getBody();\n onChanged();\n return this;\n }",
"public String getBody(){\n return body;\n }",
"public String getBody() {\r\n\t\treturn mBody;\r\n\t}",
"public String getBody () {\n\t\treturn body;\n\t}",
"public Builder setBody(\n java.lang.String value) {\n copyOnWrite();\n instance.setBody(value);\n return this;\n }",
"public abstract Body getBody();",
"public String getBody()\n {\n return super.getBody();\n }",
"public java.lang.String getBody() {\n return body_;\n }",
"private String renderBody() {\n return \"\";\n }",
"public Builder clearBody() {\n copyOnWrite();\n instance.clearBody();\n return this;\n }",
"void writeBody(ObjectOutputStream stream) throws IOException {\n stream.writeObject(body);\n }",
"Body getBody();",
"public Builder setBodyBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n body_ = value;\n onChanged();\n return this;\n }",
"public Statement getBody() {\n if (body == null) {\n // lazy initialize - use setter to ensure parent link set too\n setBody(new Block(getAST())); }\n return body; }",
"protected Body (World world, org.jbox2d.dynamics.Body body) {\n\t\tthis.world = world;\n\t\tthis.body = body;\n\t}",
"public FrameBodyASPI() {\r\n super();\r\n }",
"public void defineBody()\n {\n if(B2body != null){\n PlayScreen.world.destroyBody(B2body);}\n\n BodyDef bdef = new BodyDef();\n bdef.type = BodyDef.BodyType.KinematicBody;\n B2body = PlayScreen.world.createBody(bdef);\n\n\n calculateTriangle(mirror.getX(), mirror.getY(), mirror.getRotation());\n }",
"public byte[] getBody() {\n\t\treturn body;\n\t}",
"public void setBodyText(String bodyText) {\n this.bodyText = bodyText;\n }",
"public CelestialBody update(CelestialBody body);",
"public Builder clearBody() {\n bitField0_ = (bitField0_ & ~0x00000002);\n body_ = getDefaultInstance().getBody();\n onChanged();\n return this;\n }",
"public void setBody(String content) {\n if (content != null) {\n setBody(content.getBytes(UTF_8));\n }\n else {\n setBody((byte[]) null);\n }\n }",
"public void renderBody(HtmlStream stream) {\n }",
"public static void destroyBody() {\n\t\t\n\t}",
"public final void initBody() {\n m_body = new ArrayList<Condition>();\n m_stats = new TwoClassConfusionMatrix();\n m_val = Double.NEGATIVE_INFINITY;\n resetTieBreaker();\n }",
"public final void addBody( Body body )\n {\n if ( !this.bodies.contains( body ) )\n {\n this.bodies.add( body );\n addBodyImpl( body );\n }\n }",
"public DrakonMacro getBody()\r\n {\r\n return body;\r\n }",
"public SWIGTYPE_p_SimTK__MobilizedBody updMobilizedBody() {\n return new SWIGTYPE_p_SimTK__MobilizedBody(opensimSimulationJNI.PhysicalFrame_updMobilizedBody(swigCPtr, this), false);\n }",
"public ClassBodyNode getBody()throws ClassCastException;",
"BODY createBODY();",
"public byte[] getBody() {\n return body;\n }",
"@Override\n public Object getBody() {\n return null;\n }",
"public String getBody()\n\t{\n\t\treturn m_sBody;\t\n\t}",
"public AgentBody getBody() {\n\t\treturn body;\n\t}",
"private void setBodyBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n body_ = value.toStringUtf8();\n }",
"public NCLBody() {}",
"public Body getBody() {\n return new BufferBody(buffer);\n }",
"public void testCreateMethodWithBody() {\n IDOMMethod method = this.domFactory.createMethod();\n method.setName(\"foo\");\n method.setBody(\" {\\n\" + \"\\t...method body...\\n\" + \"}\\n\");\n assertSourceEquals(\"source code incorrect\", \"public void foo() {\\n\" + \"\\t...method body...\\n\" + \"}\\n\", method.getContents());\n }",
"@Override\n\tpublic Body makeBody(Map<String, String> attributes, Node... nodes) {\n\t\treturn new Body( attributes, nodes );\n\t}",
"public FrameBodyTBPM() {\r\n super();\r\n }",
"public void createBody() {\n\t\tTableView<Debiteur> table = new TableView<>();\n\t\tTableColumn<Debiteur, String> naam = new TableColumn<>(\"Gast\");\n\t\tTableColumn<Debiteur, CheckBox> checkbox = new TableColumn<>(\" \");\n\t\ttable.getColumns().addAll(naam, checkbox);\n\t\tnaam.setCellValueFactory(new PropertyValueFactory<Debiteur, String>(\"naam\"));\n\t\tcheckbox.setCellValueFactory(e -> {\n\t\t\tCheckBox checkBox = new CheckBox();\n\t\t\tBindings.bindBidirectional(checkBox.selectedProperty(), e.getValue().activeProperty());\n\t\t\treturn new SimpleObjectProperty<>(checkBox);\n\t\t});\n\t\ttable.setItems(debiteuren);\n\t\tsetCenter(table);\n\t}",
"public NCLBody(XMLReader reader, NCLElementImpl parent) {\n setReader(reader);\n setParent(parent);\n\n getReader().setContentHandler(this);\n }",
"public void setTypeOfBody(String typeOfBody) {\n\t\tthis.typeOfBody = typeOfBody;\n\t}",
"public void Body() {\n\t\tif(body==null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tElements profileMan=body.getElementsByClass(\"Card ProfileMain\");\n\t\tif(profileMan!=null && profileMan.size()>0)\n\t\t{\n\t\t\tElements listItems=profileMan.first().getElementsByClass(\"List-item\");\n\t\t\tfor(Element item : listItems)\n\t\t\t{\n\t\t\t\tElements link=item.getElementsByClass(\"UserLink-link\");\n\t\t\t\tif(link==null || link.size()<=0)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tString userUrl=link.first().attr(\"href\");\n\t\t\t\t\n\t\t\t\tif(!Strings.isNullOrEmpty(userUrl))\n\t\t\t\t{\n\t\t\t\t\tRedisUtil.getInstance().lPush(Config.REDIS_URL_KEY, Contants.KEY_USER+Config.WEB_URL+userUrl);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}"
] |
[
"0.7512141",
"0.74868697",
"0.7455756",
"0.7447679",
"0.73844117",
"0.7069157",
"0.7042965",
"0.6835848",
"0.68303937",
"0.68025404",
"0.67857534",
"0.6759738",
"0.67561245",
"0.6702872",
"0.6699186",
"0.6678647",
"0.6668984",
"0.6656418",
"0.66277593",
"0.66198146",
"0.6616838",
"0.6594935",
"0.65820765",
"0.6481633",
"0.6477894",
"0.63230366",
"0.6309983",
"0.6301358",
"0.62638396",
"0.6233788",
"0.6164097",
"0.61438894",
"0.6140042",
"0.6128243",
"0.61266065",
"0.61088324",
"0.60762596",
"0.6059357",
"0.6059357",
"0.6056423",
"0.60475343",
"0.6043047",
"0.60317737",
"0.599788",
"0.59810674",
"0.59810674",
"0.59810674",
"0.59686476",
"0.59596175",
"0.59532076",
"0.59394205",
"0.59373695",
"0.593115",
"0.593115",
"0.5924422",
"0.59236795",
"0.5919039",
"0.59189874",
"0.5915099",
"0.5914934",
"0.59026027",
"0.58851016",
"0.5795187",
"0.57801443",
"0.57650983",
"0.5764229",
"0.5756665",
"0.5750229",
"0.57309365",
"0.5689276",
"0.56870145",
"0.56476986",
"0.5640073",
"0.5614923",
"0.5604485",
"0.55998087",
"0.5598281",
"0.55961317",
"0.55871916",
"0.5586334",
"0.55794555",
"0.55711687",
"0.5554667",
"0.55528545",
"0.5543868",
"0.5539728",
"0.55286914",
"0.55201775",
"0.5517078",
"0.54816496",
"0.5463091",
"0.5459215",
"0.54573363",
"0.54485494",
"0.5429564",
"0.542493",
"0.5407476",
"0.5401709",
"0.53987426",
"0.53984857"
] |
0.7414048
|
4
|
Changes the body of this class.
|
public void setUnionForBody(NodeUnion<? extends ClassBodyNode> body) throws NullPointerException;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setBody(Body body) {\n this.body = body;\n }",
"@Override\n\tpublic void setBody(Object body) {\n\t\tsuper.setBody(body);\n\t}",
"void setBody (DBody body);",
"void setBody(final Body body);",
"public void setBody(ClassBodyNode body);",
"public void setBody(Object body) {\n this.body = body;\n }",
"public void setBody_(String body_) {\n this.body_ = body_;\n }",
"public void setBody(ASTNode body) {\n this.body = body;\n }",
"public void setBody(String newValue);",
"public void setBody(BodyType _body) {\n this.body = _body;\n }",
"public void setBody(String body) {\r\n this.body = body;\r\n }",
"public void setBody(AgentBody newBody) {\n\t\tbody = newBody;\n\t}",
"public void setBody(String body)\n {\n this.body = body;\n }",
"public void setBody(String body) {\n this.body = body;\n }",
"public void setBody(Statement statement) {\n if (statement == null) {\n throw new IllegalArgumentException(); }\n // a ForStatement may occur inside a Statement - must check cycles\n replaceChild(this.body, statement, true);\n this.body = statement; }",
"protected abstract Body newBodyImpl();",
"public final Body newBody()\n {\n Body body = newBodyImpl();\n \n //addBody(body);\n \n return ( body );\n }",
"public abstract void body();",
"public void setBody (String body) {\n\t\tresetText(body);\n\t}",
"public Builder body(final Body body) {\n this.body = body;\n return this;\n }",
"public void setBody(ClassBody body) {\n\t\tif(body == null) {\n\t\t\t_componentType.connectTo((Association)createComponentType(new ClassBody()).parentLink());\n\t\t} else {\n\t\t\t_componentType.connectTo((Association) createComponentType(body).parentLink());\n\t\t}\n\t}",
"public void setBody(byte[] body) {\n\t\t\tthis.body = body;\n\t\t}",
"public void setBody(String body)\n\t{\n\t\tm_sBody=body;\t\n\t}",
"public void setBody(byte[] body) {\n\t\tthis.body = body;\n\t}",
"@Override\n\tpublic void setBody(java.lang.String body) {\n\t\t_news_Blogs.setBody(body);\n\t}",
"public void setBody(String v) \n {\n \n if (!ObjectUtils.equals(this.body, v))\n {\n this.body = v;\n setModified(true);\n }\n \n \n }",
"public StacLink body(Object body) {\n this.body = body;\n return this;\n }",
"public void setBody(byte[] content) {\n this.body = content;\n }",
"public void\nsetHirBody( BlockStmt pHirBody );",
"public Builder setBody(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n body_ = value;\n onChanged();\n return this;\n }",
"public Builder setBody(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n body_ = value;\n onChanged();\n return this;\n }",
"private void setBody(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n body_ = value;\n }",
"public Builder setBody(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n body_ = value;\n onChanged();\n return this;\n }",
"public void reset() {\n initBody();\n }",
"public HttpBody setBody(String body) {\n this.body = body;\n return this;\n }",
"protected void writeBody ()\n {\n if (entry instanceof ValueBoxEntry)\n stream.println (\" public \" + holderType + \" value;\");\n else\n Util.writeInitializer (\" public \", \"value\", \"\", entry, stream);\n stream.println ();\n writeCtors ();\n writeRead ();\n writeWrite ();\n writeType ();\n }",
"public Object getBody() {\n return body;\n }",
"protected abstract void addBodyImpl( Body body );",
"public void setBody(AnimalModel param) {\n localBodyTracker = true;\n\n this.localBody = param;\n }",
"public void setBody(AnimalModel param) {\n localBodyTracker = true;\n\n this.localBody = param;\n }",
"public String getBody() {\r\n return body;\r\n }",
"public String getBody_() {\n return body_;\n }",
"public void setBody (String s) {\n if (autoFormat) {\n body = s.replace(\"\\n\", \"<p>\\n\");\n }\n else {\n body = s;\n }\n }",
"@Override\n\tpublic void buildBody() {\n\t\tg.drawRect(60, 50, 10, 50);\n\t}",
"private void clearBody() {\n \n body_ = getDefaultInstance().getBody();\n }",
"public String getBody() {\n return body;\n }",
"public String getBody() {\n return body;\n }",
"public String getBody() {\n return body;\n }",
"public Builder clearBody() {\n \n body_ = getDefaultInstance().getBody();\n onChanged();\n return this;\n }",
"public Body getBody() {\n return body;\n }",
"public HttpsConnection setBody(final String body){\n this.mBody = body;\n return this;\n }",
"@Override\r\n\tpublic void BuildBody() {\n\t\tg.drawRoundRect(0, 0, 60, 50, 10, 50);\r\n\t}",
"CompoundSt getBody () { return body; }",
"public void setBody(UserModel param) {\n localBodyTracker = true;\n\n this.localBody = param;\n }",
"public void setBody(UserModel param) {\n localBodyTracker = true;\n\n this.localBody = param;\n }",
"public String getBody()\n {\n return body;\n }",
"public String getBody() {\n\t\treturn Body;\n\t}",
"public Builder clearBody() {\n\n body_ = getDefaultInstance().getBody();\n onChanged();\n return this;\n }",
"public String getBody(){\n return body;\n }",
"public String getBody() {\r\n\t\treturn mBody;\r\n\t}",
"public String getBody () {\n\t\treturn body;\n\t}",
"public Builder setBody(\n java.lang.String value) {\n copyOnWrite();\n instance.setBody(value);\n return this;\n }",
"public abstract Body getBody();",
"public String getBody()\n {\n return super.getBody();\n }",
"public java.lang.String getBody() {\n return body_;\n }",
"private String renderBody() {\n return \"\";\n }",
"public Builder clearBody() {\n copyOnWrite();\n instance.clearBody();\n return this;\n }",
"void writeBody(ObjectOutputStream stream) throws IOException {\n stream.writeObject(body);\n }",
"Body getBody();",
"public Builder setBodyBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n body_ = value;\n onChanged();\n return this;\n }",
"public Statement getBody() {\n if (body == null) {\n // lazy initialize - use setter to ensure parent link set too\n setBody(new Block(getAST())); }\n return body; }",
"protected Body (World world, org.jbox2d.dynamics.Body body) {\n\t\tthis.world = world;\n\t\tthis.body = body;\n\t}",
"public FrameBodyASPI() {\r\n super();\r\n }",
"public void defineBody()\n {\n if(B2body != null){\n PlayScreen.world.destroyBody(B2body);}\n\n BodyDef bdef = new BodyDef();\n bdef.type = BodyDef.BodyType.KinematicBody;\n B2body = PlayScreen.world.createBody(bdef);\n\n\n calculateTriangle(mirror.getX(), mirror.getY(), mirror.getRotation());\n }",
"public byte[] getBody() {\n\t\treturn body;\n\t}",
"public void setBodyText(String bodyText) {\n this.bodyText = bodyText;\n }",
"public CelestialBody update(CelestialBody body);",
"public Builder clearBody() {\n bitField0_ = (bitField0_ & ~0x00000002);\n body_ = getDefaultInstance().getBody();\n onChanged();\n return this;\n }",
"public void setBody(String content) {\n if (content != null) {\n setBody(content.getBytes(UTF_8));\n }\n else {\n setBody((byte[]) null);\n }\n }",
"public void renderBody(HtmlStream stream) {\n }",
"public static void destroyBody() {\n\t\t\n\t}",
"public final void initBody() {\n m_body = new ArrayList<Condition>();\n m_stats = new TwoClassConfusionMatrix();\n m_val = Double.NEGATIVE_INFINITY;\n resetTieBreaker();\n }",
"public final void addBody( Body body )\n {\n if ( !this.bodies.contains( body ) )\n {\n this.bodies.add( body );\n addBodyImpl( body );\n }\n }",
"public DrakonMacro getBody()\r\n {\r\n return body;\r\n }",
"public SWIGTYPE_p_SimTK__MobilizedBody updMobilizedBody() {\n return new SWIGTYPE_p_SimTK__MobilizedBody(opensimSimulationJNI.PhysicalFrame_updMobilizedBody(swigCPtr, this), false);\n }",
"public ClassBodyNode getBody()throws ClassCastException;",
"BODY createBODY();",
"public byte[] getBody() {\n return body;\n }",
"@Override\n public Object getBody() {\n return null;\n }",
"public String getBody()\n\t{\n\t\treturn m_sBody;\t\n\t}",
"public AgentBody getBody() {\n\t\treturn body;\n\t}",
"private void setBodyBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n body_ = value.toStringUtf8();\n }",
"public NCLBody() {}",
"public Body getBody() {\n return new BufferBody(buffer);\n }",
"public void testCreateMethodWithBody() {\n IDOMMethod method = this.domFactory.createMethod();\n method.setName(\"foo\");\n method.setBody(\" {\\n\" + \"\\t...method body...\\n\" + \"}\\n\");\n assertSourceEquals(\"source code incorrect\", \"public void foo() {\\n\" + \"\\t...method body...\\n\" + \"}\\n\", method.getContents());\n }",
"@Override\n\tpublic Body makeBody(Map<String, String> attributes, Node... nodes) {\n\t\treturn new Body( attributes, nodes );\n\t}",
"public FrameBodyTBPM() {\r\n super();\r\n }",
"public void createBody() {\n\t\tTableView<Debiteur> table = new TableView<>();\n\t\tTableColumn<Debiteur, String> naam = new TableColumn<>(\"Gast\");\n\t\tTableColumn<Debiteur, CheckBox> checkbox = new TableColumn<>(\" \");\n\t\ttable.getColumns().addAll(naam, checkbox);\n\t\tnaam.setCellValueFactory(new PropertyValueFactory<Debiteur, String>(\"naam\"));\n\t\tcheckbox.setCellValueFactory(e -> {\n\t\t\tCheckBox checkBox = new CheckBox();\n\t\t\tBindings.bindBidirectional(checkBox.selectedProperty(), e.getValue().activeProperty());\n\t\t\treturn new SimpleObjectProperty<>(checkBox);\n\t\t});\n\t\ttable.setItems(debiteuren);\n\t\tsetCenter(table);\n\t}",
"public NCLBody(XMLReader reader, NCLElementImpl parent) {\n setReader(reader);\n setParent(parent);\n\n getReader().setContentHandler(this);\n }",
"public void setTypeOfBody(String typeOfBody) {\n\t\tthis.typeOfBody = typeOfBody;\n\t}",
"public void Body() {\n\t\tif(body==null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tElements profileMan=body.getElementsByClass(\"Card ProfileMain\");\n\t\tif(profileMan!=null && profileMan.size()>0)\n\t\t{\n\t\t\tElements listItems=profileMan.first().getElementsByClass(\"List-item\");\n\t\t\tfor(Element item : listItems)\n\t\t\t{\n\t\t\t\tElements link=item.getElementsByClass(\"UserLink-link\");\n\t\t\t\tif(link==null || link.size()<=0)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tString userUrl=link.first().attr(\"href\");\n\t\t\t\t\n\t\t\t\tif(!Strings.isNullOrEmpty(userUrl))\n\t\t\t\t{\n\t\t\t\t\tRedisUtil.getInstance().lPush(Config.REDIS_URL_KEY, Contants.KEY_USER+Config.WEB_URL+userUrl);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}"
] |
[
"0.7512141",
"0.74868697",
"0.7455756",
"0.7447679",
"0.7414048",
"0.73844117",
"0.7069157",
"0.7042965",
"0.6835848",
"0.68303937",
"0.68025404",
"0.67857534",
"0.6759738",
"0.67561245",
"0.6702872",
"0.6699186",
"0.6678647",
"0.6668984",
"0.6656418",
"0.66277593",
"0.66198146",
"0.6616838",
"0.6594935",
"0.65820765",
"0.6481633",
"0.6477894",
"0.63230366",
"0.6309983",
"0.6301358",
"0.62638396",
"0.6233788",
"0.6164097",
"0.61438894",
"0.6140042",
"0.6128243",
"0.61266065",
"0.61088324",
"0.60762596",
"0.6059357",
"0.6059357",
"0.6056423",
"0.60475343",
"0.6043047",
"0.60317737",
"0.599788",
"0.59810674",
"0.59810674",
"0.59810674",
"0.59686476",
"0.59596175",
"0.59532076",
"0.59394205",
"0.59373695",
"0.593115",
"0.593115",
"0.5924422",
"0.59236795",
"0.5919039",
"0.59189874",
"0.5915099",
"0.5914934",
"0.59026027",
"0.58851016",
"0.5795187",
"0.57801443",
"0.57650983",
"0.5764229",
"0.5756665",
"0.5750229",
"0.57309365",
"0.5689276",
"0.56870145",
"0.56476986",
"0.5640073",
"0.5614923",
"0.5604485",
"0.55998087",
"0.5598281",
"0.55961317",
"0.55871916",
"0.5586334",
"0.55794555",
"0.55711687",
"0.5554667",
"0.55528545",
"0.5543868",
"0.5539728",
"0.55286914",
"0.55201775",
"0.5517078",
"0.54816496",
"0.5463091",
"0.5459215",
"0.54573363",
"0.54485494",
"0.5429564",
"0.542493",
"0.5407476",
"0.5401709",
"0.53987426",
"0.53984857"
] |
0.0
|
-1
|
Gets this class's type parameters.
|
public TypeParameterListNode getTypeParameters()throws ClassCastException;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"List<Type> getTypeParameters();",
"TypeInfo[] typeParams();",
"Collection<Parameter> getTypedParameters();",
"List<List<Class<?>>> getConstructorParametersTypes();",
"public ITypeInfo[] getParameters();",
"public TPS_ParameterClass getParameters() {\n return this.parameterClass;\n }",
"public List<ResolvedType> typeParametersValues() {\n return this.typeParametersMap.isEmpty() ? Collections.emptyList() : typeDeclaration.getTypeParameters().stream().map(tp -> typeParametersMap.getValue(tp)).collect(Collectors.toList());\n }",
"public DataTypeDescriptor[] getParameterTypes() {\r\n return parameterTypes;\r\n }",
"public List<TypeDefinition> getParameters() {\n\t\treturn parameters;\n\t}",
"public List<TypeArgument> getTypeArguments() {\n return typeArguments;\n }",
"public ActionParameterTypes getParametersTypes() {\n\t\treturn this.signature;\n\t}",
"public List<TypeArg> typeArgs()\n {\n return typeArgs;\n }",
"public static Class<?>[] getConstructorParamTypes() {\n\t\tfinal Class<?>[] out = { RabbitMQService.class, String.class, RentMovementDAO.class, RPCClient.class, RPCClient.class, IRentConfiguration.class };\n\t\treturn out;\n\t}",
"public ParameterType getType();",
"public final IClass[]\r\n getParameterTypes() throws CompileException {\r\n if (this.parameterTypesCache != null) return this.parameterTypesCache;\r\n return (this.parameterTypesCache = this.getParameterTypes2());\r\n }",
"public List<Class<?>> getSourceParameterTypes() {\n return parameterTypes;\n }",
"public List<Pair<ResolvedTypeParameterDeclaration, ResolvedType>> getTypeParametersMap() {\n List<Pair<ResolvedTypeParameterDeclaration, ResolvedType>> typeParametersMap = new ArrayList<>();\n if (!isRawType()) {\n for (int i = 0; i < typeDeclaration.getTypeParameters().size(); i++) {\n typeParametersMap.add(new Pair<>(typeDeclaration.getTypeParameters().get(i), typeParametersValues().get(i)));\n }\n }\n return typeParametersMap;\n }",
"public java.lang.Integer getParameterType() {\r\n return parameterType;\r\n }",
"public Map<String, Class<?>> getArgumentTypes() {\n return argumentTypes;\n }",
"public String getParameterType() { return parameterType; }",
"public List<Ref<? extends Type>> typeVariables();",
"public Class<?> getParameterClass()\n\t{\n\t\treturn parameterClass;\n\t}",
"public DataType[] getParameters() {\n return parameters;\n }",
"public Type[] getArgumentTypes() {\n/* 236 */ return Type.getArgumentTypes(this.desc);\n/* */ }",
"public String[] getTypes() {\n return impl.getTypes();\n }",
"public String[] getParamTypeNames()\n/* */ {\n/* 353 */ return this.parameterTypeNames;\n/* */ }",
"String getClassTypeVariables() {\n final StringBuilder sb = new StringBuilder();\n if (classTypes.size() > 0) {\n sb.append(\"<\");\n for (int i = 0; i < classTypes.size(); i++) {\n final Class<?> c = classTypes.get(i);\n if (c != null) {\n sb.append(getShortClassName(c));\n if (i < classTypes.size() - 1) {\n sb.append(\", \");\n }\n }\n }\n sb.append(\">\");\n }\n return sb.toString();\n }",
"public List<Class<?>> getTargetParameterTypes() {\n return targetParameterTypes;\n }",
"public String getParamType() {\n return paramType;\n }",
"public String getParamType() {\n return paramType;\n }",
"public List getTypeSpecifiers() {\n return member.getTypeSpecifiers();\n }",
"public Parameters getParameters() {\r\n return params;\r\n }",
"@Override\n public Class<?>[] getParameterTypes() {\n return null;\n }",
"List<LightweightTypeReference> getTypeArguments();",
"private String[] getParameterTypeNames(MethodNode method) {\n GenericsMapper mapper = null;\n ClassNode declaringClass = method.getDeclaringClass();\n if (declaringClass.getGenericsTypes() != null && declaringClass.getGenericsTypes().length > 0) {\n if (!mappers.containsKey(declaringClass)) {\n ClassNode thiz = getClassNode();\n mapper = GenericsMapper.gatherGenerics(findResolvedType(thiz, declaringClass), declaringClass);\n } else {\n mapper = mappers.get(declaringClass);\n }\n }\n Parameter[] parameters = method.getParameters();\n String[] paramTypeNames = new String[parameters.length];\n for (int i = 0; i < paramTypeNames.length; i++) {\n ClassNode paramType = parameters[i].getType();\n if (mapper != null && paramType.getGenericsTypes() != null && paramType.getGenericsTypes().length > 0) {\n paramType = VariableScope.resolveTypeParameterization(mapper, VariableScope.clone(paramType));\n }\n paramTypeNames[i] = paramType.getName();\n if (paramTypeNames[i].startsWith(\"[\")) {\n int cnt = Signature.getArrayCount(paramTypeNames[i]);\n String sig = Signature.getElementType(paramTypeNames[i]);\n String qualifier = Signature.getSignatureQualifier(sig);\n String simple = Signature.getSignatureSimpleName(sig);\n StringBuilder sb = new StringBuilder();\n if (qualifier.length() > 0) {\n sb.append(qualifier).append(\".\");\n }\n sb.append(simple);\n for (int j = 0; j < cnt; j++) {\n sb.append(\"[]\");\n }\n paramTypeNames[i] = sb.toString();\n }\n }\n return paramTypeNames;\n }",
"public List<__Type> getTypes() {\n return (List<__Type>) get(\"types\");\n }",
"@Pure\n\tpublic JvmTypeParameter getJvmTypeParameter() {\n\t\treturn this.parameter;\n\t}",
"@Deprecated public List<TypeParamDef> getParameters(){\n return build(parameters);\n }",
"@Override\n\tpublic Class[] getMethodParameterTypes() {\n\t\treturn new Class[]{byte[].class, int.class,byte[].class,\n\t\t byte[].class, int.class, byte[].class,\n\t\t int.class, byte[].class, byte[].class};\n\t}",
"public List<String> totestParametizedTypes()\n {\n return null;\n }",
"public Object parameters() {\n return this.parameters;\n }",
"public Set<TypeDescriptor> getAllRelatedTypes() {\n final var types = getTypeParameters().stream()\n .flatMap(type -> type.getAllRelatedTypes().stream())\n .collect(Collectors.toCollection(HashSet::new));\n\n types.add(this);\n return types;\n }",
"public int[] getType() {\n return (type);\n }",
"@Override\n public List<KParameter> getParameters() {\n return getReflected().getParameters();\n }",
"char[][] getTypeParameterNames();",
"public String getParamDefs() {\n return super.getParamDefs() + \", \" + PlainValueFunction.paramNameTypes;\n }",
"public Parameters getParameters() {\n \treturn parameters;\n }",
"public List<TypeMetadata> getTypeMetadata() {\n return types;\n }",
"public Parameters getParameters();",
"public List<TypeInfo> getTypes() {\r\n return types;\r\n }",
"public String getType() {\n\t\tString type = C;\n\t\t// Modify if constrained\n\t\tParameterConstraint constraint = this.constraint;\n\t\tif (constraint != null) type = \"Constrained\" + type;\n\t\treturn type;\n\t}",
"protected TypeRef() {\n Type superclass = getClass().getGenericSuperclass();\n if (!(superclass instanceof ParameterizedType)) {\n throw new RuntimeException(\"Missing type parameter.\");\n }\n ParameterizedType parameterized = (ParameterizedType) superclass;\n\n type_ = parameterized.getActualTypeArguments()[0];\n }",
"public Class<?> getInpParmClass() {\n\t\treturn inpParmClass;\n\t}",
"public String getParamDefs() {\r\n return super.getParamDefs() + \", \" + SampledPolicy.paramNameTypes;\r\n }",
"@Override\r\n\tpublic Vector<Integer> getTypes() {\n\t\treturn this.types;\r\n\t}",
"public Type[] types();",
"public Class<T> type() {\n\t\treturn _type;\n\t}",
"static MBeanParameterInfo[] methodSignature(Method method) {\r\n Class[] classes = method.getParameterTypes();\r\n MBeanParameterInfo[] params = new MBeanParameterInfo[classes.length];\r\n\r\n for (int i = 0; i < classes.length; i++) {\r\n String parameterName = \"p\" + (i + 1);\r\n params[i] = new MBeanParameterInfo(parameterName, classes[i].getName(), \"\");\r\n }\r\n\r\n return params;\r\n }",
"@Override\n\tpublic Collection<Parameter<?>> getParameters() {\n\t\treturn null;\n\t}",
"IParameterCollection getParameters();",
"public Params<T> getParams() {\n\t\treturn _params;\n\t}",
"public void buildTypeParamInfo() {\n\t\twriter.writeTypeParamInfo();\n\t}",
"public Parameter[] getParameters() {\n return values;\n }",
"public Parameters getParameters() {\n Parameters p = new Parameters();\n String s = native_getParameters();\n Log.e(TAG, \"_getParameters: \" + s);\n p.unflatten(s);\n return p;\n }",
"public Set<Class<?>> getTypes() {\n\t\treturn dataTypes;\n\t}",
"public Set<Class<?>> getTypes() {\n\t\treturn dataTypes;\n\t}",
"@Override\n public Parameters getParams() {\n return parameters;\n }",
"public Set<Class<?>> getTypes() {\r\n\t\treturn dataTypes;\r\n\t}",
"public Set<Class<?>> getTypes() {\r\n\t\treturn dataTypes;\r\n\t}",
"public Set<Class<?>> getTypes() {\r\n\t\treturn dataTypes;\r\n\t}",
"public Class[] getTypes() {\n Class[] types = new Class[elements.size()];\n\n for (int i = 0; i < elements.size(); i++) {\n Object value = elements.get(i);\n\n if (value != null)\n types[i] = value.getClass();\n }\n\n return types;\n }",
"public static synchronized Map<String, Class<?>> getTypParametrov(Class<?> cls)\r\n throws NoSuchFieldException, SecurityException {\r\n\r\n Map<String, Class<?>> typy = new HashMap<>();\r\n\r\n Set<String> zozPar = ToolsDao.getClassProperties(cls, true);\r\n\r\n for (String p : zozPar) {\r\n Type typ = cls.getDeclaredField(p).getType();\r\n //typy.put(p, getShortTyp(typ.toString()));\r\n typy.put(p, (Class<?>) typ);\r\n }\r\n return typy;\r\n }",
"public Parameter[] getParameters()\r\n {\r\n return m_params;\r\n }",
"public ActionParameterType getType() {\n\n\t\treturn _type;\n\n\t}",
"public Class<? extends DataType>[] getRequiredArgs();",
"public Map getParameters() {\r\n\t\treturn parameters;\r\n\t}",
"public abstract Object getTypedParams(Object params);",
"@NonNull\n public Map<String, Object> getParameters() {\n return parameters;\n }",
"public Class<?> getType(){\n\t\treturn type;\n\t}",
"public String[] getParameters() {\n return parameters;\n }",
"Map<ParameterInstance, SetType> getInstanceSetTypes();",
"public Class<?> getType() {\n return this.type;\n }",
"public Parameters getParameters() {\n return parametersReference.get();\n }",
"public String[] getParameters() {\r\n return parameters;\r\n }",
"@jdk.Exported\npublic interface TypeParameterTree extends Tree {\n Name getName();\n List<? extends Tree> getBounds();\n\n /**\n * Return annotations on the type parameter declaration.\n *\n * Annotations need Target meta-annotations of\n * {@link java.lang.annotation.ElementType#TYPE_PARAMETER} or\n * {@link java.lang.annotation.ElementType#TYPE_USE}\n * to appear in this position.\n *\n * @return annotations on the type parameter declaration\n * @since 1.8\n */\n List<? extends AnnotationTree> getAnnotations();\n}",
"@Override\n\tpublic Parameter[] getParameters() {\n\t\treturn new Parameter[] { weight, tolerance, svmType, kernelType, kernelDegree, kernelGamma, kernelCoefficient, parameterC,\n\t\t\t\tparameterNu };\n\t}",
"public CParam[] getParameters() {\r\n\t\treturn parameters.toArray(new CParamImpl[parameters.size()]);\r\n\t}",
"Class<?> getType();",
"Class<?> getType();",
"Class<?> getType();",
"public String[] getParameters() {\n\t\treturn parameters;\n\t}",
"List<InferredStandardParameter> getOriginalParameterTypes();",
"public List<ParameterDefinition> parameters() {\n return this.innerProperties() == null ? null : this.innerProperties().parameters();\n }",
"Type getParameterType(Type[] types, String path);",
"UsedTypes getTypes();",
"public Class getType();",
"java.util.List<? extends com.google.cloud.commerce.consumer.procurement.v1.ParameterOrBuilder>\n getParametersOrBuilderList();",
"java.util.List<? extends org.tensorflow.proto.framework.FullTypeDefOrBuilder> \n getArgsOrBuilderList();",
"public List<List<TypeArgument>> getSuffixTypeArguments() {\n return suffixTypeArguments;\n }",
"public Map<String, Object> getParameters() {\n return this.parameters;\n }"
] |
[
"0.7775068",
"0.715397",
"0.70718414",
"0.7015391",
"0.6942997",
"0.6938012",
"0.6934464",
"0.6927388",
"0.6895329",
"0.6854209",
"0.6785952",
"0.6762554",
"0.67463267",
"0.6696103",
"0.668071",
"0.66714275",
"0.663375",
"0.6493631",
"0.6361976",
"0.6335149",
"0.6334949",
"0.6320875",
"0.63019556",
"0.6235332",
"0.61441815",
"0.6110786",
"0.6073426",
"0.60653216",
"0.60036117",
"0.60036117",
"0.5974821",
"0.5957393",
"0.59404916",
"0.59247804",
"0.58873487",
"0.5871487",
"0.5864974",
"0.5837276",
"0.58192426",
"0.58036685",
"0.5797594",
"0.5789333",
"0.57589173",
"0.5751106",
"0.57279503",
"0.57202816",
"0.57141197",
"0.571237",
"0.57026833",
"0.5683542",
"0.5662904",
"0.5657908",
"0.5654887",
"0.564008",
"0.56227124",
"0.56184125",
"0.5589249",
"0.5582798",
"0.5578909",
"0.55781764",
"0.55690694",
"0.55677193",
"0.5555096",
"0.55471385",
"0.5545186",
"0.5545186",
"0.5537097",
"0.5533655",
"0.5533655",
"0.5533655",
"0.5533561",
"0.5518861",
"0.5509862",
"0.5492247",
"0.54866815",
"0.54865724",
"0.5486562",
"0.5457625",
"0.5454555",
"0.54539293",
"0.5450334",
"0.5449444",
"0.5444265",
"0.5443574",
"0.5435372",
"0.54328215",
"0.5419233",
"0.5413637",
"0.5413637",
"0.5413637",
"0.540765",
"0.5385127",
"0.538204",
"0.5378675",
"0.5377777",
"0.53703",
"0.5367529",
"0.5362686",
"0.53580654",
"0.53451914"
] |
0.6587699
|
17
|
Gets the union object for this class's type parameters.
|
public NodeUnion<? extends TypeParameterListNode> getUnionForTypeParameters();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public NodeUnion<? extends ClassBodyNode> getUnionForBody();",
"public PipeUnion<T> getUnion();",
"UnionTypeDefinition createUnionTypeDefinition();",
"public NodeUnion<? extends T> getUnionForModifiers();",
"@Override\n\tpublic Type union(Type t) {\n\t\treturn this;\n\t}",
"public NodeUnion<? extends DeclaredTypeListNode> getUnionForBounds();",
"public org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union getUnion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union target = null;\n target = (org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union)get_store().find_element_user(UNION$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public void setUnionForTypeParameters(NodeUnion<? extends TypeParameterListNode> typeParameters) throws NullPointerException;",
"public NodeUnion<? extends DeclaredTypeNode> getUnionForExtendsClause();",
"public NodeUnion<? extends IdentifierListNode> getUnionForTargets();",
"public NodeUnion<? extends DeclaredTypeListNode> getUnionForImplementsClause();",
"BUnion createBUnion();",
"public java.lang.Long getUnionLong() {\n return unionLong;\n }",
"public java.lang.Long getUnionLong() {\n return unionLong;\n }",
"public XSUnionSimpleType asUnion() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: ddiv \n // 1: fdiv \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- ---- -------------------------------------------\n // 0 2 0 this Lcom/sun/xml/xsom/impl/UnionSimpleTypeImpl;\n // \n // The error that occurred was:\n // \n // java.lang.ArrayIndexOutOfBoundsException\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }",
"public NodeUnion<? extends IdentifierNode> getUnionForIdentifier();",
"public Type getValue() {\n Type ret = null;\n try {\n Constructor constructor = valueClass.getConstructor(new Class[] { String.class });\n ret = (Type) constructor.newInstance(data);\n } catch (Exception e) {\n throw new ClassCastException();\n }\n return ret;\n }",
"public T caseUnion(Union object) {\n\t\treturn null;\n\t}",
"UnionSecuenciaLuz createUnionSecuenciaLuz();",
"public Object getUnion(int vectorIndex) {\n UnionVector vector = (UnionVector) table.getVector(vectorIndex);\n return vector.getObject(rowNumber);\n }",
"interface Factory<First> {\n /**\n * Creates a Union0 wrapping a value\n * \n * @param single the value\n * @return a Union0 object wrapping the value\n */\n Union0<First> first(First single);\n }",
"public WireType enclosingType() {\n if (names.size() == 1) return null;\n return new WireType(protoPackage, names.subList(0, names.size() - 1), isScalar);\n }",
"public String getUnionAnthor() {\n return unionAnthor;\n }",
"public ParameterType getType();",
"@Override\n public Class<?> getObjectType() {\n return this.type;\n }",
"TypeRef getType();",
"public interface Union0<First> {\n /**\n * Executes one of the continuations depending on the element type\n */\n void continued(Consumer<First> continuationFirst);\n\n /**\n * Transforms the element in the union to a new type\n * \n * @param <R> result type\n * @return an object of the result type\n */\n <R> R join(Function<First, R> mapFirst);\n\n /**\n * Creator class for Union1\n */\n interface Factory<First> {\n /**\n * Creates a Union0 wrapping a value\n * \n * @param single the value\n * @return a Union0 object wrapping the value\n */\n Union0<First> first(First single);\n }\n}",
"public scala.Option<java.lang.Class<?>> getUDTFor (java.lang.String userClass) { throw new RuntimeException(); }",
"public IClass getType() {\n IClass result = null;\n if (_javaMethod.getReturnType().isArray()) {\n result = new ArrayDef(new ExternalClass(_javaMethod.getReturnType().getComponentType()));\n }\n else {\n result = new ExternalClass(_javaMethod.getReturnType());\n }\n\n return result;\n }",
"public java.lang.Object getAnyType() {\n return localAnyType;\n }",
"public final Class<? super T> getRawType() {\n Class<?> rawType = getRawTypes().iterator().next();\n @SuppressWarnings(\"unchecked\") // raw type is |T|\n Class<? super T> result = (Class<? super T>) rawType;\n return result;\n }",
"public Object getDenseUnion(int vectorIndex) {\n DenseUnionVector vector = (DenseUnionVector) table.getVector(vectorIndex);\n return vector.getObject(rowNumber);\n }",
"protected TypeRef() {\n Type superclass = getClass().getGenericSuperclass();\n if (!(superclass instanceof ParameterizedType)) {\n throw new RuntimeException(\"Missing type parameter.\");\n }\n ParameterizedType parameterized = (ParameterizedType) superclass;\n\n type_ = parameterized.getActualTypeArguments()[0];\n }",
"public Object getUnion(String columnName) {\n UnionVector vector = (UnionVector) table.getVector(columnName);\n return vector.getObject(rowNumber);\n }",
"public java.lang.Long getUnionDefNull() {\n return unionDefNull;\n }",
"public java.lang.CharSequence getUnionString() {\n return unionString;\n }",
"public java.lang.Long getUnionDefNull() {\n return unionDefNull;\n }",
"public java.lang.CharSequence getUnionString() {\n return unionString;\n }",
"Union0<First> first(First single);",
"Class<V> getValueType();",
"TypeInfo[] typeParams();",
"public TypeParameterListNode getTypeParameters()throws ClassCastException;",
"public abstract Class<T> targetType();",
"void union(int p, int q) {}",
"public JType erasure() {\n return this;\n }",
"List<Type> getTypeParameters();",
"public Class<?> getType() {\n switch (this.aggregate) {\n case COUNT_BIG:\n return DataTypeManager.DefaultDataClasses.LONG;\n case COUNT:\n return COUNT_TYPE;\n case SUM:\n Class<?> expressionType = this.getArg(0).getType();\n return SUM_TYPES.get(expressionType);\n case AVG:\n expressionType = this.getArg(0).getType();\n return AVG_TYPES.get(expressionType);\n case ARRAY_AGG:\n if (this.getArg(0) == null) {\n return null;\n }\n return DataTypeManager.getArrayType(this.getArg(0).getType());\n case TEXTAGG:\n return DataTypeManager.DefaultDataClasses.BLOB;\n case JSONARRAY_AGG:\n return DataTypeManager.DefaultDataClasses.JSON;\n case USER_DEFINED:\n case STRING_AGG:\n return super.getType();\n case PERCENT_RANK:\n case CUME_DIST:\n return DataTypeManager.DefaultDataClasses.DOUBLE;\n }\n if (isBoolean()) {\n return DataTypeManager.DefaultDataClasses.BOOLEAN;\n }\n if (isEnhancedNumeric()) {\n return DataTypeManager.DefaultDataClasses.DOUBLE;\n }\n if (isRanking()) {\n return super.getType();\n }\n if (this.getArgs().length == 0) {\n return null;\n }\n return this.getArg(0).getType();\n }",
"public void setUnionForBody(NodeUnion<? extends ClassBodyNode> body) throws NullPointerException;",
"abstract public Type type();",
"public final void mT__79() throws RecognitionException {\n try {\n int _type = T__79;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalMyDsl.g:77:7: ( 'union' )\n // InternalMyDsl.g:77:9: 'union'\n {\n match(\"union\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public IDLType getSpecialCaseIDLTypeMapping(Class<Object> paramClass) {\n/* 411 */ if (paramClass == null) {\n/* 412 */ throw new IllegalArgumentException();\n/* */ }\n/* */ \n/* 415 */ if (paramClass == Object.class) {\n/* 416 */ return new IDLType(paramClass, new String[] { \"java\", \"lang\" }, \"Object\");\n/* */ }\n/* 418 */ if (paramClass == String.class) {\n/* 419 */ return new IDLType(paramClass, new String[] { \"CORBA\" }, \"WStringValue\");\n/* */ }\n/* 421 */ if (paramClass == Class.class) {\n/* 422 */ return new IDLType(paramClass, new String[] { \"javax\", \"rmi\", \"CORBA\" }, \"ClassDesc\");\n/* */ }\n/* 424 */ if (paramClass == Serializable.class) {\n/* 425 */ return new IDLType(paramClass, new String[] { \"java\", \"io\" }, \"Serializable\");\n/* */ }\n/* 427 */ if (paramClass == Externalizable.class) {\n/* 428 */ return new IDLType(paramClass, new String[] { \"java\", \"io\" }, \"Externalizable\");\n/* */ }\n/* 430 */ if (paramClass == Remote.class) {\n/* 431 */ return new IDLType(paramClass, new String[] { \"java\", \"rmi\" }, \"Remote\");\n/* */ }\n/* 433 */ if (paramClass == Object.class) {\n/* 434 */ return new IDLType(paramClass, \"Object\");\n/* */ }\n/* 436 */ return null;\n/* */ }",
"public final Class<? super T> getRawType() {\n return rawType;\n }",
"private static TypeToken<?> typeVariable() {\n\t\tParameterizedType t = (ParameterizedType)TypeToken.of(Identity.class).getSupertype(StreamElement.class).getType();\n\t\treturn TypeToken.of(t.getActualTypeArguments()[0]);\n\t}",
"public Class getType();",
"public Type<O> getObjectType()\n\t{\n\t\treturn this.getSettings().getObjectType();\n\t}",
"public Class<?> getPrimitiveType();",
"public Parameter getTypeParameter(StratmasObject object)\n {\n // Find youngest base type with a mapping\n for (Type walker = object.getType(); \n walker != null; walker = walker.getBaseType()) {\n ParameterFactory parameterFactory = (ParameterFactory) getTypeMapping().get(walker);\n if (parameterFactory != null) {\n return parameterFactory.getParameter(object);\n }\n }\n\n return null;\n }",
"public SimpleInterval1D getGenotypeUnionAlternativeInterval() {\n return getAlternativeAlleleInterval(getGoodPaternal()).union(getAlternativeAlleleInterval(getGoodMaternal()));\n }",
"UnionCancionSecuencia createUnionCancionSecuencia();",
"public Type getType();",
"public Class<?> getType() {\n return this.value.getClass();\n }",
"abstract public Type getType();",
"protected abstract Class<? extends TreeStructure> getTreeType();",
"Type type();",
"Type type();",
"public Class<?> getRawFieldType() {\r\n\t\treturn TypeToken.of(_fieldType)\r\n\t\t\t\t\t\t.getRawType();\r\n\t}",
"public JavaType getType() { return _type; }",
"public abstract Type getType();",
"public org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union addNewUnion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union target = null;\n target = (org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union)get_store().add_element_user(UNION$0);\n return target;\n }\n }",
"public Class<?> getObjectType() {\n return objectType;\n }",
"public Bag union(Bag u) {\n return u;\n }",
"public abstract Object getTypedParams(Object params);",
"public TypeToken<?> returnType() {\n return this.modelType;\n }",
"public __Type getQueryType() {\n return (__Type) get(\"queryType\");\n }",
"private Object getTypeObjectPair() throws MathLinkException, NumberRangeException {\n Object result = null;\n int type = this.getInteger();\n if (type % -17 == -15) {\n type = -7 + -17 * (type / -17);\n } else if (type % -17 == -16) {\n type = -8 + -17 * (type / -17);\n }\n switch (type) {\n case -5: {\n result = new Integer(this.getInteger());\n break;\n }\n case -6: {\n result = new Long(this.getLongInteger());\n break;\n }\n case -4: {\n int i = this.getInteger();\n if (i < -32768 || i > 32767) {\n throw new NumberRangeException(i, \"short\");\n }\n result = new Short((short)i);\n break;\n }\n case -2: {\n int i = this.getInteger();\n if (i < -128 || i > 127) {\n throw new NumberRangeException(i, \"byte\");\n }\n result = new Byte((byte)i);\n break;\n }\n case -3: {\n int i = this.getInteger();\n if (i < 0 || i > 65535) {\n throw new NumberRangeException(i, \"char\");\n }\n result = new Character((char)i);\n break;\n }\n case -15: \n case -7: {\n double d = this.getDouble();\n if (d < -3.4028234663852886E38 || d > 3.4028234663852886E38) {\n throw new NumberRangeException(d, \"float\");\n }\n result = new Float((float)d);\n break;\n }\n case -16: \n case -8: {\n result = new Double(this.getDouble());\n break;\n }\n case -9: {\n int tok = this.getType();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n result = this.getString();\n if (tok != 35 || !result.equals(\"Null\")) break;\n result = null;\n break;\n }\n case -1: {\n String s = this.getSymbol();\n if (s.equals(\"True\")) {\n result = Boolean.TRUE;\n break;\n }\n result = Boolean.FALSE;\n break;\n }\n case -13: {\n long mark = this.createMark();\n try {\n int tok = this.getNext();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n if (tok == 35) {\n result = this.getSymbol();\n if (result.equals(\"Null\")) {\n result = null;\n break;\n }\n this.seekMark(mark);\n result = this.getComplex();\n break;\n }\n this.seekMark(mark);\n result = this.getComplex();\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -10: {\n long mark = this.createMark();\n try {\n int tok = this.getType();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n if (tok == 35) {\n result = this.getSymbol();\n if (result.equals(\"Null\")) {\n result = null;\n break;\n }\n result = new BigInteger((String)result);\n break;\n }\n result = new BigInteger(this.getString());\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -11: {\n long mark = this.createMark();\n try {\n int tok = this.getType();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n if (tok == 35) {\n result = this.getSymbol();\n if (result.equals(\"Null\")) {\n result = null;\n break;\n }\n result = Utils.bigDecimalFromString((String)result);\n break;\n }\n result = Utils.bigDecimalFromString(this.getString());\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -12: {\n long mark = this.createMark();\n try {\n int tok = this.getNext();\n if (tok == 100000 && (result = this.getObject()) != null) break;\n this.seekMark(mark);\n result = this.getExpr();\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -14: {\n result = this.getObject();\n break;\n }\n case -10000: {\n break;\n }\n default: {\n int tok = this.getNext();\n result = tok == 100000 || tok == 35 ? this.getObject() : (type > -34 ? this.getArray(type - -17, 1) : (type > -51 ? this.getArray(type - -34, 2) : (type > -68 ? this.getArray(type - -51, 3) : (type > -85 ? this.getArray(type - -68, 4) : this.getArray(type - -85, 5)))));\n }\n }\n return result;\n }",
"public IDLType getPrimitiveIDLTypeMapping(Class<void> paramClass) {\n/* 375 */ if (paramClass == null) {\n/* 376 */ throw new IllegalArgumentException();\n/* */ }\n/* */ \n/* 379 */ if (paramClass.isPrimitive()) {\n/* 380 */ if (paramClass == void.class)\n/* 381 */ return new IDLType(paramClass, \"void\"); \n/* 382 */ if (paramClass == boolean.class)\n/* 383 */ return new IDLType(paramClass, \"boolean\"); \n/* 384 */ if (paramClass == char.class)\n/* 385 */ return new IDLType(paramClass, \"wchar\"); \n/* 386 */ if (paramClass == byte.class)\n/* 387 */ return new IDLType(paramClass, \"octet\"); \n/* 388 */ if (paramClass == short.class)\n/* 389 */ return new IDLType(paramClass, \"short\"); \n/* 390 */ if (paramClass == int.class)\n/* 391 */ return new IDLType(paramClass, \"long\"); \n/* 392 */ if (paramClass == long.class)\n/* 393 */ return new IDLType(paramClass, \"long_long\"); \n/* 394 */ if (paramClass == float.class)\n/* 395 */ return new IDLType(paramClass, \"float\"); \n/* 396 */ if (paramClass == double.class) {\n/* 397 */ return new IDLType(paramClass, \"double\");\n/* */ }\n/* */ } \n/* */ \n/* 401 */ return null;\n/* */ }",
"public Class getType();",
"private Class<V> getClassVO() throws ClassNotFoundException {\n Type superclass = this.getClass().getGenericSuperclass();\n\n if (superclass instanceof ParameterizedType) {\n ParameterizedType parameterizedType = (ParameterizedType) superclass;\n Type[] typeArguments = parameterizedType.getActualTypeArguments();\n\n if (typeArguments.length == 2) {\n Type typeVO = typeArguments[1];\n\n if (typeVO instanceof Class) {\n Class c = (Class) typeVO;\n String name = c.getName();\n\n return (Class<V>) Class.forName(name);\n }\n }\n }\n\n return null;\n }",
"public final void mT__63() throws RecognitionException {\n try {\n int _type = T__63;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.webgme_mtl/src-gen/org/xtext/example/webgme/parser/antlr/internal/InternalMTL.g:61:7: ( 'union' )\n // ../org.xtext.example.webgme_mtl/src-gen/org/xtext/example/webgme/parser/antlr/internal/InternalMTL.g:61:9: 'union'\n {\n match(\"union\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public Class<T> getSupportedOperationType();",
"Coding getType();",
"public Optional<TypeDefId> getType() {\n\t\t\treturn type;\n\t\t}",
"public java.lang.Long getUnionDefNull() {\n\t throw new java.lang.UnsupportedOperationException(\"Get is not supported on tombstones\");\n\t }",
"public Class<? extends Geometry> getTargetClass() {\n\n\t\tint index = comboGeometryList.getSelectionIndex();\n\t\tString geomName;\n\t\tClass<? extends Geometry> geomClass;\n\n\t\tif (index != -1) {\n\t\t\tgeomName = comboGeometryList.getItem(index);\n\t\t\tgeomClass = (Class<? extends Geometry>) comboGeometryList.getData(geomName);\n\t\t\treturn geomClass;\n\t\t}\n\n\t\treturn null;\n\t}",
"public Optional<TypeDefId> getType() {\n\t\treturn type;\n\t}",
"public Class<?> getBoxedType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"Type getType();",
"public Object getDenseUnion(String columnName) {\n DenseUnionVector vector = (DenseUnionVector) table.getVector(columnName);\n return vector.getObject(rowNumber);\n }",
"UserType getType();",
"DataType getBase_DataType();"
] |
[
"0.61948764",
"0.6187589",
"0.6098394",
"0.60693264",
"0.5974973",
"0.5866046",
"0.5850556",
"0.5591595",
"0.5572413",
"0.55451167",
"0.55092263",
"0.5505484",
"0.54791385",
"0.5455317",
"0.5436051",
"0.5380676",
"0.5147693",
"0.51275194",
"0.51130027",
"0.50987226",
"0.5070115",
"0.49843162",
"0.49809068",
"0.49644554",
"0.49438345",
"0.48938084",
"0.48732084",
"0.4820291",
"0.4804969",
"0.4774452",
"0.47716594",
"0.4761902",
"0.475543",
"0.4748678",
"0.4741775",
"0.47403094",
"0.47097057",
"0.47072777",
"0.47033557",
"0.4684508",
"0.46744117",
"0.46702486",
"0.4659051",
"0.46524402",
"0.46397918",
"0.463077",
"0.46151152",
"0.46110496",
"0.46108925",
"0.46018535",
"0.4582821",
"0.45747113",
"0.45710284",
"0.4558625",
"0.4557952",
"0.45486754",
"0.45476207",
"0.4541881",
"0.4539318",
"0.4527562",
"0.45187026",
"0.45093185",
"0.4499483",
"0.44929892",
"0.44929892",
"0.44850016",
"0.44814742",
"0.4466852",
"0.44652689",
"0.44618607",
"0.44598094",
"0.4458969",
"0.44588068",
"0.44510418",
"0.4446945",
"0.44388887",
"0.44361937",
"0.44345826",
"0.44327325",
"0.44321024",
"0.44197685",
"0.44095182",
"0.44080862",
"0.4406242",
"0.43982145",
"0.4393232",
"0.4388752",
"0.4388752",
"0.4388752",
"0.4388752",
"0.4388752",
"0.4388752",
"0.4388752",
"0.4388752",
"0.4388752",
"0.4388752",
"0.4388752",
"0.43763426",
"0.43710947",
"0.4364447"
] |
0.7212188
|
0
|
Changes this class's type parameters.
|
public void setTypeParameters(TypeParameterListNode typeParameters);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void setClassType(String classType);",
"public void setType(Class type) {\n\t this.type = type;\n\t }",
"public void changeToType(TYPE type){\n this.type=type;\n return;\n }",
"void setType(Type type)\n {\n this.type = type;\n }",
"public void setType(Type t) {\n type = t;\n }",
"protected void setType(String newType) {\n\t\ttype = newType;\n\t}",
"void changeType(NoteTypes newType) {\n this.type = newType;\n }",
"public void setType(String newVal) {\n if ((newVal != null && this.type != null && (newVal.compareTo(this.type) == 0)) || \n (newVal == null && this.type == null && type_is_initialized)) {\n return; \n } \n this.type = newVal; \n\n type_is_modified = true; \n type_is_initialized = true; \n }",
"public void setType(Type t) {\n\t\ttype = t;\n\t}",
"public void setType(java.lang.String newType) {\n\ttype = newType;\n}",
"public void setDataType(Class newclass) {\n datatype=newclass;\n }",
"public void setType(int paramtype)\r\n\t{\r\n\t\ttype = paramtype;\r\n\t}",
"protected void setJavaClass(Class type) {\n this._class = type;\n }",
"public void setValueClass(Class<? extends Type> valueClass) {\n this.valueClass = valueClass;\n }",
"public void setType(String newtype)\n {\n type = newtype;\n }",
"public abstract void setType();",
"public void setType(Object type)\r\n {\r\n\tthis.type = type;\r\n }",
"public void setObjtype(short newValue) {\n\tthis.objtype = newValue;\n}",
"public void setTypeParameter(String typeParameter) {\n\t\tthis.typeParameter = typeParameter;\n\t}",
"public void setType(int t) {\r\n\t\ttype = t;\r\n\t}",
"public void setClass_(String newValue);",
"public void setType(String newValue);",
"public void setType(String newValue);",
"public void setType(int t){\n this.type = t;\n }",
"public void setStaticType(Class type);",
"void setDataType(int type );",
"public void setType(Object newType) {\n if (newType == null && type == null) {\n return;\n }\n\n if (type == null || !type.equals(newType)) {\n Object oldType = type;\n type = newType;\n listeners.firePropertyChange(PROPERTY_TYPE, oldType, type);\n }\n }",
"@Override\n\tpublic void setDataType(Class<?> dataType) {\n\t\t\n\t}",
"@Override\n\tpublic void setType(Type t) {\n\t\theldObj.setType(t);\n\t}",
"@Override\n\tpublic void type() {\n\t\t\n\t}",
"public void setType( Type type ) {\n assert type != null;\n this.type = type;\n }",
"public void setNewValues_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localNewValues_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localNewValues_descriptionType=param;\n \n\n }",
"public void setType(int type) {\n type_ = type;\n }",
"public void set_type(String t)\n {\n type =t;\n }",
"public void setType(Type type){\n\t\tthis.type = type;\n\t}",
"public void setType(String type);",
"public void setType(String type);",
"public void setType(String type);",
"public TypeParameterListNode getTypeParameters()throws ClassCastException;",
"@Override\n\tpublic void setType(String type) {\n\t}",
"void setType(java.lang.String type);",
"UpdateType updateType();",
"protected ForType(TypeDescription typeDescription) {\n this.typeDescription = typeDescription;\n }",
"public void setT(Type t) {\n \t\tthis.t = t;\n \t}",
"public void setType(String inType)\n {\n\ttype = inType;\n }",
"public void setType(Type type) {\n this.type = type;\n }",
"public void setType(Type type) {\n this.type = type;\n }",
"public void setType(Type type) {\n this.type = type;\n }",
"public void setType(final int t) {\n\t\ttype = t;\n\t}",
"protected void setType(Class<?> type) {\n\t\tproxy.setType(type);\n\t}",
"void modelType(Class<?> modelType);",
"void setTypeMapper (TypeMapper typeMapper);",
"void setForPersistentMapping_Type(Type type) {\n this.type = type;\n }",
"public void setType(type type) {\r\n\t\tthis.Type = type;\r\n\t}",
"public void setType(Integer type) {\r\n\t\tthis.type = type;\r\n\t}",
"void setType(ASTTypeSpecNode typeSpecNode)\n {\n this.type = Type.parse(typeSpecNode);\n }",
"public void setType(String name){\n\t\ttype = name;\n\t}",
"public Builder setValueClass(Type valueType) {\n this.valueType = valueType;\n return this;\n }",
"public void setPreparedStatementType(Class<? extends PreparedStatement> preparedStatementType)\r\n/* 30: */ {\r\n/* 31: 78 */ this.preparedStatementType = preparedStatementType;\r\n/* 32: */ }",
"public void setOldValues_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localOldValues_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localOldValues_descriptionType=param;\n \n\n }",
"public void setStatementType(Class<? extends Statement> statementType)\r\n/* 25: */ {\r\n/* 26: 71 */ this.statementType = statementType;\r\n/* 27: */ }",
"public void buildTypeParamInfo() {\n\t\twriter.writeTypeParamInfo();\n\t}",
"public void change_type(int type_){\n\t\ttype = type_;\n\t\tif(type != 0)\n\t\t\toccupe = 1;\n\t}",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n\t\tthis.type = type;\n\t}",
"public void setParams(Class[] types) {\n if (types == null)\n setParams((String[]) null);\n else {\n String[] names = new String[types.length];\n for (int i = 0; i < types.length; i++)\n names[i] = types[i].getName();\n setParams(names);\n }\n }",
"@Override\n public void setParameters(Map<Enum<?>, Object> parameters) {\n }",
"public void setType(int value) {\n this.type = value;\n }",
"public void setType (int type) {\n this.type = type;\n }",
"public void setType (int type) {\n this.type = type;\n }",
"public void setTypeid(Long typeid) {\n this.typeid = typeid;\n }",
"public void setType(int pType) {\n mType = pType;\n }",
"public void setOldProperty_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localOldProperty_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localOldProperty_descriptionType=param;\n \n\n }",
"public void setType( int type ) {\r\n typ = type;\r\n }",
"public void setNewProperty_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localNewProperty_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localNewProperty_descriptionType=param;\n \n\n }",
"public void setParameterType(java.lang.Integer parameterType) {\r\n this.parameterType = parameterType;\r\n }",
"public void setNewCardinalityType(int param){\n \n // setting primitive attribute tracker to true\n localNewCardinalityTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localNewCardinalityType=param;\n \n\n }",
"private void setupPrimitiveTypes()\n {\n primitiveTypes.add(INTEGER_TYPE);\n primitiveTypes.add(FLOAT_TYPE);\n primitiveTypes.add(DOUBLE_TYPE);\n primitiveTypes.add(STRING_TYPE);\n primitiveTypes.add(BOOL_TYPE);\n primitiveTypes.add(TIMESTAMP_TYPE);\n }",
"public void setOldCardinalityType(int param){\n \n // setting primitive attribute tracker to true\n localOldCardinalityTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localOldCardinalityType=param;\n \n\n }",
"public void setType(String t) {\n\ttype = t;\n }",
"void setType(String type) {\n this.type = type;\n }",
"public void setClazz(String clazz);",
"public void setType(int atype)\n {\n type = atype;\n }",
"public void setType (String typ) {\n type = typ;\n }",
"public void setType(int type) {\r\n this.type = type;\r\n }",
"public void setType(int type) {\r\n this.type = type;\r\n }",
"public void setType(long type) {\r\n this.type = type;\r\n }",
"private JavaType(Type elementType) {\n this.elementType = elementType;\n }",
"private void setType(String type) {\n mType = type;\n }",
"public void setAnyType(java.lang.Object param) {\n this.localAnyType = param;\n }",
"public void addTargetParameterType(Class<?> type) {\n this.targetParameterTypes.add(type);\n }",
"void addConstructorParametersTypes(final List<Class<?>> parametersTypes) {\r\n\t\tconstructorParametersTypes.add(parametersTypes);\r\n\t}",
"public void setType(int tmp) {\n this.type = tmp;\n }",
"public void setValueType(int newValueType) {\n\t\t\tvalueType = newValueType;\n\t\t}"
] |
[
"0.66773605",
"0.6354247",
"0.63449836",
"0.6229896",
"0.6229871",
"0.6228351",
"0.6197426",
"0.61876345",
"0.617718",
"0.61344427",
"0.6109205",
"0.60922647",
"0.6074023",
"0.60698086",
"0.604767",
"0.6046362",
"0.6017274",
"0.5960914",
"0.5946201",
"0.59413666",
"0.5933928",
"0.5915216",
"0.5915216",
"0.5911",
"0.590315",
"0.5891074",
"0.5886088",
"0.5881029",
"0.58730817",
"0.5829499",
"0.5816465",
"0.5815266",
"0.58036774",
"0.5778292",
"0.5774944",
"0.575935",
"0.575935",
"0.575935",
"0.5750443",
"0.57502264",
"0.5744528",
"0.5742658",
"0.57416534",
"0.572497",
"0.57173824",
"0.57125026",
"0.57125026",
"0.57125026",
"0.5707753",
"0.570605",
"0.5701404",
"0.57004505",
"0.5697668",
"0.5697473",
"0.569535",
"0.56952167",
"0.56950194",
"0.5694117",
"0.5688304",
"0.5673002",
"0.5669358",
"0.5663703",
"0.56425077",
"0.56377393",
"0.56377393",
"0.56377393",
"0.56377393",
"0.56377393",
"0.56377393",
"0.56377393",
"0.5627848",
"0.56200755",
"0.56184894",
"0.5616776",
"0.5605024",
"0.5605024",
"0.5603543",
"0.5602071",
"0.560142",
"0.5597282",
"0.55925155",
"0.5588095",
"0.55824375",
"0.5579585",
"0.55741",
"0.557198",
"0.5558897",
"0.5557375",
"0.55567497",
"0.55526596",
"0.5551194",
"0.5551194",
"0.55451894",
"0.5542554",
"0.5531193",
"0.5530766",
"0.5525368",
"0.5516987",
"0.55152094",
"0.55100244"
] |
0.6967888
|
0
|
Changes this class's type parameters.
|
public void setUnionForTypeParameters(NodeUnion<? extends TypeParameterListNode> typeParameters) throws NullPointerException;
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setTypeParameters(TypeParameterListNode typeParameters);",
"void setClassType(String classType);",
"public void setType(Class type) {\n\t this.type = type;\n\t }",
"public void changeToType(TYPE type){\n this.type=type;\n return;\n }",
"void setType(Type type)\n {\n this.type = type;\n }",
"public void setType(Type t) {\n type = t;\n }",
"protected void setType(String newType) {\n\t\ttype = newType;\n\t}",
"void changeType(NoteTypes newType) {\n this.type = newType;\n }",
"public void setType(String newVal) {\n if ((newVal != null && this.type != null && (newVal.compareTo(this.type) == 0)) || \n (newVal == null && this.type == null && type_is_initialized)) {\n return; \n } \n this.type = newVal; \n\n type_is_modified = true; \n type_is_initialized = true; \n }",
"public void setType(Type t) {\n\t\ttype = t;\n\t}",
"public void setType(java.lang.String newType) {\n\ttype = newType;\n}",
"public void setDataType(Class newclass) {\n datatype=newclass;\n }",
"public void setType(int paramtype)\r\n\t{\r\n\t\ttype = paramtype;\r\n\t}",
"protected void setJavaClass(Class type) {\n this._class = type;\n }",
"public void setValueClass(Class<? extends Type> valueClass) {\n this.valueClass = valueClass;\n }",
"public abstract void setType();",
"public void setType(String newtype)\n {\n type = newtype;\n }",
"public void setType(Object type)\r\n {\r\n\tthis.type = type;\r\n }",
"public void setObjtype(short newValue) {\n\tthis.objtype = newValue;\n}",
"public void setTypeParameter(String typeParameter) {\n\t\tthis.typeParameter = typeParameter;\n\t}",
"public void setType(int t) {\r\n\t\ttype = t;\r\n\t}",
"public void setClass_(String newValue);",
"public void setType(String newValue);",
"public void setType(String newValue);",
"public void setType(int t){\n this.type = t;\n }",
"public void setStaticType(Class type);",
"void setDataType(int type );",
"public void setType(Object newType) {\n if (newType == null && type == null) {\n return;\n }\n\n if (type == null || !type.equals(newType)) {\n Object oldType = type;\n type = newType;\n listeners.firePropertyChange(PROPERTY_TYPE, oldType, type);\n }\n }",
"@Override\n\tpublic void setDataType(Class<?> dataType) {\n\t\t\n\t}",
"@Override\n\tpublic void setType(Type t) {\n\t\theldObj.setType(t);\n\t}",
"@Override\n\tpublic void type() {\n\t\t\n\t}",
"public void setNewValues_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localNewValues_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localNewValues_descriptionType=param;\n \n\n }",
"public void setType( Type type ) {\n assert type != null;\n this.type = type;\n }",
"public void setType(int type) {\n type_ = type;\n }",
"public void set_type(String t)\n {\n type =t;\n }",
"public void setType(Type type){\n\t\tthis.type = type;\n\t}",
"public void setType(String type);",
"public void setType(String type);",
"public void setType(String type);",
"public TypeParameterListNode getTypeParameters()throws ClassCastException;",
"@Override\n\tpublic void setType(String type) {\n\t}",
"UpdateType updateType();",
"void setType(java.lang.String type);",
"protected ForType(TypeDescription typeDescription) {\n this.typeDescription = typeDescription;\n }",
"public void setT(Type t) {\n \t\tthis.t = t;\n \t}",
"public void setType(String inType)\n {\n\ttype = inType;\n }",
"public void setType(Type type) {\n this.type = type;\n }",
"public void setType(Type type) {\n this.type = type;\n }",
"public void setType(Type type) {\n this.type = type;\n }",
"public void setType(final int t) {\n\t\ttype = t;\n\t}",
"protected void setType(Class<?> type) {\n\t\tproxy.setType(type);\n\t}",
"void modelType(Class<?> modelType);",
"void setTypeMapper (TypeMapper typeMapper);",
"void setForPersistentMapping_Type(Type type) {\n this.type = type;\n }",
"public Builder setValueClass(Type valueType) {\n this.valueType = valueType;\n return this;\n }",
"public void setType(type type) {\r\n\t\tthis.Type = type;\r\n\t}",
"public void setType(String name){\n\t\ttype = name;\n\t}",
"void setType(ASTTypeSpecNode typeSpecNode)\n {\n this.type = Type.parse(typeSpecNode);\n }",
"public void setType(Integer type) {\r\n\t\tthis.type = type;\r\n\t}",
"public void setPreparedStatementType(Class<? extends PreparedStatement> preparedStatementType)\r\n/* 30: */ {\r\n/* 31: 78 */ this.preparedStatementType = preparedStatementType;\r\n/* 32: */ }",
"public void setOldValues_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localOldValues_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localOldValues_descriptionType=param;\n \n\n }",
"public void setStatementType(Class<? extends Statement> statementType)\r\n/* 25: */ {\r\n/* 26: 71 */ this.statementType = statementType;\r\n/* 27: */ }",
"public void buildTypeParamInfo() {\n\t\twriter.writeTypeParamInfo();\n\t}",
"public void change_type(int type_){\n\t\ttype = type_;\n\t\tif(type != 0)\n\t\t\toccupe = 1;\n\t}",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n this.type = type;\n }",
"public void setType(Integer type) {\n\t\tthis.type = type;\n\t}",
"@Override\n public void setParameters(Map<Enum<?>, Object> parameters) {\n }",
"public void setParams(Class[] types) {\n if (types == null)\n setParams((String[]) null);\n else {\n String[] names = new String[types.length];\n for (int i = 0; i < types.length; i++)\n names[i] = types[i].getName();\n setParams(names);\n }\n }",
"public void setType(int value) {\n this.type = value;\n }",
"public void setOldProperty_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localOldProperty_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localOldProperty_descriptionType=param;\n \n\n }",
"public void setTypeid(Long typeid) {\n this.typeid = typeid;\n }",
"public void setType (int type) {\n this.type = type;\n }",
"public void setType (int type) {\n this.type = type;\n }",
"public void setType(int pType) {\n mType = pType;\n }",
"public void setType( int type ) {\r\n typ = type;\r\n }",
"public void setNewProperty_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localNewProperty_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localNewProperty_descriptionType=param;\n \n\n }",
"public void setParameterType(java.lang.Integer parameterType) {\r\n this.parameterType = parameterType;\r\n }",
"public void setNewCardinalityType(int param){\n \n // setting primitive attribute tracker to true\n localNewCardinalityTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localNewCardinalityType=param;\n \n\n }",
"private void setupPrimitiveTypes()\n {\n primitiveTypes.add(INTEGER_TYPE);\n primitiveTypes.add(FLOAT_TYPE);\n primitiveTypes.add(DOUBLE_TYPE);\n primitiveTypes.add(STRING_TYPE);\n primitiveTypes.add(BOOL_TYPE);\n primitiveTypes.add(TIMESTAMP_TYPE);\n }",
"public void setOldCardinalityType(int param){\n \n // setting primitive attribute tracker to true\n localOldCardinalityTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localOldCardinalityType=param;\n \n\n }",
"public void setType(String t) {\n\ttype = t;\n }",
"public void setClazz(String clazz);",
"void setType(String type) {\n this.type = type;\n }",
"public void setType(int atype)\n {\n type = atype;\n }",
"public void setType (String typ) {\n type = typ;\n }",
"public void setType(int type) {\r\n this.type = type;\r\n }",
"public void setType(int type) {\r\n this.type = type;\r\n }",
"private JavaType(Type elementType) {\n this.elementType = elementType;\n }",
"public void setType(long type) {\r\n this.type = type;\r\n }",
"public void setAnyType(java.lang.Object param) {\n this.localAnyType = param;\n }",
"private void setType(String type) {\n mType = type;\n }",
"public void addTargetParameterType(Class<?> type) {\n this.targetParameterTypes.add(type);\n }",
"void addConstructorParametersTypes(final List<Class<?>> parametersTypes) {\r\n\t\tconstructorParametersTypes.add(parametersTypes);\r\n\t}",
"public void setType(int tmp) {\n this.type = tmp;\n }",
"public void setValueType(int newValueType) {\n\t\t\tvalueType = newValueType;\n\t\t}"
] |
[
"0.6964121",
"0.66765946",
"0.635102",
"0.6342793",
"0.6226015",
"0.62259525",
"0.6225524",
"0.6195467",
"0.61846226",
"0.617339",
"0.61308664",
"0.6111279",
"0.60891175",
"0.60734767",
"0.6071469",
"0.6044533",
"0.60443467",
"0.6012822",
"0.59603155",
"0.5941789",
"0.59389013",
"0.5936128",
"0.59130824",
"0.59130824",
"0.590839",
"0.59006584",
"0.58892584",
"0.5882892",
"0.5880952",
"0.5870715",
"0.58286124",
"0.5815589",
"0.5812306",
"0.5800194",
"0.5774367",
"0.5770511",
"0.5755262",
"0.5755262",
"0.5755262",
"0.5748252",
"0.5745835",
"0.5741139",
"0.57404184",
"0.57400125",
"0.57239157",
"0.57132715",
"0.5707587",
"0.5707587",
"0.5707587",
"0.5705215",
"0.5702635",
"0.5700509",
"0.56981385",
"0.56945455",
"0.56934035",
"0.56933004",
"0.5692567",
"0.5692137",
"0.56914055",
"0.5687008",
"0.5673598",
"0.5668063",
"0.5661975",
"0.5639059",
"0.5633738",
"0.5633738",
"0.5633738",
"0.5633738",
"0.5633738",
"0.5633738",
"0.5633738",
"0.562385",
"0.5620033",
"0.5619271",
"0.5614758",
"0.5601574",
"0.56011885",
"0.560098",
"0.560098",
"0.5598444",
"0.5593158",
"0.559237",
"0.55859834",
"0.558347",
"0.5580142",
"0.55754733",
"0.5568193",
"0.5557441",
"0.5553969",
"0.5552991",
"0.554765",
"0.55471474",
"0.55471474",
"0.5541496",
"0.5541469",
"0.5530675",
"0.5526321",
"0.5523196",
"0.55162203",
"0.5512967",
"0.5508623"
] |
0.0
|
-1
|
Generates a deep copy of this node.
|
@Override
public AbstractlyUnmodifiedClassDeclarationNode<T> deepCopy(BsjNodeFactory factory);
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public abstract Node copy();",
"public T cloneDeep();",
"public abstract TreeNode copy();",
"public Tree<K, V> copy() {\n\t\tTree<K, V> copy = EmptyTree.getInstance(), t = this;\n\t\treturn copy(t, copy);\n\t}",
"public AST copy()\n {\n return new Implicate(left, right);\n }",
"public abstract Type treeCopy();",
"public directed_weighted_graph deepCopy() {\n DWGraph_DS copyGraph = new DWGraph_DS(this); //create a new graph with the original graph data (only primitives)\n HashMap<Integer, node_data> copyNodesMap = new HashMap<>(); //create a new nodes HashMap for the new graph\n for (node_data node : nodes.values()) { //loop through all nodes in the original graph\n copyNodesMap.put(node.getKey(), new NodeData((NodeData) node)); //makes a duplicate of the original HashMap\n }\n copyGraph.nodes = copyNodesMap; //set the new graph nodes to the new HashMap we made.\n return copyGraph;\n }",
"Component deepClone();",
"@Override\n public ExpressionNode deepCopy(BsjNodeFactory factory);",
"@Override\r\n\tpublic BinaryNodeInterface<E> copy() {\n\t\treturn null;\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n @Override\n public <T extends JsonNode> T deepCopy() { return (T) this; }",
"@Override\n\tpublic graph copy() {\n\t\tgraph copy = new DGraph();\n\t\tCollection<node_data> nColl = this.GA.getV();\n\t\tfor (node_data node : nColl) {\n\t\t\tnode_data temp = new Node((Node) node );\n\t\t\tcopy.addNode(node);\n\t\t}\n\t\tCollection<node_data> nColl2 = this.GA.getV();\n\t\tfor (node_data node1 : nColl2) {\n\t\t\tCollection<edge_data> eColl = this.GA.getE(node1.getKey());\n\t\t\tif (eColl!=null) {\n\t\t\t\tfor (edge_data edge : eColl) {\n\t\t\t\t\tcopy.connect(edge.getSrc(), edge.getDest(), edge.getWeight());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn copy;\n\t}",
"public CopyBuilder copy() {\n return new CopyBuilder(this);\n }",
"public Expression deepCopy()\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}",
"public Object clone()\n\t{\n\t\treturn new Tree();\n\t}",
"@Override\n\tpublic Expression copy() {\n\t\treturn null;\n\t}",
"@Override\r\n\t\tpublic Node cloneNode(boolean deep)\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"@Override\n public weighted_graph copy() {\n weighted_graph copy = new WGraph_DS(this.ga);//create the copy graph via copy constructor\n return copy;\n }",
"Prototype makeCopy();",
"public abstract OtTreeNodeWidget copy();",
"@Override\n public MetaprogramTargetNode deepCopy(BsjNodeFactory factory);",
"@Override\r\n public weighted_graph copy() {\n weighted_graph copy = new WGraph_DS();\r\n for (node_info curr : this.Graph.getV()) { //The loop passes through all the ver' of the graph\r\n Nodes t = new Nodes(curr); //create new node\r\n copy.addNode(t.key); //copy the the old node to the new node\r\n }\r\n for (node_info curr0 : this.Graph.getV()) {\r\n for (node_info curr1 : this.Graph.getV(curr0.getKey())) { //this loops pass over the all nodes and copy the connection\r\n double i = this.Graph.getEdge(curr0.getKey(), curr1.getKey());\r\n if (i != -1) {\r\n copy.connect(curr0.getKey(), curr1.getKey(), i);\r\n }\r\n }\r\n }\r\n return copy;\r\n\r\n }",
"@Override\n\tpublic MapNode clone()\n\t{\n\t\t// Create copy of this map node\n\t\tMapNode copy = (MapNode)super.clone();\n\n\t\t// Copy KV pairs\n\t\tcopy.pairs = new LinkedHashMap<>();\n\t\tfor (Map.Entry<String, AbstractNode> pair : pairs.entrySet())\n\t\t{\n\t\t\tAbstractNode value = pair.getValue().clone();\n\t\t\tcopy.pairs.put(pair.getKey(), value);\n\t\t\tvalue.setParent(copy);\n\t\t}\n\n\t\t// Return copy\n\t\treturn copy;\n\t}",
"public Complex makeDeepCopy() {\r\n Complex complex2 = new Complex(this.getReal(), this.getImaginary());\r\n return complex2;\r\n }",
"public Object clone() {\n return this.copy();\n }",
"@Override\n\t\tpublic ImmutableSequentialGraph copy() {\n\t\t\treturn new ComposedGraph( g0, g1.copy() );\n\t\t}",
"public RandomNetworkGenerator copy()\n\t{\n\t\t\n\t\treturn new DegreePreservingNetworkRandomizer(mOriginal, mDirected, mIterations); \n\t}",
"public JsonMember copy() {\n return new JsonMember(name, value.copy());\n }",
"private void copy(Node node){\n parent_ = node.parent_;\n size_ = node.size_;\n for(int i = 0; i < size_; i++)\n children_[i] = node.children_[i];\n }",
"public BinaryNode copy() {\n\t\tBinaryNode newRoot = new BinaryNode(data);\n\t\tif(leftChild != null)\n\t\t\tnewRoot.setLeftChild(leftChild.copy());\n\t\tif(rightChild != null)\n\t\t\tnewRoot.setRightChild(rightChild.copy());\n\t\treturn newRoot;\n\t}",
"public weighted_graph copy();",
"Object clone();",
"Object clone();",
"@Override\n public VariableListNode deepCopy(BsjNodeFactory factory);",
"public Expression deepCopy (){\n return new LiteralExpression(_value);\n }",
"public abstract Type treeCopyNoTransform();",
"@Override\n public Node clone() {\n Node node = null;\n try {\n node = (Node) super.clone();\n } catch (Exception e) {\n System.err.println(\"Unable to clone!\");\n e.printStackTrace();\n }\n return node;\n }",
"public Function clone();",
"private Shop deepCopy() {\n BookShop obj = null;\n try {\n obj = (BookShop) super.clone();\n List<Book> books = new ArrayList<>();\n Iterator<Book> iterator = this.getBooks().iterator();\n while(iterator.hasNext()){\n\n books.add((Book) iterator.next().clone());\n }\n obj.setBooks(books);\n } catch (CloneNotSupportedException exc) {\n exc.printStackTrace();\n }\n return obj;\n }",
"public Object clone(){\n \t\n \treturn this;\n \t\n }",
"@Override\r\n\tpublic LogicalValue copy() {\r\n\t\treturn new Pointer(target);\r\n\t}",
"public Object clone() {\n // No problems cloning here since private variables are immutable\n return super.clone();\n }",
"public O copy() {\n return value();\n }",
"public Coordinates copy() {\n\t\treturn new Coordinates(this);\n\t}",
"public AccessPath copy() {\n HashMap m = new HashMap();\n IdentityHashCodeWrapper ap = IdentityHashCodeWrapper.create(this);\n AccessPath p = new AccessPath(this._field, this._n, this._last);\n m.put(ap, p);\n this.copy(m, p);\n return p;\n }",
"public CFExp deepCopy(){\r\n return this;\r\n }",
"public Object clone();",
"public Object clone();",
"public Object clone();",
"public Object clone();",
"public Call treeCopy() {\n Call tree = (Call) copy();\n if (children != null) {\n for (int i = 0; i < children.length; ++i) {\n ASTNode child = (ASTNode) getChild(i);\n if (child != null) {\n child = child.treeCopy();\n tree.setChild(child, i);\n }\n }\n }\n return tree;\n }",
"public State dup (State self)\n {\n if (self == null)\n return null;\n\n State copy = new State ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.address = self.address;\n copy.addressPort = self.addressPort;\n copy.generation = self.generation;\n copy.max_version = self.max_version;\n copy.extra = new VersionedMap (self.extra);\n return copy;\n }",
"private Instances deepCopy(Instances data) {\n Instances newInst = new Instances(data);\n\n newInst.clear();\n\n for (int i = 0; i < data.size(); i++) {\n Instance ni = new DenseInstance(data.numAttributes());\n for (int j = 0; j < data.numAttributes(); j++) {\n ni.setValue(newInst.attribute(j), data.instance(i).value(data.attribute(j)));\n }\n newInst.add(ni);\n }\n\n return newInst;\n }",
"public Tree<T> clone() {\n Node<T> clonedRoot = this.root.clone();\n clone(this.root, this.root.clone());\n return new Tree<T>(clonedRoot);\n }",
"abstract public Vertex cloneMe();",
"public Closure copy_function(){\n Closure newClosure = new Closure(this.getParent(), this.getNode());\n newClosure.isFunction = this.isFunction;\n newClosure.returning = this.returning;\n newClosure.belongObject = this.belongObject;\n return newClosure;\n }",
"default C cloneFlat() {\n\t\treturn clone(FieldGraph.of(getFields()));\n\t}",
"public Tree copy() {\n Tree cpTree = new Tree();\n if(!empty()) {\n Node cpNode = copyNodes(root);\n cpTree.setRoot(cpNode);\n }\n return cpTree;\n }",
"public Node clone() {\n Node n = new Node((float) this.getSimPos().getX(), (float) this.getSimPos().getY(), radius*2, isStationary, this.renderColor);\n n.node_uuid = this.node_uuid;\n return n;\n }",
"public T copy() {\n T ret = createLike();\n ret.getMatrix().setTo(this.getMatrix());\n return ret;\n }",
"public Node cloneNode(final boolean deep) {\n // TODO Auto-generated method stub\n return null;\n }",
"public Node cloneNode(boolean deep) {\n/* 320 */ cloneDeepCheck(deep);\n/* */ \n/* 322 */ return new PoaMaestroMultivaloresHTML(this);\n/* */ }",
"Nda<V> deepCopy();",
"public abstract INodo copy();",
"IGLProperty clone();",
"@Override\n public AggregationBuilder clone() {\n try {\n AggregationBuilder clone = (AggregationBuilder) super.clone();\n clone.root = root.clone();\n clone.current = clone.root;\n return clone;\n } catch(CloneNotSupportedException ex){\n return null;\n }\n }",
"@Override\n public ISentence clone() {\n WordNode newSentence = new WordNode(this.word, restOfSentence.clone());\n return newSentence;\n }",
"@Override\n public Object clone() {\n return super.clone();\n }",
"public RMShape cloneDeep() { return clone(); }",
"Model copy();",
"@Override\r\n public NumericObjectArrayList makeDeepCopy() {\r\n NumericObjectArrayList list = new NumericObjectArrayList();\r\n for (int i = 0; i < this.getCount(); i++) {\r\n try {\r\n list.insert(i, this.getValueAt(i));\r\n } catch (IndexRangeException ex) {\r\n //Shouldn't happen\r\n }\r\n }\r\n return list;\r\n }",
"public abstract B copy();",
"public abstract LambdaTerm deepCopy();",
"public Node cloneNode(boolean deep) {\n/* 258 */ cloneDeepCheck(deep);\n/* */ \n/* 260 */ return new AdmClientePreferencialHTML(this);\n/* */ }",
"public Object clone() {\n\t\treturn new RelExpr((Term)getTerm(0).clone(), op, (Term)getTerm(1).clone());\n\t}",
"public abstract Object clone();",
"public QueryNode cloneTree() throws CloneNotSupportedException;",
"@Override\r\n @GwtIncompatible\r\n public Object clone() {\r\n try {\r\n @SuppressWarnings(\"unchecked\")\r\n PairBuilder<L, R> result = (PairBuilder<L, R>)super.clone();\r\n result.self = result;\r\n return result;\r\n } catch (CloneNotSupportedException e) {\r\n throw new InternalError(e.getMessage());\r\n }\r\n }",
"public /*@ non_null @*/ Object clone() {\n return this;\n }",
"public Solution deepClone() {\n\t\tArrayList<GridPoint> cloneRepresentation = new ArrayList<GridPoint>();\n\t\t\n\t\tfor(GridPoint p : solutionRepresentation) {\n\t\t\tint[] coord = new int[2];\n\t\t\tcoord[0] = p.getX();\n\t\t\tcoord[1] = p.getY();\n\t\t\tcloneRepresentation.add(new GridPoint(coord));\n\t\t}\n\t\treturn new Solution(this.host, cloneRepresentation);\n\t}",
"@Override\n public TypeParameterNode deepCopy(BsjNodeFactory factory);",
"public Address copy() {\n\t\tAddress copy = new Address(this.street, this.city, this.state, this.zipCode);\n\t\treturn copy;\n\t}",
"static ExpNode copy(ExpNode root) {\n\n if (root instanceof ConstNode) {\n return new ConstNode(((ConstNode).root).number);\n }\n else if (root instanceof VariableNode) {\n return new VariableNode();\n }\n else {\n Bin0pNode node = (Bin0pNode)root;\n // Left and right operand trees have to be copied not only referenced\n return new Bin0pNode(node.op, copy(node.left). copy(node.right));\n }\n }",
"@Override\n public FieldEntity copy()\n {\n return state.copy();\n }",
"@Override\n public directed_weighted_graph copy() {\n try {\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n ObjectOutputStream oos = new ObjectOutputStream(bos);\n oos.writeObject(G);\n oos.flush();\n oos.close();\n bos.close();\n byte[] byteData = bos.toByteArray();\n\n ByteArrayInputStream bis = new ByteArrayInputStream(byteData);\n return (directed_weighted_graph) (new ObjectInputStream(bis).readObject());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }",
"public SubstitutedBodyDecl treeCopy() {\n SubstitutedBodyDecl tree = (SubstitutedBodyDecl) copy();\n if (children != null) {\n for (int i = 0; i < children.length; ++i) {\n ASTNode child = (ASTNode) getChild(i);\n if (child != null) {\n child = child.treeCopy();\n tree.setChild(child, i);\n }\n }\n }\n return tree;\n }",
"public MemberAddress clone() {\r\n try {\r\n return (MemberAddress)super.clone();\r\n } catch (CloneNotSupportedException e) {\r\n throw new IllegalStateException(\"Failed to clone the entity: \" + toString(), e);\r\n }\r\n }",
"@Override\n public MiniMover64RNG copy() {\n return new MiniMover64RNG(state);\n }",
"public abstract Object clone() ;",
"public State copy() {\n State that = new State(this.registers.length);\n for (int i=0; i<this.registers.length; ++i) {\n Object a = this.registers[i];\n if (a == null) continue;\n if (!(a instanceof Set))\n that.registers[i] = a;\n else\n that.registers[i] = NodeSet.FACTORY.makeSet((Set)a);\n }\n if(TRACE_REGISTERS) System.out.println(\"Copying state \" + Arrays.asList(that.registers));\n return that;\n }",
"public ProcessedDynamicData deepCopy( ) {\r\n\r\n ProcessedDynamicData copy = new ProcessedDynamicData( this.channelId );\r\n\r\n copy.channelId = this.channelId;\r\n copy.dateTimeStamp = new java.util.Date( this.dateTimeStamp.getTime() );\r\n copy.samplingRate = this.samplingRate;\r\n copy.eu = this.eu;\r\n\r\n copy.min = this.min;\r\n copy.max = this.max;\r\n\r\n copy.measurementType = this.measurementType;\r\n copy.measurementUnit = this.measurementUnit;\r\n\r\n // data and labels\r\n List<Double> dataCopy = new Vector<Double>();\r\n for( int i = 0; i < this.data.size(); i++ ) {\r\n dataCopy.add( new Double( this.data.get( i ) ) );\r\n }\r\n copy.setData( dataCopy );\r\n\r\n List<Double> dataLabels = new Vector<Double>();\r\n for( int i = 0; i < this.dataLabels.size(); i++ ) {\r\n dataLabels.add( new Double( this.dataLabels.get( i ) ) );\r\n }\r\n copy.setDataLabels( dataLabels );\r\n\r\n // create a deep copy of overalls\r\n if( overalls != null ) {\r\n copy.overalls = new OverallLevels( this.overalls.getChannelId() );\r\n copy.overalls.setDateTimeStampMillis( this.getDateTimeStampMillis() );\r\n Vector<String> overallKeys = this.overalls.getKeys();\r\n for( int i = 0; i < overallKeys.size(); i++ ) {\r\n copy.overalls.addOverall( new String( overallKeys.elementAt( i ) ),\r\n new Double( this.overalls.getOverall( overallKeys.elementAt( i ) ) ) );\r\n }\r\n }\r\n\r\n copy.xEUnit = this.xEUnit;\r\n copy.yEUnit = this.yEUnit;\r\n\r\n copy.xSymbol = this.xSymbol;\r\n copy.ySymbol = this.ySymbol;\r\n copy.xPhysDomain = this.xPhysDomain;\r\n copy.yPhysDomain = this.yPhysDomain;\r\n \r\n copy.noOfAppendedZeros = this.noOfAppendedZeros;\r\n\r\n return copy;\r\n }",
"private void selfClone() {\n stroke = stroke.clone();\n }",
"public IntTree copy () {\n\t\tIntTree that = new IntTree ();\n\t\tfor (int key : levelOrder())\n\t\t\tthat.put (key);\n\t\treturn that;\n\t}",
"Nda<V> shallowCopy();",
"public Restaurant clone() {\r\n return new Restaurant(this);\r\n }",
"@Override\n public LocalStore<V> copy() {\n return this;\n }",
"public Punch getShallowCopy(){\n Punch p = new Punch();\n p.id = id;\n p.time = time;\n //p.taskId = punchTask.getID();\n return p;\n }",
"public Object clone() {\n \t\treturn new Term(this);\n \t}",
"public Instance cloneShallow() {\n Instance copy;\n try {\n copy = new Instance(getNameValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (Instance)cloneShallowContent(copy);\n }",
"public Call treeCopyNoTransform() {\n Call tree = (Call) copy();\n if (children != null) {\n for (int i = 0; i < children.length; ++i) {\n ASTNode child = (ASTNode) children[i];\n if (child != null) {\n child = child.treeCopyNoTransform();\n tree.setChild(child, i);\n }\n }\n }\n return tree;\n }",
"public ConfabulatorObject getCopy() {\n\t\tConfabulatorObject copy = new ConfabulatorObject(getMessenger());\n\t\tlockMe(this);\n\t\tint maxD = maxLinkDistance;\n\t\tint maxC = maxLinkCount;\n\t\tList<Link> linksCopy = new ArrayList<Link>();\n\t\tfor (Link lnk: links) {\n\t\t\tlinksCopy.add(lnk.getCopy());\n\t\t}\n\t\tunlockMe(this);\n\t\tcopy.initialize(maxD,maxC,linksCopy);\n\t\treturn copy;\n\t}"
] |
[
"0.77869254",
"0.7235399",
"0.71756494",
"0.7156478",
"0.70259875",
"0.69406664",
"0.6911544",
"0.69019204",
"0.6896577",
"0.6879466",
"0.68611926",
"0.6819145",
"0.6810453",
"0.675539",
"0.66925204",
"0.66673297",
"0.66506404",
"0.6644279",
"0.6630261",
"0.66157734",
"0.66149265",
"0.66109926",
"0.6591311",
"0.6589239",
"0.65884906",
"0.65755457",
"0.65636015",
"0.6535762",
"0.6533477",
"0.65169305",
"0.65150535",
"0.65099627",
"0.65099627",
"0.6493278",
"0.6492057",
"0.6486609",
"0.64791673",
"0.6419743",
"0.64160323",
"0.6410316",
"0.63830304",
"0.63716316",
"0.6358896",
"0.634764",
"0.63441753",
"0.63238883",
"0.63087803",
"0.63087803",
"0.63087803",
"0.63087803",
"0.6301501",
"0.6297924",
"0.62908727",
"0.6281004",
"0.6277664",
"0.625059",
"0.6243762",
"0.62343615",
"0.6232303",
"0.62316155",
"0.62221116",
"0.62174094",
"0.6215504",
"0.62106633",
"0.6202379",
"0.6199096",
"0.61752725",
"0.6148965",
"0.61485285",
"0.6141045",
"0.61370194",
"0.6135108",
"0.61310697",
"0.6129881",
"0.61244017",
"0.6124163",
"0.61116487",
"0.6106709",
"0.6106188",
"0.61039865",
"0.6096215",
"0.6087466",
"0.60812396",
"0.6080831",
"0.60712475",
"0.60663766",
"0.60642797",
"0.60590136",
"0.6058576",
"0.6054926",
"0.6053361",
"0.60387164",
"0.6037343",
"0.6035217",
"0.6018558",
"0.60151666",
"0.6013895",
"0.60120595",
"0.6002883",
"0.59899133",
"0.5972883"
] |
0.0
|
-1
|
private final static IntWritable one = new IntWritable(1);
|
public void map(Object key, Text value, Context context
) throws IOException, InterruptedException {
String curr_string=value.toString();
/// splitting based on "*" as a delimiter...
String [] parts=curr_string.split("\\*");
String curr_key=parts[0];
// Removing spaces from both left and right part of the string..
String curr_value=parts[1].trim();
String [] small_parts=curr_value.split(",");
// Taking the count of unique files which are present in the input given to tfidf
int no_of_unique_files=Integer.parseInt(small_parts[small_parts.length-1]);
/// The formula to compute idf is log((1+no_of_files)/no_of_unique_files))....
Configuration conf=context.getConfiguration();
String value_count=conf.get("test");
if(!value_count.isEmpty())
{
int total_no_files=Integer.parseInt(value_count);
double x=(total_no_files/no_of_unique_files);
// Formula fo rcomputing the idf value....
double idf_value=Math.log10(1+x);
for(int i=0;i<small_parts.length-1;i++)
{
String [] waste=small_parts[i].split("=");
String file_name=waste[0];
// Computing the tfidf on the fly...
double tf_idf=idf_value*Double.parseDouble(waste[1]);
Text word3 = new Text();
Text word4 = new Text();
word3.set(curr_key+"#####"+file_name+",");
word4.set(tf_idf+"");
context.write(word3,word4);
}
//word1.set(curr_key);
//word2.set(idf_value+"");
//context.write(word1,word2);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"boolean isWritable();",
"@Override\n\tpublic boolean isWritable(int arg0) throws SQLException {\n\n\t\treturn true;\n\t}",
"public WeekSAWritable() {\n this.count = new IntWritable(0);\n this.week = new IntWritable(0);\n this.hashTagList = new ArrayList<>();\n }",
"public void testGetWritable_1()\n\t\tthrows Exception {\n\t\tFiles fixture = new Files();\n\t\tfixture.setAbsolutePath(\"\");\n\t\tfixture.setType(\"\");\n\t\tfixture.setReadable(\"\");\n\t\tfixture.setSize(\"\");\n\t\tfixture.setWritable((String) null);\n\t\tfixture.setExecutable(\"\");\n\t\tfixture.setMtime(\"\");\n\n\t\tString result = fixture.getWritable();\n\n\t\t\n\t\tassertEquals(\"0\", result);\n\t}",
"public ArrayListOfIntsWritable()\n {\n super();\n }",
"@Override\n\tprotected void map(LongWritable key, Text value,Context context) throws IOException, \n\tInterruptedException {\n\t\t\n\t\tfinal String inputValue=value.toString();\n\t\t\n\t\tfinal IntWritable ONE = new IntWritable(1);\n\t\t\n\t\tif(!StringUtils.isEmpty(inputValue))\n\t\t{\n\t\t\tfinal String[] words = StringUtils.splitPreserveAllTokens(inputValue, \n\t\t\t\t\tMRConstants.EMPTY.getValue());\n\t\t\tfor (String word : words) {\n\t\t\t\tcontext.write(new Text(word), ONE);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public boolean isWritable() {\n return false;\n }",
"int writerIndex();",
"@Override\n\tprotected void reduce(Text key, // Input key type\n\t\t\tIterable<NullWritable> values, // Input value type\n\t\t\tContext context) throws IOException, InterruptedException {\n\t\twordId = wordId + 1;\n\t\tcontext.write(key, new IntWritable(wordId));\n\t}",
"@Override\n\tprotected void reduce(IntWritable arg0, Iterable<Text> arg1,Context arg2)\n\t\t\tthrows IOException, InterruptedException {\n\t\tString fenzi=null;\n\t\tdouble fenmu=0;\n\t\tText reducevalue=new Text();\n\t\tfor(Text value:arg1)\n\t\t{\n\t\t\tString[] array=value.toString().split(\",\");\n\t\t\tdouble m=Double.parseDouble(array[1]);\n\t\t\tfenmu=fenmu+m;\n\t\t\tString[] points=array[0].split(\" \");\n\t\t\tString[] temps=null;\n\t\t\tStringBuilder sb=new StringBuilder();\n\t\t\tif(fenzi==null)\n\t\t\t{\n\t\t\t\t temps=new String[points.length];\n\t\t\t\t for(int i=0;i<temps.length;i++)\n\t\t\t\t {\n\t\t\t\t\t temps[i]=\"0\";\n\t\t\t\t }\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttemps=fenzi.split(\" \");\n\t\t\t}\n\t\t\tfor(int i=0;i<points.length;i++)\n\t\t\t{\n\t\t\t\tpoints[i]=(Double.parseDouble(temps[i])+Double.parseDouble(points[i]) * m)+\"\";\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i=0;i<points.length;i++)\n\t\t\t{\n\t\t\t\tsb.append(points[i]+\" \");\n\t\t\t}\n\t\t\tfenzi=sb.toString().substring(0,sb.length()-1);\n\t\t\tsb=null;\n\t\t//\tSystem.out.println(value.toString());\n\t\t}\n\t\tString[] res=fenzi.split(\" \");\n\t//\tSystem.out.println(\"fenmu=\"+fenmu);\n\t\tfor(int i=0;i<res.length;i++)\n\t\t{\n\t\t//\tSystem.out.println(\"res=\"+res[i]);\n\t\t\tres[i]=Double.parseDouble(res[i])/fenmu+\"\";\n\t\t}\n\t\tStringBuilder sb=new StringBuilder();\n\t\tfor(int i=0;i<res.length;i++)\n\t\t{\n\t\t//\tSystem.out.println(\"res=\"+res[i]);\n\t\t\tsb.append(res[i]+\" \");\n\t\t}\n\t\tfenzi=sb.toString().substring(0,sb.length()-1);\n\t\treducevalue.set(fenzi);\n\t\targ2.write(arg0, reducevalue);\n\t}",
"public boolean isWritable() {\r\n\t\treturn isWritable;\r\n\t}",
"public int ensureWritable(int minWritableBytes, boolean force)\r\n/* 125: */ {\r\n/* 126:142 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 127:143 */ return super.ensureWritable(minWritableBytes, force);\r\n/* 128: */ }",
"@Override\n\tpublic boolean isDefinitelyWritable(int arg0) throws SQLException {\n\t\treturn false;\n\t}",
"@Override \n public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException \n {\n\t String[] line2 = value.toString().split(\";\");\n String ISBN_Rating = trimQuotes(line2[1].trim()); \n\t String Rating = trimQuotes(line2[2].trim()); \n \n \n if (!ISBN_Rating.equals(\"ISBN\") && !Rating.equals(\"Book-Rating\")) \n { \t \n \t\n \t int RTNG_CD = Integer.parseInt(Rating);\n \t System.out.println(\"output from b mapper:\"+ISBN_Rating+\"\\t\"+RTNG_CD);\n \t context.write(new TextPair(new Text(ISBN_Rating), new Text(\"b\")), new IntWritable(RTNG_CD));\n } \n \n }",
"@Override\n public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n String[] array = value.toString().split(DELIMITER);\n Text year = new Text();\n year.set(array[1].trim());\n String word = array[0].trim();\n int number_of_syllables = Syllable.syllable(word);\n context.write(year, new IntWritable(number_of_syllables));\n }",
"One(){\n data = new int[DEFAULT_CAPACITY];\n }",
"public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n // Get the current line\n \n String line = value.toString();\n String[] linevalues = line.split(\"\\t\");\n IntWritable movieId = new IntWritable(Integer.parseInt(linevalues[1]));\n Text userId = new Text(linevalues[0]);\n context.write(movieId, userId);\n // for (String v : linevalues) {\n // System.out.println(\"Value: \" + v);\n // }\n // context.write(new IntWritable(Integer.parseInt(linevalues[0])), new Text(linevalues[1] + \",\" + linevalues[2]));\n }",
"@Override\n protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n\t\tString[] raw = value.toString().split(\"\\t\");\n\t\tcontext.write(new Text(raw[0]), new Text(raw[1]));\n\t}",
"@Override\n\tprotected void map(LongWritable key, Text value, Mapper<LongWritable, Text, Text, LongWritable>.Context context)\n\t\t\tthrows IOException, InterruptedException {\n\t\t\n\t\tif(value !=null && StringUtils.isNotEmpty(value.toString())){\n\t\t\tString line = value.toString();\n\t\t\tcontext.write(new Text(line.split(\"\\\\s+\")[2]), ONE);\n\t\t}\t\t\n\t}",
"@Override\n\t protected void map(Object key, Text value, \n\t Context context) throws IOException, InterruptedException {\n\t String[] strs = value.toString().split(\"\\\\s\");\n\t String label = strs[1];\n\t int id = Integer.parseInt(strs[0]);\n\t if(\"u\".equals(label)) {\n\t \tcontext.write(new VIntWritable(id), new Text(\"u\\t\"+strs[2]));\n\t } else if(\"d\".equals(label)) {\n\t \tcontext.write(new VIntWritable(id), new Text(\"d\\t\"+strs[2]));\n\t } else if(\"c\".equals(label)) {\n\t \tcontext.write(new VIntWritable(id), new Text(\"c\\t\"+strs[2]));\n\t } else {//±ß±í\n\t \tcontext.write(new VIntWritable(id), new Text(\"e\\t\"+strs[1]));\n\t }\n\t }",
"@Override\n protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n StringTokenizer tokenizer = new StringTokenizer(value.toString());\n while (tokenizer.hasMoreTokens()) {\n String word = tokenizer.nextToken();\n if (buffer.containsKey(word)) {\n buffer.put(word, buffer.get(word) + 1);\n } else {\n buffer.put(word, 1);\n }\n }\n }",
"@Override\n\tpublic int compareTo(PrefWritable arg0) {\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}",
"public MutableInt() {}",
"@Override\r\n\t\tprotected void map(LongWritable key, Text value,\r\n\t\t\t\tMapper<LongWritable, Text, PageCount_myself, NullWritable>.Context context)\r\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\tString line = value.toString();\r\n\t\t\tString[] split = line.split(\"\\t\");\r\n\t\t\t\r\n\t\t\tcontext.write(new PageCount_myself(split[0], Integer.parseInt(split[1])), NullWritable.get());\r\n\t\t\t\r\n\t\t}",
"@Override\n protected void reduce(Text key, Iterable<IntWritable> values,\n Context context) throws IOException, InterruptedException {\n int sum = 0;\n for(IntWritable value : values){\n sum += value.get();\n }\n outputValue.set(sum);\n context.write(key, outputValue);\n }",
"public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n String line = value.toString();\r\n\r\n double minPmi = Double.parseDouble(context.getConfiguration().get(\"minPmi\", \"-1\"));\r\n double relMinPmi = Double.parseDouble(context.getConfiguration().get(\"relMinPmi\",\r\n \"-1\"));\r\n\r\n String[] split = line.split(\"\\\\s+\");\r\n double npmi = Double.parseDouble(split[3]);\r\n double relnpmi = Double.parseDouble(split[4]);\r\n\r\n if (isCollocation(npmi, relnpmi, minPmi, relMinPmi)) {\r\n // key: [decade] [npmi]; value: [w1] [w2]\r\n context.write(new Text(split[0] + \" \" + split[3]), new Text(split[1] + \" \" + split[2]));\r\n }\r\n }",
"public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException \n {\n \t\n \tStringTokenizer st_11;\n \tStringBuilder str_build;\n \tConfiguration conf1=context.getConfiguration();\n \tinput1=conf1.get(\"input1\").toString();\n \tinput2=conf1.get(\"input2\").toString();\n \t\n \tint a1=Integer.parseInt(input1);\n \tint b1=Integer.parseInt(input2);\n \t \t\n \tString[] mydata = value.toString().split(\"\\t\");\n \t\n \tif(mydata.length==2)\n \t{\n \t\tif((Integer.parseInt(mydata[0])==a1)||(Integer.parseInt(mydata[0])==b1))\n \t\t{\n \t\t\t str_build = new StringBuilder();\n \t\t\t st_11= new StringTokenizer(mydata[1].toString(),\",\");\n \t\t\t \n \t\t\t while(st_11.hasMoreElements())\n \t\t {\n \t\t\t\tString temporary=st_11.nextElement().toString();\n \t\t\t\tstr_build.append(temporary);\n \t\t\t\tstr_build.append(\"-\");\n \t\t\t\tstr_build.append(usersMap.get(temporary));\n \t\t\t\tstr_build.append(\",\");\n \t\t }\n \t\t\t str_build.deleteCharAt(str_build.length()-1);\n \t\t\t context.write(new Text(\"1\"),new Text(str_build.toString()));\n \t\t}\n \t}\n \tif(mydata.length==1)\n \t{\n \t\tif((Integer.parseInt(mydata[0])==a1)||(Integer.parseInt(mydata[0])==b1))\n \t\t{\n \t\t\tcontext.write(new Text(\"1\"),new Text(\"NULL\"));\n \t\t}\n \t\t\n \t}\n \t\n }",
"@Override\n protected void writeInternal(int index, int value) {\n\n }",
"@Override\n protected void writeInternal(int index, int value) {\n\n }",
"protected abstract void write( int value ) throws IOException;",
"public int leerInt() throws IOException\r\n {\r\n return maestro.readInt(); \r\n }",
"public ByteBuf ensureWritable(int minWritableBytes)\r\n/* 119: */ {\r\n/* 120:136 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 121:137 */ return super.ensureWritable(minWritableBytes);\r\n/* 122: */ }",
"@Override\n public void map(LongWritable key, Text value, Context context)\n throws IOException, InterruptedException {\n \tString filename = ((FileSplit) context.getInputSplit())\n\t\t\t\t.getPath().getName();\n\n if (!value.toString().isEmpty()) {\n \tString line = value.toString().toLowerCase().replaceAll(\"[\\\\p{Punct}&&[^']&&[^-]]|(?<![a-zA-Z])'|'(?![a-zA-Z])|--|(?<![a-zA-Z])-|-(?![a-zA-Z])|\\\\d+\",\" \"); \t\n \tfor (String token : line.split(\"\\\\s+\")) {\n \t\tif (!token.isEmpty()) { \n \t\t\tcontext.write(new Text(token+\"#\"),new Text(\"1\")); // write # words and 1\n \t\tcontext.write(new Text(token + \",\" + filename),new Text(\"1\"));\t// write key and id\t\n \t\tcontext.write(new Text(token+\"%\"),new Text(filename));\t// write key and id\t\n \t\tcontext.write(new Text(\":\"+filename),new Text(\"1\"));\n \t\t\n \t\t//if (frequencyDoc.containsKey(filename)) {\n \t\t\t//frequencyDoc.put(filename, frequencyDoc.get(filename) + 1);\n \t\t//}\n \t//else {\n \t\t//frequencyDoc.put(filename, 1);\n \t\t//}\n \t\t}\n \t}\n \t}\n }",
"@Override\n\t\tpublic void reduce(Text key, Iterable<IntWritable> values, Context context)\n\t\t\t\tthrows IOException, InterruptedException\n\t\t{\n\t\t\tint total = 0;\n\t\t\tIterator<IntWritable> vals = values.iterator();\n\t\t\twhile (vals.hasNext()) {\n\t\t\t\tvals.next();\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t\tIntWritable finalCount = new IntWritable(total);\n\t\t\tcontext.write(key, finalCount);\n\t\t}",
"public void write(KEYOUT key, VALUEOUT value\n ) throws IOException, InterruptedException {\n\t \n\t int disableHashing_flag=0;\n\t \n\t disableHashing_flag = this.getConfiguration().getInt(\"mapred.job.disableHashing\", 0);\n\t \n//\t System.out.println(\"___________inside write() in TaskInputOutputContextImpl.java_______________Thread.currentThread().getStackTrace() = \");\n//\t for (StackTraceElement ste : Thread.currentThread().getStackTrace()) {System.out.println(\"ste = \"+ste);}\n\t \n\t String reducerORmapper = this.local_taskID.split(\"_\")[3];\n\t \n\t //System.out.println(\"\\n\\n\\n\\nENTERED write\\n\\n\\n\\n\\n\");\n\t \n//\t if(key !=null)\n//\t {\n//\t\t System.out.println(\"key = \"+key); \n//\t }\n//\t if(value !=null)\n//\t {\n//\t\t System.out.println(\"value = \"+value); \n//\t }\n\t \n\t \n\t if(reducerORmapper.equals(\"r\") && disableHashing_flag==0) //&& key !=null && value !=null )\n\t {\n\t\t //KV=key.toString()+value.toString();\n\t\t if(key !=null && value!=null)\n\t\t {\n\t\t\t KV=key.toString()+value.toString();\n\t\t }else\n\t\t if(value !=null)\n\t\t {\n\t\t\t KV=value.toString();\n\t\t }\n\t\t //total_hash+=KV.hashCode();//This was the old way of doing the hashes and it worked perfectly\n\t\t //This old hash value was an integer, now it is becoming a String\n\t\t //Reducer.external_total_hash=total_hash;\n\t\t MessageDigest messageDigest;\n\t\ttry {\n\t\t\tmessageDigest = MessageDigest.getInstance(\"SHA-256\");\n\t\t\tbyte[] hash = messageDigest.digest(KV.getBytes(\"UTF-8\"));\n\t\t\t\n\t\t\t//System.out.println(\"firstKey = \"+firstKey);\n\t\t\t\n\t\t\tif(firstKey==0)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"1 ENTERED firstKey==0\");\n\t\t\t\tReducer.external_total_hash_byteArray=new byte[hash.length];\t\t\t\t\n\t\t\t}\n\t\t\t//messageDigest.update(KV.getBytes());\n\t\t\t//String encryptedString = new String(messageDigest.digest());\n\t\t\t//total_hash_string+=encryptedString;\n\t\t\t//Reducer.external_total_hash_string=total_hash_string;\n\t\t for(int i=0; i< hash.length;i++){//(byte b : hash) {\n\t\t \tif(firstKey==0)\n\t\t \t{\t\t \t\t\n\t\t \t\tSystem.out.println(\"2 ENTERED firstKey==0\");\n\t\t \t\tReducer.external_total_hash_byteArray[i]=hash[i];//Integer.toHexString(hash[i] & 0xff);\n\t\t \t}\n\t\t \telse\n\t\t \t{\n\t\t \t\tReducer.external_total_hash_byteArray[i]=(byte)(Reducer.external_total_hash_byteArray[i]+hash[i]);\n\t\t \t}\n\t\t }\n\t\t\t//Reducer.external_total_hash_byteArray+=hash;\n\t\t\t \n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\n\t\tfirstKey++;\n\t\t \n//\t\t System.out.println(\"this.local_taskID = \"+this.local_taskID);\n//\t\t System.out.println(\"++++++ inside write in TaskInputOutputContextImpl key.toString() = \"\n//\t\t +key.toString()+\" value.toString() = \"+value.toString()+\" KV.hashCode() = \"+KV.hashCode()\n//\t\t + \" total_hash = \"+total_hash + \" Reducer.external_total_hash = \"+Reducer.external_total_hash);\n\t }\n\t \n\t //System.out.println(\"Reducer.finalValue = \"+Reducer.finalValue);\n output.write(key, value);\n \n// if(conf.getInt(MRJobConfig.BFT_FLAG, 1)==3)//TODO NEED TO ADD CASE 2\n// {\n//\t\t\n// \t int local_NUM_REPLICAS = conf.getInt(MRJobConfig.NUM_REPLICAS,4); \n// \t String reducerORmapper = this.local_taskID.split(\"_\")[3];\n// \t int reducerNumber = Integer.parseInt(this.local_taskID.split(\"_\")[4]);\n// \t int unreplicatedReducerNumber = (int) Math.floor(reducerNumber/local_NUM_REPLICAS);\n// \t \n// \t \n// \t \n// \n// try {\n// \tString KV=\"\"; int i=0; long totalHash=0; String stringToSend=\"\"; String stringReceived=\"\";\n// \t//System.out.println(\"+++ entered try\");\n// \twhile (context.nextKey()) {\n// reduce(context.getCurrentKey(), context.getValues(), context);\n// \n// if(reducerORmapper.equals(\"r\"))\n// {\n// \t //KV+=context.getCurrentKey().toString()+context.getCurrentValue().toString();// first hashing method\n// \t KV=context.getCurrentKey().toString()+context.getCurrentValue().toString();\n// \t totalHash+=KV.hashCode();\n// \t //System.out.println(\"key = \"+context.getCurrentKey()+\" value = \"+context.getCurrentValue()+\n// \t //\t\t\" KV.hashCode() = \"+KV.hashCode()+\" totalHash = \"+totalHash);\n// \t //KV=\"p\";\n// }\n// \n// // If a back up store is used, reset it\n// Iterator<VALUEIN> iter = context.getValues().iterator();\n// if(iter instanceof ReduceContext.ValueIterator) {((ReduceContext.ValueIterator<VALUEIN>)iter).resetBackupStore();} \n// \n// \n// i++;\n// }\n// \n// \n// \n// if(reducerORmapper.equals(\"r\"))\n// {\n// \t \n// \t System.out.println(\"ENTERED if(reducerORmapper.equals(\\\"r\\\"))\");\n// \t \n// \t totalHash=0;//just for now for testing \t \n// \t stringToSend=reducerNumber+\" \"+this.local_taskID+\" \"+totalHash;\n// \t \n// \t \n// \t try {\n// \t\t\tclientSocket = new Socket(\"mc07.cs.purdue.edu\", 2222);//(\"mc07.cs.purdue.edu\", 2222);\n// \t\t\tinputLine = new BufferedReader(new InputStreamReader(System.in));\n// \t\t\tos = new PrintStream(clientSocket.getOutputStream());\n// \t\t\tis = new DataInputStream(clientSocket.getInputStream());\n// \t\t} catch (UnknownHostException e) {\n// \t\t\tSystem.err.println(\"Don't know about host mc07.cs.purdue.edu\");\n// \t\t} catch (IOException e) {\n// \t\t\tSystem.err.println(\"Couldn't get I/O for the connection to the host mc07.cs.purdue.edu\");\n// \t\t\tSystem.out.println(\"e.getMessage() = \"+e.getMessage());\n// \t\t\tSystem.out.println(\"e.toString() = \"+e.toString());\n// \t\t\tSystem.out.println(\"e.getCause() = \"+e.getCause()); \t\t\t\n// \t\t}\n//\n// \t\t\n// \t\tif (clientSocket != null && os != null && is != null) {\n// \t\t\ttry {\n//\n// \t\t\t\tos.println(stringToSend);\n// \t\t\t\tString responseLine;\n// \t\t\t\tSystem.out.println(\"Before while\");\n// \t\t\t\twhile(true){\n// \t\t\t\t\tSystem.out.println(\"Entered while\");\n// \t\t\t\t\tresponseLine = is.readLine();\n// \t\t\t\t\tSystem.out.println(\"responseLine = \"+responseLine);\n// \t\t\t\t\tif(responseLine!=null && !responseLine.isEmpty())\n// \t\t\t\t\t{\n// \t\t\t\t\t\t//add if stmt for checking the server address, but first open a socket here for each Reducer for accepting server address\n// \t\t\t\t\t\t//clientSocket = serverSocket.accept();(put it above)\n// \t\t\t\t\t\tif (Integer.parseInt(responseLine)==unreplicatedReducerNumber)\n// \t\t\t\t\t\t{\t\n// \t\t\t\t\t\t\tSystem.out.println(\"Entered XXX------\");\n// \t\t\t\t\t\t\tbreak;\n// \t\t\t\t\t\t}\n// \t\t\t\t\t}\n// \t\t\t\t} \t\t\t\t\n// \t\t\t\t/* WORKING PERFECTLY .... need to uncomment class MultiThreadChatClient\n// \t\t\t\t // Create a thread to read from the server\n// \t\t\t\tnew Thread(new MultiThreadChatClient(unreplicatedReducerNumber)).start();//try sending is,closed if this didn't work\n// \t\t\t\tos.println(stringToSend);\n// \t\t\t\t\n// \t\t\t\t while (true) {\n// \t\t\t\t\tsynchronized(lock){//CHECK IF THIS CAUSES AN OVERHEAD\n// \t\t\t\t\tif(closed)\n// \t\t\t\t\t\t{\n// \t\t\t\t\t\t\tSystem.out.println(\"ENTERED if(closed)\");\n// \t\t\t\t\t\t\tbreak;\n// \t\t\t\t\t\t}\n// \t\t\t\t\t}\n// \t\t\t\t}*/\n// \t\t\t\t//os.println(\"ok\");\n// \t\t\t\tSystem.out.println(\"AFTER THE TWO WHILES\");\n// \t\t\t\tos.close();\n// \t\t\t\tis.close();\n// \t\t\t\tclientSocket.close();\n// \t\t\t} \n// \t\t\tcatch (IOException e) {\n// \t\t\t\tSystem.err.println(\"IOException: \" + e);\n// \t\t\t}\n// \t\t}\n// \t\t \n// \t\t \t \n// \t\t KV=\"\";stringToSend=\"\";totalHash=0;\n// }\n// \n// \n// \n// } \n// \n// }\n \n }",
"@Override\n\tpublic boolean next(IntWritable key, Text value) throws IOException\n\t{\n\t\tString string;\n\t\twhile (true)\n\t\t{\n\t\t\tstring = bufferedReader.readLine();\n\t\t\tif (string == null)\n\t\t\t\treturn false;\n\t\t\tif (string.isEmpty())\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\tcurrentByteRead = fsDataInputStream.getPos();\n\t\tkey.set(pointtype);\n\t\tvalue.set(string);\n\t\treturn true;\n\t}",
"public void testSetWritable_1()\n\t\tthrows Exception {\n\t\tFiles fixture = new Files();\n\t\tfixture.setAbsolutePath(\"\");\n\t\tfixture.setType(\"\");\n\t\tfixture.setReadable(\"\");\n\t\tfixture.setSize(\"\");\n\t\tfixture.setWritable(\"\");\n\t\tfixture.setExecutable(\"\");\n\t\tfixture.setMtime(\"\");\n\t\tString value = \"\";\n\n\t\tfixture.setWritable(value);\n\n\t\t\n\t}",
"public void putStone() {\n contents += 1;\n }",
"public void testGetWritable_2()\n\t\tthrows Exception {\n\t\tFiles fixture = new Files();\n\t\tfixture.setAbsolutePath(\"\");\n\t\tfixture.setType(\"\");\n\t\tfixture.setReadable(\"\");\n\t\tfixture.setSize(\"\");\n\t\tfixture.setWritable(\"\");\n\t\tfixture.setExecutable(\"\");\n\t\tfixture.setMtime(\"\");\n\n\t\tString result = fixture.getWritable();\n\n\t\t\n\t\tassertEquals(\"\", result);\n\t}",
"public void reduce(IntWritable key, Iterable<Text> values,\n Context context\n ) throws IOException, InterruptedException {\n// now we will get the sorted output\nfor (Text val : values) {\n IntWritable key1 = new IntWritable(-1*key.get());\n\n\tif(count < 10)\n\t{ // we only want Top 10 value for this we need to set counter\n\t\tcontext.write(key1, new Text (val));\n\t}\n\tcount++;\n\n}\n\n}",
"public interface Tracker extends BinaryWritable{\n\n\tlong getRid();\n\n\tvoid setRid(long rid);\n\n}",
"@Override\n\t\tprotected void reduce(Text key, Iterable<IntWritable> values,\n\t\t\tContext context)\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\tint sum=0;\n\t\t\tfor(IntWritable a:values){\n\t\t\t\tsum+=a.get();\n\t\t\t\t}\n\t\t\tresult.set(sum);\n\t\t\tcontext.write(key, result);\n\t\t}",
"@Override\r\n\tpublic int single() {\n\t\treturn 0;\r\n\t}",
"void writeInt(int value);",
"@Override\n\t\tpublic void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n\t\t\tString elems[] = value.toString().split(\",\");\n\t\t\tint custID = Integer.parseInt(elems[0]);\n\t\t\tText result = new Text(filetag+elems[1]+\",\"+elems[4]);\n\t\t\tcontext.write(new IntWritable(custID), result); \n\t\t}",
"@Raw\r\n\tpublic void setWritable(boolean isWritable) {\r\n\t\tthis.isWritable = isWritable;\r\n\t}",
"@Override\r\n\t\tprotected void reduce(PageCount_myself key, Iterable<NullWritable> value,\r\n\t\t\t\tReducer<PageCount_myself, NullWritable, PageCount_myself, NullWritable>.Context context)\r\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\t\r\n\t\t\t\r\n\t\t\tcontext.write(key, NullWritable.get());\r\n\t\t}",
"protected abstract void writeInternal(int index, int value);",
"String intWrite();",
"public void map(LongWritable key, Text value, Context context)\tthrows IOException, InterruptedException {\n\t\t\tcontext.write(NullWritable.get(), value);\n\t\t}",
"@Override\n\t\tpublic void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n\t\t\tString elems[] = value.toString().split(\",\");\n\t\t\tint custID = Integer.parseInt(elems[1]);\n\t\t\tText result = new Text(filetag+elems[2]+\",\"+elems[3]);\n\t\t\tcontext.write(new IntWritable(custID), result);\n\t\t}",
"@Test\n public void testReadWriteInt() {\n System.out.println(\"readInt\");\n ByteArray instance = new ByteArray();\n \n instance.writeInt(12, 0);\n instance.writeInt(1234, 4);\n instance.writeInt(13, instance.compacity());\n \n assertEquals(12, instance.readInt(0));\n assertEquals(1234, instance.readInt(4));\n assertEquals(13, instance.readInt(instance.compacity() - 4));\n \n instance.writeInt(14, 4);\n assertEquals(14, instance.readInt(4));\n }",
"@Override\r\n\tprotected void reduce(IntWritable key, Iterable<Text> allValues,\r\n\t\t\tContext context) throws IOException, InterruptedException {\n\r\n\t\tHashSet<Integer> recommendFriendInfo = new HashSet<Integer>();\r\n\t\tHashSet<Integer> myFriends = new HashSet<Integer>();\r\n//\t\tHashSet<Integer> testFriends = new HashSet<Integer>();\r\n\r\n\t\tfor (Text eachValue : allValues) {\r\n\t\t\tString eachValueString = eachValue.toString();\r\n\r\n\t\t\tif (eachValueString\r\n\t\t\t\t\t.startsWith(Protocols.RECOMMEND_PHASE_2_FRIENDS_STARTS_WITH)) {\r\n\t\t\t\teachValueString = eachValueString\r\n\t\t\t\t\t\t.substring(Protocols.RECOMMEND_PHASE_2_FRIENDS_STARTS_WITH\r\n\t\t\t\t\t\t\t\t.length());\r\n\t\t\t\tmyFriends.add(Integer.parseInt(eachValueString));\r\n\t\t\t} else if (eachValueString\r\n\t\t\t\t\t.startsWith(Protocols.RECOMMEND_PHASE_2_TEST_FRIENDS_STARTS_WITH)) {\r\n//\t\t\t\teachValueString = eachValueString\r\n//\t\t\t\t\t\t.substring(Protocols.RECOMMEND_PHASE_2_TEST_FRIENDS_STARTS_WITH\r\n//\t\t\t\t\t\t\t\t.length());\r\n//\t\t\t\ttestFriends.add(Integer.parseInt(eachValueString));\r\n\t\t\t} else {\r\n\t\t\t\trecommendFriendInfo.add(Integer.parseInt(eachValueString));\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\trecommendFriendInfo.remove(key.get());\r\n\t\tfor (Integer eachMyFriend : myFriends) {\r\n\t\t\trecommendFriendInfo.remove(eachMyFriend);\r\n\t\t}\r\n//\t\tint count = 0;\r\n//\t\tfor (Integer eachTestInteger : testFriends) {\r\n//\t\t\tif (recommendFriendInfo.contains(eachTestInteger)) {\r\n//\t\t\t\tcount++;\r\n//\t\t\t}\r\n//\t\t}\r\n\t\t// context.write(NullWritable.get(), new Text(\"Count: \" + count +\r\n\t\t// \" Out Of: \" + testFriends.size() + \" Accuracy: \" + (float) count*1.0f\r\n\t\t// / testFriends.size()));\r\n\t\t// if(count>0)\r\n\t\t// {\r\n\t\t// context.write(NullWritable.get(), new Text(\"TRUE\"));\r\n\t\t// }\r\n\r\n\t\tif (recommendFriendInfo.size() == 0) {\r\n//\t\t\tcontext.write(NullWritable.get(), new Text(\r\n//\t\t\t\t\tProtocols.COLD_START_STARTS_WITH + key\r\n//\t\t\t\t\t\t\t+ Protocols.VALUE_SEPARATOR + myFriends));\r\n\t\t} else {\r\n\t\t\tcontext.write(NullWritable.get(), new Text(\r\n\t\t\t\t\tProtocols.RECOMMEND_LIST_STARTS_WITH + key\r\n\t\t\t\t\t\t\t+ Protocols.VALUE_SEPARATOR\r\n\t\t\t\t\t\t\t+ recommendFriendInfo.toString()));\r\n\r\n\t\t}\r\n//\t\tif (testFriends.size() == 0) {\r\n////\t\t\tcontext.write(NullWritable.get(), new Text(Protocols.NO_TEST_DATA\r\n////\t\t\t\t\t+ key));\r\n////\t\t\tcontext.write(NullWritable.get(), new Text(\r\n////\t\t\t\t\tProtocols.ACCURACY_STARTS_WITH + \"1.0\"));\r\n//\r\n//\t\t}\r\n//\t\t\r\n//\t\tint din = testFriends.size();\r\n//\t\tif(recommendFriendInfo.size() < testFriends.size())\r\n//\t\t{\r\n//\t\t\tdin = recommendFriendInfo.size();\r\n//\t\t}\r\n//\t\tif (recommendFriendInfo.size() != 0 && testFriends.size() != 0) {\r\n//\t\t\tcontext.write(NullWritable.get(), new Text(\r\n//\t\t\t\t\tProtocols.ACCURACY_STARTS_WITH + (float) count * 1.0f\r\n//\t\t\t\t\t\t\t/ din));\r\n//\r\n//\t\t}\r\n\t\t// context.write(NullWritable.get(), new Text(key +\r\n\t\t// Protocols.VALUE_SEPARATOR + result));\r\n\r\n\t}",
"@Override\n public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n String[] words = value.toString().replaceAll(\" \", \"\").split(\",\");\n\n // Valid input\n if (words.length == 3) {\n // Get words\n String w1 = words[0];\n String w2 = words[1];\n String w3 = words[2];\n\n // Get word lengths\n int first = words[0].length();\n int second = words[1].length();\n int third = words[2].length();\n String lineNum = key.toString();\n\n // Conditions 1,2,4\n\n // One longest word\n // Longest word at front\n if (first > second && first > third) {\n context.write(new Text(w2), new Text(lineNum + \",\" + w1));\n context.write(new Text(w3), new Text(lineNum + \",\" + w1));\n }\n // Longest word in middle\n else if (second > first && second > third) {\n context.write(new Text(w1), new Text(lineNum + \",\" + w2));\n context.write(new Text(w3), new Text(lineNum + \",\" + w2));\n }\n // Longest word at end\n else if (third > first && third > second) {\n context.write(new Text(w1), new Text(lineNum + \",\" + w3));\n context.write(new Text(w2), new Text(lineNum + \",\" + w3));\n }\n\n // Two longest words\n // 1st and 2nd are the same length and longest\n if (first == second && first > third) {\n context.write(new Text(w3), new Text(lineNum + \",\" + w1));\n context.write(new Text(w3), new Text(lineNum + \",\" + w2));\n }\n // 1st and 3rd are the same length and longest\n else if (first == third && first > second) {\n context.write(new Text(w2), new Text(lineNum + \",\" + w1));\n context.write(new Text(w2), new Text(lineNum + \",\" + w3));\n }\n // 2nd and 3rd are same length and longest\n else if (second == third && second > first) {\n context.write(new Text(w1), new Text(lineNum + \",\" + w2));\n context.write(new Text(w1), new Text(lineNum + \",\" + w3));\n }\n } \n }",
"public boolean isWritable(int column) throws SQLException {\n\t\t\treturn false;\n\t\t}",
"public static int BIASED_ONE_OR_ZERO()\n\t{\n\t}",
"public void map(LongWritable key, Text value, Context context)\n\t\t\tthrows InterruptedException, IOException {\n\t\tString line = value.toString();\n\n\t\tHashMap<String, String> fields = parseXml.getXmlTags(line);\n \n String fileName = ((FileSplit) context.getInputSplit()).getPath().getName();\n String shortName = fileName.substring(fileName.length()-7, fileName.length()-4);\n \n\t\thKey.set(shortName.getBytes());\n\n\t\tSet set = fields.entrySet();\n\t \n\t Iterator i = set.iterator();\n\t \n\t while(i.hasNext()) {\n\t Map.Entry me = (Map.Entry)i.next();\n\t \n\t\t if (me.getKey().equals(\"0\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_JAN.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"1\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_FEB.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"2\")) {\n\t\t \tkv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_MAR.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t \tif (me.getKey().equals(\"3\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_APR.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"4\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_MAY.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"5\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_JUN.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"6\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_JUL.getColumnName(), \n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"7\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_AUG.getColumnName(), \n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\t\t if (me.getKey().equals(\"8\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_SEP.getColumnName(), \n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\t\t if (me.getKey().equals(\"9\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_OCT.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\t\t if (me.getKey().equals(\"10\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_NOV.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\t\t if (me.getKey().equals(\"11\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_DEC.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n }\n\t }\n\t}",
"@Override\r\n\tprotected void map(LongWritable key, Text value, Context context)\r\n\t\t\tthrows IOException, InterruptedException {\n\r\n\t\tString[] userUserAndCount = value.toString().split(\r\n\t\t\t\tProtocols.USER_USER_COUNT_SEPARATOR);\r\n\t\tString[] users = userUserAndCount[0]\r\n\t\t\t\t.split(Protocols.USER_USER_SEPARATOR);\r\n\r\n\t\tcontext.write(new IntWritable(Integer.parseInt(users[0])), new Text(\r\n\t\t\t\tusers[1] + Protocols.USER_WEIGHT + userUserAndCount[1]));\r\n\t\tcontext.write(new IntWritable(Integer.parseInt(users[1])), new Text(\r\n\t\t\t\tusers[0] + Protocols.USER_WEIGHT + userUserAndCount[1]));\r\n\r\n\t}",
"@Override\r\n protected void map(LongWritable key, Text value, Context context)\r\n throws IOException, InterruptedException {\n\r\n String line = value.toString();\r\n String[] fields = line.split(\"\\t\");\r\n if (fields.length > BrowserComRunEnum.STRATERY.ordinal()) {\r\n StringBuilder valueSB = new StringBuilder();\r\n String timeStampStr = fields[BrowserComRunEnum.TIME.ordinal()];\r\n String versionInfo = fields[BrowserComRunEnum.VERSION.ordinal()];\r\n String categoryInfo = fields[BrowserComRunEnum.CATEGORY\r\n .ordinal()];\r\n String sucInfo = fields[BrowserComRunEnum.SUC.ordinal()];\r\n String typeInfo = fields[BrowserComRunEnum.TYPE.ordinal()];\r\n String macInfo = MACFormatUtil\r\n .macFormatToCorrectStr(fields[BrowserComRunEnum.MAC\r\n .ordinal()]);\r\n String stratery = fields[BrowserComRunEnum.STRATERY.ordinal()];\r\n this.pattern.matcher(categoryInfo);\r\n\r\n if (this.pattern.matcher(categoryInfo).matches()\r\n && this.pattern.matcher(sucInfo).matches()\r\n && this.pattern.matcher(typeInfo).matches()) {\r\n // 日期id\r\n String dateIdStr = TimestampFormatUtil.formatTimestamp(\r\n timeStampStr).get(ConstantEnum.DATE_ID);\r\n valueSB.append(categoryInfo);\r\n valueSB.append(\"\\t\");\r\n // versionId\r\n long versionId = -0l;\r\n versionId = IPFormatUtil.ip2long(versionInfo);\r\n valueSB.append(versionId);\r\n valueSB.append(\"\\t\");\r\n valueSB.append(macInfo);\r\n valueSB.append(\"\\t\");\r\n valueSB.append(sucInfo);\r\n valueSB.append(\"\\t\");\r\n valueSB.append(typeInfo);\r\n valueSB.append(\"\\t\");\r\n valueSB.append(stratery);\r\n context.write(new Text(dateIdStr),\r\n new Text(valueSB.toString()));\r\n }\r\n\r\n }\r\n }",
"public int getStone(){\r\n\t\treturn stone;\r\n\t}",
"@Override\n\tprotected void map(Text key, Text value,\n\t\t\torg.apache.hadoop.mapreduce.Mapper.Context context)\n\t\t\tthrows IOException, InterruptedException {\n\t\tString[] values=value.toString().split(\" \");\n\t\tIntWritable mapkey=new IntWritable();\n\t\tText mapvalue=new Text();\n\t\tStringBuilder sb=new StringBuilder();\n\t\tfor(int i=0;i<values.length;i++)\n\t\t{\n\t\t\tmapkey.set(i);\n\t\t\tsb.append(key.toString());\n\t\t\tsb.append(\",\");\n\t\t\tsb.append(values[i]);\n\t\t\tmapvalue.set(sb.toString());\n\t\t//\tsb=null;\n\t\t\tsb=new StringBuilder();\n\t\t\tcontext.write(mapkey, mapvalue);\n\t\t}\n\t}",
"@Override\n protected void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n \n String[] inputArray = value.toString().split(\"::\");\n inputKey.set(Integer.parseInt(inputArray[1]));\n intValue.set(Integer.parseInt(inputArray[2]));\n SortedMapWritable inputValue = new SortedMapWritable();\n inputValue.put(intValue, count);\n context.write(inputKey, inputValue);\n }",
"@Test\n\tpublic void testMapReduce() {\n\n\t\t/*\n\t\t * For this test, the mapper's input will be \"1 cat cat dog\" \n\t\t */\n\t\tmapReduceDriver.withInput(new LongWritable(1), new Text(swedenHealth));\n\n\t\t/*\n\t\t * The expected output (from the reducer) is \"cat 2\", \"dog 1\". \n\t\t */\n\t\tmapReduceDriver.addOutput(new Text(\"(Sweden)\"), new Text(\"| in 2011$ values PPP, 1995 health cost: 1745.1| 2014 health cost: 5218.86| cost increase (%): 199.06%\\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\"));\n\n\t\t/*\n\t\t * Run the test.\n\t\t */\n\t\tmapReduceDriver.runTest();\n\t}",
"int readerIndex();",
"@Override\n\t public int getPartition(Tuple key, IntWritable value, int numPartitions) {\n\t\t return key.hashCodePartial(2) % numPartitions;\n\t }",
"public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n\t\t\tText gxy = new Text();\n\t\t\tText ij = new Text();\n\t\t\tgxy.clear();\n\t\t\tij.clear();\n\t\t\tString line = value.toString();\n\t\t\tString[] w = line.split(\":\");\n\t\t\tString[] IJ = w[0].split(\",\");\n\t\t\tint i = Integer.parseInt(IJ[0]);\n\t\t\tint j = Integer.parseInt(IJ[1]);\n\t\t\tint k = Integer.parseInt(w[1]);\n\t\t\t//int d = Integer.parseInt(w[2]);\n\t\t\tif (i==k || j==k){\n\t\t\t\tfor (int l=1; l<=4; l++){\n\t\t\t\t\tif (j==k){\n\t\t\t\t\t\tij.set(IJtoString(i, l));\n\t\t\t\t\t\tgxy.set(GXYtoString(i, j, k, w[2]));\n\t\t\t\t\t System.out.println(\"Mapper emitting\"+\" \"+ij+\" \"+gxy);\n\t\t\t\t\t\tcontext.write(ij, gxy);\n\t\t\t\t\t}\n\t\t\t\t\tif (i==k){\n\t\t\t\t\t\tij.set(IJtoString(l, j));\n\t\t\t\t\t\tgxy.set(GXYtoString(i, j, k, w[2]));\n\t\t\t\t\t\tSystem.out.println(\"Mapper emitting\"+\" \"+ij+\" \"+gxy);\n\t\t\t\t\t\tcontext.write(ij, gxy);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tij.set(IJtoString(i, j));\n\t\t\t\tgxy.set(GXYtoString(i, j, k, w[2]));\n\t\t\t\tSystem.out.println(\"Mapper emitting\"+\" \"+ij+\" \"+gxy);\n\t\t\t\tcontext.write(ij, gxy);\n\t\t\t}\n\n\t\t}",
"@Override\r\n\tpublic LongWritable getCurrentKey() throws IOException, InterruptedException {\n\t\treturn this.key;\r\n\t}",
"public void reduce(IntWritable key, Text values, \n Context context\n ) throws IOException, InterruptedException {\n \t\tcontext.write(values, key);\n \t}",
"int getWriterConcurrency();",
"public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException\n {\n String line = value.toString().toLowerCase();\n\n // Splitting into doc number and its text\n String document_split[] = line.split(\"\\t\",2);\n Text document_number = new Text(document_split[0]);\n\n // Replace all non alphabetic characters and non spaces with a space\n String document_content=document_split[1].replaceAll(\"[^ a-z]+\", \" \");\n\n String bigram_word_1=null;\n String bigram_word_2=null;\n // Tokenize into words\n StringTokenizer tokenizer = new StringTokenizer(document_content);\n int x=0;\n while(tokenizer.hasMoreTokens())\n {\n x+=1;\n if(x==1)\n {\n bigram_word_1=tokenizer.nextToken();\n }\n else\n {\n bigram_word_2=tokenizer.nextToken();\n String bigram_pair_string=bigram_word_1+\" \"+bigram_word_2;\n bigram_pair.set(bigram_pair_string);\n context.write(bigram_pair, document_number);\n break;\n }\n }\n while(tokenizer.hasMoreTokens())\n {\n bigram_word_1=bigram_word_2;\n bigram_word_2=tokenizer.nextToken();\n String bigram_pair_string=bigram_word_1+\" \"+bigram_word_2;\n bigram_pair.set(bigram_pair_string);\n context.write(bigram_pair, document_number);\n }\n }",
"@Override\n\t\tpublic JSONWritable createValue() {\n\t\t\treturn null;\n\t\t}",
"public ArrayListOfIntsWritable(int[] arr)\n {\n super(arr);\n }",
"@Override\r\n\t//Mapper Method\r\n\tpublic void map(LongWritable key, Text value, Context c) throws IOException, InterruptedException\r\n\t{\n\tString line = value.toString();\r\n\t//Split them into tokens \r\n\tString [] tokens = line.split(\"\\\\;\");\r\n\t//Store the year of the movie title\r\n\tString year = tokens[3];\r\n\t//Check if the data is present or not(\\N)\r\n\t//If it is present then check if it is a movie after 2000\r\n\tif(year.startsWith(\"2\"))\r\n\t{\r\n\t//Take the various genres of the movie \r\n\t\tString genre=tokens[4];\r\n\t\t//Split and store each genre seperately\r\n\t\tString [] tokens_genre=genre.split(\"\\\\,\");\r\n\t\t//For each genre in the genre list of the movie run the loop\r\n\t\tfor(int i=0;i<tokens_genre.length;i++)\r\n\t\t{\t\r\n\t\t//Check if the data is provided in the genre list(not \\N)\r\n\tif(!tokens_genre[i].startsWith(\"\\\\N\"))\r\n\t{\r\n\t//For each genre set the mapper key\r\n\t//Here each key is the year of the movie and its genre connected with a '_'\r\n\t\tmapperKey.set(new Text(year) + \"_\" + new Text(tokens_genre[i]));\r\n\t\t//Create the key value pair\r\n\t\tc.write(mapperKey, new Text(\"1\"));\r\n\t}\r\n\t\t}\r\n\t\r\n\t}\r\n\t\r\n\t}",
"@Override\n\tprotected void map(LongWritable key, Text value,\n\t\t\tContext context)\n\t\t\tthrows IOException, InterruptedException {\n\t\t\n\t\tString line = value.toString();\n\t\tStringTokenizer st = new StringTokenizer(line,\" \");\n\t\t\n\t\twhile(st.hasMoreTokens()){\n\t\t\tSystem.out.println(\"in\");\n\t\t\tword.set(st.nextToken().toString());\n\t\t\tcontext.write(new Text(\"kk\"),word);\n\t\t\t \n\t\t\t//System.out.println(\"mapper\"+st.nextToken());\n\t\t}\n\t\t\n\t}",
"public void reduce(Text prefix, Iterator<IntWritable> iter,\n OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException {\nint a000 = 0;\nint a001 = 0;\nint a002 = 0;\nint a003 = 0;\nint a004 = 0;\nint a005 = 0;\nint a006 = 0;\nint a007 = 0;\nint a008 = 0;\nint a009 = 0;\nint a010 = 0;\nint a011 = 0;\nint a012 = 0;\nint a013 = 0;\nint a014 = 0;\nint a015 = 0;\nint a016 = 0;\nint a017 = 0;\nint a018 = 0;\nint a019 = 0;\nint a020 = 0;\nint a021 = 0;\nint a022 = 0;\nint a023 = 0;\nint a024 = 0;\nint cur = 0;\n\nwhile (iter.hasNext()) {\ncur = iter.next().get();\na014 = a022 - a006;\na013 = -2 - a022;\na018 += a003;\na011 -= a011;\na011 += a018;\na009 -= cur;\nif (a019 <= a021) {\na014 = a003 + a003;\na011 = a021 + 4;\na017 -= a002;\na005 = -5 - a019;\na004 = a003 - a016;\ncur += a017;\na013 += a010;\ncur -= a012;\na006 = a000 + a015;\na017 = a014 + a022;\na011 = a020 + a013;\na014 += a001;\na005 = a016 + a007;\ncur = 2 + a011;\na020 = a023 - a006;\na007 += a021;\na021 = a021 + a008;\na000 += a008;\na024 = a024 - a009;\na017 += 4;\na013 = a006 - a023;\na013 = a009 + a008;\na010 += a001;\na003 = a018 - a018;\na015 = a023 + a023;\na016 = a009 - a002;\na003 += -1;\na013 = a022 + a014;\na018 -= a020;\na001 = a003 + a009;\na024 += a015;\n} else {\nif (a017 > a011) {\na009 -= a001;\na024 -= a007;\na005 = a017 - a007;\na020 += a020;\nif (a003 != a001) {\na009 += a006;\na006 += a017;\na016 -= a004;\na024 = a008 + a002;\na014 -= a024;\na017 -= a010;\na012 -= a003;\na005 += a002;\na005 = a007 - a014;\na013 = a013 - a001;\na005 = a019 + a016;\na024 -= a014;\ncur = a005 - a010;\na004 = a003 - a001;\na000 = a021 - -1;\na019 = a006 - a008;\na006 = a018 + a009;\na015 -= a013;\na017 = a019 - a022;\na004 += a019;\na023 += a016;\na010 += a000;\na003 += a011;\na011 += a019;\na009 += a014;\na018 = a012 + a001;\ncur = -4 + 3;\na021 = a017 - a001;\na004 += a002;\na020 = -5 + a024;\na023 = a020 + a018;\na024 += a018;\n} else {\na017 = -5 - a012;\na013 = a023 - a018;\na020 = a020 - a017;\na003 += a013;\na004 = a019 - cur;\na016 += a010;\na021 += a018;\na008 = a010 - a012;\na010 -= a019;\na007 -= a013;\na015 -= a019;\na019 = a004 + a021;\na011 = a013 + a006;\na005 += a004;\na015 -= a016;\na017 = a002 - a024;\na002 -= a007;\na022 = a004 - cur;\na011 = a021 + a014;\na004 += a020;\na020 = a020 + a009;\na007 = a012 - a002;\na018 = a003 - a001;\na011 = a000 + a009;\na019 = a021 + a017;\na017 = a022 - a013;\na014 = a018 - a020;\na009 -= a023;\na007 -= a008;\na020 = 2 + a011;\na009 = cur + a010;\na015 -= a018;\na010 = a024 + a014;\n}\ncur -= a020;\n} else {\na008 = a003 - a017;\na024 -= a004;\nif (a014 >= a018) {\na005 = a000 + a021;\na003 = a006 + a002;\na009 = a021 + a023;\na003 += -5;\na022 += a024;\na010 = a014 + a016;\na024 = a008 + a010;\na008 = 2 - a003;\na014 -= a002;\na007 = a006 - a023;\na014 += a018;\na001 = a009 + a016;\na018 += a022;\na001 = a019 - a018;\na008 -= a011;\na019 -= a001;\na010 += a014;\ncur += a011;\na024 = a022 - a018;\na014 = a003 - a023;\na004 -= a002;\n} else {\na020 += a017;\na001 = a012 + a009;\na015 += a013;\na018 += a003;\na013 += a009;\na007 = a015 + a019;\na012 += a001;\na009 = a010 + -1;\na023 -= a017;\na020 = a017 + a004;\na005 = a011 - a001;\ncur -= a000;\na020 = a002 + a002;\na004 += a017;\na022 = a017 + a024;\na001 -= a016;\na012 = a021 + 0;\na002 -= a018;\na011 += a001;\na024 = a001 + a002;\na003 -= a015;\na016 = a022 - a014;\na008 = a002 - a001;\na006 += a009;\na018 -= a000;\na008 = a000 - a004;\na019 += a021;\na009 = a021 - a011;\na000 += a020;\na002 += a009;\nif (a024 == a022) {\ncur = a012 + a009;\na007 = a002 + a012;\na015 += a001;\na022 = a007 + a011;\na012 += a021;\na003 -= cur;\na018 -= a011;\na012 = a019 - a013;\na000 = a010 - a005;\na004 = a014 - a009;\na001 = a000 + a005;\na010 += a004;\na008 = a023 - 3;\na009 += a022;\na005 -= a018;\na004 += a003;\na018 = a001 + a001;\na010 = a003 + a014;\na011 -= a003;\na000 += 1;\na006 -= a018;\na008 = a011 - a009;\na008 = a013 - a009;\na011 = a016 + a009;\na008 -= a011;\na024 = a000 + a003;\na015 -= 4;\ncur = a008 - a024;\na024 = a012 - a008;\na005 = a023 + a020;\na024 -= a003;\n} else {\na017 = a012 + a013;\na017 = a019 - a000;\n}\na018 -= a005;\na006 = a021 + a019;\na005 += a007;\na018 += cur;\na005 += a008;\na008 += a017;\na019 = a002 - a006;\na005 = a000 + a011;\na003 = a021 - a005;\na019 = a014 + a006;\na018 -= a010;\na006 = 1 + a023;\na024 += a016;\na018 += a022;\na011 += a024;\na003 = a007 - a010;\na001 = a019 + a013;\na022 += a013;\na017 += a008;\na006 = a010 + a011;\na023 += a006;\na009 = a011 + a002;\na022 -= a015;\na024 = a012 - a019;\na001 -= a023;\na010 = a019 + cur;\na002 -= a009;\na012 -= a010;\na001 -= a006;\na021 = a000 - a000;\n}\na000 += a008;\na010 = a004 + a013;\na001 += cur;\na004 += a010;\na022 = a020 + a016;\na016 -= a008;\na010 = 4 - a018;\na007 = a021 - a011;\na010 -= a006;\na011 = a018 + a008;\na002 -= a000;\na004 -= a016;\na012 = a018 - a003;\na010 = a005 + a012;\na013 -= a005;\na011 = a010 - a001;\na007 -= a000;\na001 = a014 + a013;\na008 += a002;\na017 = a011 - a020;\na009 -= a013;\na022 -= a010;\na022 = a011 - a010;\n}\na005 = a021 - a002;\n}\na003 += a010;\na012 = cur - a021;\ncur += a017;\n}\noutput.collect(prefix, new IntWritable(a003));\n}",
"public int getOutputPositionIncrement () { return 1; }",
"private void writeOutput(\n RecordWriter<Writable, Object> writer,\n TaskAttemptContext context) throws IOException, InterruptedException {\n NullWritable nullWritable = NullWritable.get();\n try (ManifestCommitterTestSupport.CloseWriter<Writable, Object> cw =\n new ManifestCommitterTestSupport.CloseWriter<>(writer, context)) {\n writer.write(KEY_1, VAL_1);\n writer.write(null, nullWritable);\n writer.write(null, VAL_1);\n writer.write(nullWritable, VAL_2);\n writer.write(KEY_2, nullWritable);\n writer.write(KEY_1, null);\n writer.write(null, null);\n writer.write(KEY_2, VAL_2);\n writer.close(context);\n }\n }",
"public int singleton() { //returns a single int with both values\r\n return( row*MAXCOLS + col );\r\n }",
"public InMemoryCombiningReducer() {\n\n\t\t}",
"@Override\n\t\tpublic int getPartition(TextPair key, IntWritable value, int numPartitions) {\n\t\t\treturn (key.getFirst().hashCode() & Integer.MAX_VALUE) % numPartitions;\n\t\t\t//la \"& Integer.MAX_VALUE\" viene fatto per essere sicuro il valore ritornato sia positivo\n\t\t}",
"public void reduce(Text prefix, Iterator<IntWritable> iter,\n OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException {\nint a000_ = 0;\nint a001_ = 0;\nint a002_ = 0;\nint a003_ = 0;\nint a004_ = 0;\nint a005_ = 0;\nint a006_ = 0;\nint a007_ = 0;\nint a008_ = 0;\nint a009_ = 0;\nint a010_ = 0;\nint a011_ = 0;\nint a012_ = 0;\nint a013_ = 0;\nint a014_ = 0;\nint a015_ = 0;\nint a016_ = 0;\nint a017_ = 0;\nint a018_ = 0;\nint a019_ = 0;\nint a020_ = 0;\nint a021_ = 0;\nint a022_ = 0;\nint a023_ = 0;\nint a024_ = 0;\nint cur_ = 0;\n\nwhile (iter.hasNext()) {\ncur_ = iter.next().get();\na012_ = a000_ - a017_;\na004_ = cur_ - 2;\na008_ = a018_ - a009_;\na020_ = a020_ - cur_;\na021_ = a001_ - a009_;\na010_ = a002_ + a004_;\na013_ = a005_ + a005_;\na009_ = a019_ + a012_;\na008_ = a008_ * -5;\na021_ = a022_ - a023_;\na002_ = a020_ - a022_;\na019_ = cur_ + a020_;\ncur_ = cur_ + a008_;\na020_ = a006_ + a021_;\na021_ = a008_ - a017_;\na017_ = a021_ - a009_;\ncur_ = a011_ - a005_;\nif (a004_ == a007_) {\na007_ = -2 - a015_;\na022_ = a005_ - a019_;\na013_ = a010_ - a022_;\na024_ = a009_ + a000_;\na018_ = a003_ - 3;\na019_ = a021_ - a002_;\na000_ = a017_ + cur_;\na010_ = a020_ - 1;\na000_ = a020_ - a024_;\na017_ = a004_ + a007_;\na009_ = a001_ - a010_;\na015_ = a018_ + a022_;\na023_ = a013_ + a016_;\na024_ = cur_ - a019_;\na015_ = a013_ - a017_;\na024_ = a003_ - a021_;\na018_ = a003_ - a023_;\n} else {\na011_ = a006_ + a023_;\na018_ = a003_ - a015_;\na022_ = a008_ - a007_;\na005_ = a001_ - cur_;\na007_ = a000_ + a012_;\na000_ = a007_ + a023_;\na009_ = cur_ + a010_;\na018_ = -1 + a001_;\na003_ = -2 + a005_;\na006_ = a009_ + a020_;\na001_ = a017_ + a022_;\na024_ = a009_ + a006_;\na005_ = a017_ - a023_;\na004_ = a017_ - a019_;\na015_ = a018_ - a018_;\na021_ = a019_ + a011_;\na024_ = a009_ - a014_;\na009_ = 0 + a023_;\na020_ = a011_ + a006_;\na012_ = a005_ - a011_;\na010_ = a001_ - a018_;\na012_ = a002_ - a003_;\ncur_ = a006_ - a013_;\n}\na000_ = a023_ + a012_;\na008_ = a016_ - a018_;\na024_ = a018_ + a010_;\na013_ = a018_ + a002_;\na009_ = a016_ + a015_;\na005_ = a002_ + a009_;\na004_ = a009_ + a011_;\na011_ = a011_ + a013_;\na022_ = a019_ + a008_;\na017_ = a016_ + a010_;\na014_ = a012_ - a023_;\na005_ = a019_ - a001_;\na005_ = a013_ * -4;\na009_ = a020_ + a008_;\na012_ = a020_ - a001_;\na013_ = a016_ - a000_;\na012_ = a003_ + a000_;\na022_ = a001_ + a002_;\na001_ = a010_ - a024_;\na003_ = a008_ + a015_;\na012_ = a012_ - a020_;\na001_ = a019_ + a015_;\na009_ = a002_ + a018_;\na021_ = a024_ - a006_;\nif (a024_ == a014_) {\na006_ = a002_ + a016_;\na003_ = a020_ - 2;\na008_ = a020_ - a018_;\na015_ = a012_ + a001_;\na008_ = cur_ - a014_;\na001_ = a002_ - a008_;\na004_ = a015_ + a011_;\na024_ = -4 + a020_;\na021_ = a013_ + a012_;\na005_ = a012_ + a001_;\na009_ = a012_ + a018_;\na023_ = a016_ - a003_;\na011_ = a019_ - a012_;\na005_ = a000_ - a008_;\na004_ = a024_ - a011_;\na022_ = a024_ - a009_;\na005_ = a007_ + a011_;\na001_ = a012_ + a000_;\na006_ = a020_ - cur_;\na015_ = a020_ - 1;\n} else {\na001_ = a006_ - a019_;\na019_ = 2 - a014_;\ncur_ = a021_ + a009_;\na023_ = a010_ + 3;\na005_ = a018_ + a019_;\na015_ = cur_ + a020_;\na001_ = a009_ - a021_;\na016_ = a009_ - a004_;\na005_ = a003_ + a023_;\na006_ = a008_ - a008_;\ncur_ = a013_ - -3;\na018_ = a007_ + a009_;\nif (a011_ <= a024_) {\na001_ = a001_ - a007_;\na018_ = a001_ - a010_;\na015_ = a016_ + a008_;\na009_ = a013_ - a015_;\na001_ = a018_ + a001_;\na001_ = a024_ - a002_;\na018_ = a006_ + a015_;\na001_ = a000_ - 0;\na022_ = a024_ - a009_;\na011_ = a008_ - a015_;\na009_ = a017_ + a000_;\na016_ = a005_ + a023_;\na001_ = a007_ - a023_;\na008_ = a023_ - a020_;\na023_ = a005_ - a016_;\na020_ = a024_ + a008_;\na005_ = a008_ - a003_;\na016_ = a006_ + a011_;\na006_ = a004_ + a014_;\na013_ = -2 - a001_;\na021_ = a008_ - a005_;\na000_ = a011_ - a016_;\na024_ = a008_ - a000_;\na007_ = a008_ + a013_;\n} else {\na021_ = a010_ + a018_;\na005_ = a013_ - a023_;\na012_ = a011_ - a024_;\na014_ = a002_ + a009_;\na022_ = a022_ + a015_;\na024_ = a008_ + a021_;\ncur_ = a014_ + a009_;\na018_ = a004_ + a015_;\na004_ = a018_ + a004_;\na020_ = a013_ + a005_;\na017_ = a012_ - a007_;\na011_ = a017_ - a005_;\na015_ = a012_ - a014_;\na020_ = 2 - a009_;\na019_ = a001_ + a023_;\na003_ = a008_ - a020_;\ncur_ = a005_ - a001_;\na016_ = a011_ + a022_;\na005_ = a010_ + cur_;\na018_ = a021_ - a016_;\na022_ = a005_ - a016_;\n}\nif (a011_ == a020_) {\na017_ = a007_ + a006_;\na017_ = a001_ - a002_;\na003_ = a005_ + a023_;\na012_ = a007_ + a021_;\na005_ = a020_ + a005_;\na023_ = a019_ + a003_;\na019_ = a016_ - a013_;\na013_ = a008_ + a002_;\na023_ = a004_ - a020_;\na014_ = a000_ + a013_;\na015_ = a008_ + a011_;\na010_ = a004_ - a014_;\na020_ = a022_ - a013_;\na020_ = a011_ + a015_;\na021_ = a021_ + a021_;\na024_ = a009_ - 2;\na012_ = a014_ - a018_;\na014_ = a009_ + a024_;\na021_ = a019_ - a007_;\nif (a006_ <= a022_) {\ncur_ = a004_ - a006_;\na022_ = a021_ - a003_;\na013_ = a023_ - a001_;\na011_ = a017_ - a009_;\na002_ = a000_ + a005_;\na019_ = a005_ + a023_;\na007_ = a024_ + a013_;\na014_ = a001_ - a003_;\na007_ = 3 + a003_;\na000_ = a002_ + a011_;\na000_ = a004_ + a012_;\na018_ = a013_ + a024_;\na024_ = a023_ - cur_;\na001_ = a007_ + a008_;\ncur_ = a008_ + a000_;\na012_ = a013_ + a000_;\na001_ = a008_ - a021_;\na013_ = a006_ + a018_;\na024_ = a004_ - a001_;\na014_ = a000_ - a006_;\na008_ = a010_ * 2;\na000_ = a019_ + a011_;\na000_ = a019_ + a000_;\n} else {\na014_ = a010_ - a009_;\na007_ = a009_ + a004_;\na019_ = a017_ + a006_;\na001_ = a019_ + a005_;\na015_ = a000_ - a006_;\na002_ = a011_ + a011_;\na013_ = a013_ + a015_;\na005_ = a014_ + a015_;\na017_ = a000_ + a000_;\na015_ = a019_ - a013_;\na007_ = a021_ + a005_;\na020_ = -4 + a007_;\na007_ = a022_ + a003_;\na009_ = a021_ - a001_;\na002_ = a009_ + a004_;\na016_ = a018_ + a022_;\na008_ = a007_ - a001_;\na007_ = a010_ + a010_;\na012_ = a020_ + a013_;\na006_ = a011_ + a011_;\na023_ = a021_ + a002_;\na023_ = a015_ + a011_;\na008_ = a005_ - a024_;\na019_ = a000_ - a015_;\na007_ = a022_ - a003_;\na023_ = a008_ - a007_;\na007_ = a008_ - a023_;\na024_ = a018_ + a005_;\na001_ = a013_ - a002_;\na017_ = a023_ - a011_;\na022_ = a003_ + a004_;\n}\na010_ = a017_ - a010_;\na012_ = a013_ - a019_;\na001_ = cur_ + a012_;\na017_ = a015_ + a002_;\na018_ = a023_ + a020_;\na020_ = a012_ + a022_;\ncur_ = a023_ - a005_;\na000_ = a019_ - a022_;\na002_ = a006_ + a015_;\na022_ = a015_ - a003_;\na016_ = a013_ + -1;\na010_ = a016_ - a002_;\na021_ = a009_ - a008_;\na021_ = a002_ + a003_;\na013_ = a004_ - a008_;\n} else {\na015_ = a019_ + a023_;\na001_ = a014_ - a000_;\n}\na015_ = a014_ + a023_;\n}\na002_ = a014_ + a010_;\n}\noutput.collect(prefix, new IntWritable(a023_));\n}",
"@Override\n protected void setup(org.apache.hadoop.mapreduce.Reducer.Context context) throws IOException, InterruptedException {\n int reduceTaskId = context.getTaskAttemptID().getTaskID().getId();\n System.out.println(\"======== setup at task : \" + reduceTaskId);\n //mos = new MultipleOutputs(context);\n //resultOutput = context.getConfiguration().get(\"result_output\");\n //deleteOutput = context.getConfiguration().get(\"delete_output\");\n //System.out.println(\"========> resultOutput : \" + reduceTaskId + \"=============> deleteOutput : \" + deleteOutput);\n }",
"@Override\n\tpublic int compareTo(DocumentWritable o) {\n\t\treturn 0;\n\t}",
"void writeInt(int i) throws IOException;",
"@Override\n protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n String test = value.toString();\n test = test.replaceAll(\"\\t\", \" \").replaceFirst(\" \", \"\\t\");\n\n double basePageRank = 0;\n boolean hasPageRank = false;\n double pageRank = 0;\n /**\n * Pattern to distinguish our inserted numbers from numbers in titles\n * is: _!(numbers.numbers)\n */\n Pattern pt = Pattern.compile(\"(_!\\\\d+.\\\\S+)\");\n Matcher mt = pt.matcher(test);\n if (mt.find()) {\n pageRank = Double.parseDouble(mt.group(1).substring(2));\n hasPageRank = true;\n }\n /**\n * If it's the first iteration, distribute 1/N among outLinks\n */\n if (!hasPageRank) {\n try {\n pageRank = 1d / (context.getConfiguration().getInt(\"N\", 0));\n } catch (ArithmeticException ae) {\n /**\n * Catch division by zero (if 'N' was not set)\n */\n Logger.getLogger(PageRankMapper.class.getName()).log(Level.SEVERE, ae.getMessage(), ae);\n }\n }\n /**\n * Split input line into key,value\n */\n String[] split = test.split(\"\\t\");\n /**\n * Emit this node's (1-d)/N and it's adjacency outGraph if not empty\n */\n // d = 0.85\n basePageRank = (1 - 0.85) / (context.getConfiguration().getInt(\"N\", 0));\n String output = \"\";\n output += \"_!\" + basePageRank;\n if (split.length > 1) {\n //split[1] => outlinks string \n String[] outlinks = split[1].split(\" \");\n for (int i = hasPageRank ? 1 : 0; i < outlinks.length; i++) {\n output += \" \" + outlinks[i];\n }\n }\n context.write(new Text(split[0]), new Text(output.trim()));\n /**\n * Emit pageRank/|outLinks| to all outLinks if not empty: Split on \\t to\n * get separate key(index 0) from values(index 1), Split values on space\n * to separate out links(ignore the first(index 0),the pageRank, unless\n * hasPageRank=false)\n */\n if (split.length > 1) {\n String[] outlinks = split[1].split(\" \");\n /**\n * Input has no outLinks, only has basePageRank, already taken care\n * of in previous emit, return\n */\n if (hasPageRank && outlinks.length == 1) {\n return;\n }\n /**\n * d = 0.85\n */\n pageRank *= 0.85;\n /**\n * Divide pageRank over number of outLinks\n */\n pageRank /= hasPageRank ? (outlinks.length - 1) : outlinks.length;\n for (int i = hasPageRank ? 1 : 0; i < outlinks.length; i++) {\n context.write(new Text(outlinks[i]), new Text(\"_!\" + pageRank));\n }\n }\n }",
"public Int() {\n this(0);\n }",
"public void map(LongWritable key, Text string, Context context\n ) throws IOException, InterruptedException {\n\t\t\t\n\t\t\tSystem.out.println(string.toString());\n\t\t\t\n\t\t\tString[] value = string.toString().split(\",\");\n\n\t\t\tString value1 =value[1].replaceAll(\"[\\\\n\\\\t]\", \"\");\n\t\t\toutputkey.setKeyword(value[0]);\n\t\t\toutputkey.setSum(Integer.parseInt(value1));\n\t\t\tcontext.write(outputkey, new IntWritable(outputkey.getSum()));\n\t\t}",
"public int getMyWriteValue()\n\t{\n\t\treturn myWriteValue;\n\t}",
"@Override\n public void reduce(Text key, Iterable<LongWritable> values,\n Context context\n ) throws IOException, InterruptedException { \n \n for (LongWritable val : values) { \n if( max.compareTo(val) < 0) {\n max.set(new Long(val.toString()));\n } \n }\n context.write(key, max);\n }",
"public void reduce(Text key, Iterable<IntWritable> values, Context context) throws IOException, InterruptedException {\n }",
"public void incrHedgedReadOps() {\n hedgedReadOps.inc();\n }",
"void writeInt(int v) throws IOException;",
"public void onWrite(int value) {\n \t\t\tboolean newLatch = (value & 1) != 0;\n \t\t\tif (newLatch != joyLatch) {\n \t\t\t\tcurButton = 0;\n \t\t\t}\n \t\t\tjoyLatch = newLatch;\n \t\t}",
"@Override\n public void map(LongWritable kin, Text datin, Context context) throws IOException, InterruptedException {\n this.map(datin.toString()).forEach((k, v) -> {\n try {\n context.write(new IntWritable(k), new LongWritable(v));\n }catch (Exception e){\n throw new RuntimeException(e);\n }\n });\n }",
"public int getIndex1 () {\r\n\t\treturn _index1;\r\n\t}",
"public ArrayListOfIntsWritable(ArrayListOfIntsWritable other)\n {\n super();\n size = other.size();\n array = Arrays.copyOf(other.getArray(), size);\n }",
"public static void main(String[] args) throws IllegalArgumentException, IOException, ClassNotFoundException, InterruptedException {\n Configuration conf=new Configuration();\n FileSystem hdfs=FileSystem.get(conf);\n System.out.println(conf.get(\"fs.defaultFS\"));\n //conf.set(\"fs.defaultFS\",\"http//:localhost:9000\");\n Job job=new Job(conf,\"word cout\");\n job.setJarByClass(MyWordCount.class);\n job.setMapperClass(MyMapper.class);\n job.setReducerClass(MyReduce.class);\n job.setCombinerClass(MyReduce.class);\n job.setOutputKeyClass(Text.class);\n job.setOutputValueClass(IntWritable.class);\n// job.setInputFormatClass(TextInputFormat.class);\n// job.setOutputFormatClass(TextOutputFormat.class);\n FileInputFormat.addInputPath(job, new Path(\"file:///usr/local/hadoop-2.6.1/input\"));\n FileOutputFormat.setOutputPath(job, new Path(\"hdfs:///user/output\"));\n System.exit(job.waitForCompletion(true) ? 0 : 1);\n }",
"public void reduce(Text key, Iterable<IntWritable> values, Context context)\n throws IOException, InterruptedException\n {\n long count = 0;\n for (IntWritable val : values) {\n count += val.get();\n }\n\n context.write(key, new LongWritable(count));\n }",
"public void reduce(Text prefix, Iterator<IntWritable> iter,\n OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException {\nint a000 = 0;\nint a001 = 0;\nint a002 = 0;\nint a003 = 0;\nint a004 = 0;\nint a005 = 0;\nint a006 = 0;\nint a007 = 0;\nint a008 = 0;\nint a009 = 0;\nint a010 = 0;\nint a011 = 0;\nint a012 = 0;\nint a013 = 0;\nint a014 = 0;\nint a015 = 0;\nint a016 = 0;\nint a017 = 0;\nint a018 = 0;\nint a019 = 0;\nint a020 = 0;\nint a021 = 0;\nint a022 = 0;\nint a023 = 0;\nint a024 = 0;\nint cur = 0;\n\nwhile (iter.hasNext()) {\ncur = iter.next().get();\na003 += a021;\na011 += a023;\na017 -= -2;\na003 += a009;\na018 += a016;\na015 -= a004;\na020 -= a018;\na007 = a015 - a024;\na006 = a017 - a023;\na006 -= a024;\na019 += a014;\na008 = a015 - a023;\na015 += a024;\na004 += a004;\na021 -= a018;\na008 = a024 - a010;\na011 = a020 + a019;\na023 = a004 - a018;\ncur = a024 - a015;\na007 += a014;\na002 = a014 + a000;\na010 = a010 - a013;\na022 = a010 - a023;\na016 -= a014;\na004 -= a024;\na004 -= a005;\na014 = a005 + a012;\na001 = a018 + a018;\nif (a014 != a017) {\na019 = a023 + a007;\na000 -= cur;\na011 = a016 + a024;\na003 = a000 + a008;\na001 -= a012;\na011 = a016 + a022;\na009 += a011;\na012 -= a002;\na007 += a012;\n} else {\na003 -= a002;\na011 = a022 + a012;\na022 = a004 - a018;\na001 += a022;\na018 -= a005;\na001 = a004 - a017;\na021 = a011 + a021;\na005 -= a010;\na011 += a002;\na016 = a016 - a018;\na006 = a000 - a006;\na019 -= a002;\na009 -= a003;\na016 -= a019;\na013 = a000 + a005;\na008 += a002;\na013 = a002 + a007;\na010 += a018;\na005 -= a022;\na015 = a021 + a018;\na000 = a019 - a001;\nif (a005 == a018) {\nif (a011 >= a018) {\na018 += a005;\na012 -= a005;\na007 = a007 - a004;\n} else {\na015 = a017 + a022;\na022 += a015;\na019 += a010;\na014 -= cur;\na023 += a008;\na015 = a013 - a014;\nif (a011 != -2) {\na013 = a021 - a019;\na016 -= a010;\na000 = a021 + a024;\na009 = a009 + a015;\na005 = a018 + a002;\na004 = a021 * 4;\na008 = a018 + a007;\na021 = a011 + a013;\na015 = a002 + a023;\na022 = a007 - a012;\na005 -= a021;\na022 = a015 - a015;\na007 = a007 + a020;\na001 = a013 - a002;\na015 += a011;\na011 -= a002;\na010 = a015 * -2;\na020 -= a011;\na023 -= a013;\na013 = a004 - a023;\na023 = a023 - a017;\na016 = a008 + a014;\na015 -= cur;\na023 -= a022;\na005 -= a011;\na002 = a009 + a008;\na023 = a015 * 4;\na014 = 0 - a010;\na012 = a016 - a024;\na004 += a000;\na022 = a010 - a022;\na013 += a015;\na016 = a020 - a023;\nif (a012 < -4) {\na019 -= a019;\na015 -= a005;\na023 = a007 - a018;\na013 = a015 - a017;\na021 -= a013;\na005 = a004 - a020;\na004 = 0 - a022;\na021 -= a013;\na004 += a004;\na012 = a022 + a022;\n} else {\na018 = a013 + a014;\na004 += a017;\na007 = a021 + a009;\na009 -= a019;\na024 -= a000;\na001 = a001 - a021;\na001 = a011 + a001;\na005 = a003 + a006;\na012 -= a000;\na016 = a004 - a019;\na010 = a007 - a013;\na011 += cur;\na020 -= a021;\na024 = a015 - cur;\na000 = a012 - a015;\na011 -= a015;\na022 = a007 - a019;\na004 -= a013;\na016 = a015 - a016;\na022 = a023 + a006;\n}\na019 -= a000;\na000 = a012 - a019;\na005 = a014 + a004;\na022 -= a021;\na006 = a009 + a011;\na001 = a007 + a006;\na013 = a009 - a021;\na006 = a004 - a000;\na011 += a020;\na012 -= cur;\na010 -= a011;\na000 = a009 + cur;\na013 += a002;\na019 -= a013;\na021 -= a011;\na005 = 2 + a009;\na023 = a007 - a016;\na009 -= a024;\na024 -= a019;\n} else {\na010 -= cur;\na018 -= a001;\na007 -= a022;\na022 += a005;\na022 = a006 + a020;\na013 = cur - a001;\n}\na003 = a013 + a010;\na023 -= a010;\na011 = a002 - a015;\na017 = a010 + a008;\ncur = a020 - a018;\na011 += a009;\na018 = a012 + a017;\na000 += a023;\na012 = a001 - a007;\na009 += a005;\na018 += a006;\na020 = a016 - a016;\na007 = a007 + a002;\na005 = a021 - a018;\na023 = a006 - a002;\na006 = cur - a016;\na007 = a007 + a013;\ncur += a021;\na014 += -3;\na013 -= a007;\na016 += a012;\ncur += a005;\na007 += a018;\na013 = a006 - a022;\na008 -= a008;\na000 = a006 - a011;\ncur += a023;\na002 = a005 - a024;\na022 -= a019;\na016 = a007 - a002;\na002 = a012 + a020;\n}\na003 += a004;\na005 = a022 - a000;\na004 = a003 - a021;\na011 -= a009;\na000 -= a024;\na019 += a012;\na024 = a021 + a020;\na016 -= a005;\na024 += a006;\na006 = a005 - a008;\na003 = a021 + a000;\na012 -= a012;\na012 += a003;\na002 += a013;\na020 = 0 + a007;\na013 -= a006;\na022 = a020 - a010;\n} else {\na002 -= a002;\na017 = a000 + a018;\na012 += cur;\na014 -= a006;\na024 += a000;\na008 = a023 - a009;\na009 += a012;\na013 += a007;\na001 += a011;\na020 += 1;\na011 = a006 + a023;\na017 += a024;\na002 = a014 + a014;\na016 = a012 - a009;\n}\na018 -= a010;\na023 += a020;\na012 = a013 - a012;\na015 -= a021;\na004 = a001 - a016;\na001 += a004;\na023 -= a021;\na014 += a002;\na001 = a007 - a006;\na007 = a022 - -5;\na012 -= a006;\na022 += a010;\na007 = a001 + -2;\na016 = a015 + a005;\na021 += a004;\na006 -= a023;\na017 += a013;\na012 -= a010;\na018 -= 0;\na023 = -3 - a006;\na012 -= a014;\n}\na005 += a020;\na016 = a012 - a008;\na016 = a012 + a002;\na019 = a007 + a017;\na009 = a009 + a009;\na001 += 1;\na020 = a021 + a024;\na001 = a020 - a011;\na015 = a011 - a013;\na003 += a021;\na004 -= a009;\na014 -= a022;\n}\noutput.collect(prefix, new IntWritable(a015));\n}",
"int getCombine();",
"public void reduce(Text prefix, Iterator<IntWritable> iter,\n OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException {\nint a000_ = 0;\nint a001_ = 0;\nint a002_ = 0;\nint a003_ = 0;\nint a004_ = 0;\nint a005_ = 0;\nint a006_ = 0;\nint a007_ = 0;\nint a008_ = 0;\nint a009_ = 0;\nint a010_ = 0;\nint a011_ = 0;\nint a012_ = 0;\nint a013_ = 0;\nint a014_ = 0;\nint a015_ = 0;\nint a016_ = 0;\nint a017_ = 0;\nint a018_ = 0;\nint a019_ = 0;\nint cur_ = 0;\n\nwhile (iter.hasNext()) {\ncur_ = iter.next().get();\na011_ = a015_ - a008_;\na003_ = a000_ + a003_;\na005_ = a005_ + a006_;\na015_ = a012_ + a011_;\na008_ = a014_ + a001_;\na007_ = a005_ + a015_;\na002_ = a000_ - a009_;\na012_ = a005_ + a012_;\na010_ = a018_ + a003_;\na014_ = a014_ + a004_;\ncur_ = a002_ + a004_;\na017_ = a007_ + a009_;\na005_ = cur_ - a014_;\na000_ = a012_ - a006_;\na006_ = a013_ - a011_;\na000_ = 0 - a008_;\na006_ = a007_ + a003_;\na015_ = a014_ - a019_;\na004_ = a012_ + cur_;\na005_ = a018_ - a017_;\na007_ = a006_ + a000_;\na005_ = cur_ - a009_;\na001_ = a009_ + a008_;\na015_ = cur_ + a010_;\na013_ = a018_ * -2;\ncur_ = a013_ - a012_;\na019_ = a002_ - a001_;\na017_ = a014_ + a004_;\na005_ = a017_ - a006_;\na016_ = a019_ - a019_;\na009_ = a000_ + cur_;\na013_ = a003_ * -1;\nif (a010_ >= a004_) {\na015_ = a018_ + a015_;\na010_ = a009_ - a010_;\na012_ = a011_ - a005_;\na014_ = a002_ - a012_;\nif (a000_ != a013_) {\na004_ = a015_ + cur_;\na013_ = a019_ + a016_;\na013_ = a012_ + a009_;\na016_ = a014_ - -5;\na001_ = a002_ - a004_;\n} else {\na007_ = a013_ - a003_;\na016_ = a007_ - a018_;\na016_ = a013_ + a011_;\na013_ = a013_ - a012_;\na013_ = -1 + a006_;\ncur_ = a002_ - a017_;\na007_ = a002_ + a018_;\ncur_ = a002_ + a015_;\na003_ = a015_ + a007_;\na017_ = a005_ + a009_;\na013_ = a006_ - -2;\na008_ = a005_ - a003_;\na002_ = a017_ - a014_;\na006_ = a006_ + a010_;\na008_ = a018_ + a010_;\na000_ = a015_ + -4;\na014_ = a004_ - a010_;\na012_ = a009_ - a016_;\na008_ = a002_ - a019_;\na015_ = a007_ + a005_;\na004_ = cur_ + a018_;\na011_ = a007_ + a012_;\na007_ = 4 - a011_;\na001_ = a012_ + cur_;\na011_ = a010_ - a013_;\na003_ = a006_ - a011_;\na006_ = a012_ - a008_;\na015_ = a010_ - a013_;\na019_ = a012_ + a011_;\nif (a017_ != a015_) {\ncur_ = a010_ - cur_;\na013_ = a009_ - a002_;\na008_ = a011_ - a008_;\na019_ = a005_ - a000_;\na010_ = a019_ + a010_;\na002_ = a004_ - 1;\na017_ = a015_ - cur_;\ncur_ = 1 - a005_;\na004_ = a000_ + a003_;\na001_ = a012_ + 2;\na004_ = a003_ - 2;\na003_ = a010_ - -4;\na019_ = a014_ - a002_;\na011_ = a002_ - a007_;\na000_ = a007_ + a015_;\na018_ = a009_ + cur_;\na006_ = a003_ - a017_;\nif (a008_ == a013_) {\na005_ = a017_ + a016_;\na005_ = a005_ + a013_;\na017_ = a015_ + a007_;\na016_ = a016_ + a018_;\na016_ = a014_ - a015_;\na003_ = a019_ - a018_;\ncur_ = a010_ + a005_;\na003_ = a001_ + a010_;\na016_ = -4 + a003_;\na002_ = a017_ + a008_;\na016_ = a003_ - a009_;\na003_ = a009_ + a015_;\na016_ = a004_ - a000_;\na005_ = a015_ + cur_;\na018_ = a010_ + a003_;\na016_ = a017_ - a004_;\n} else {\na018_ = a019_ + a009_;\na015_ = a004_ + a018_;\na019_ = a005_ - a003_;\na009_ = -5 + a008_;\na010_ = a000_ + a000_;\na009_ = a009_ - a011_;\na005_ = a006_ - cur_;\na019_ = a018_ + a009_;\na014_ = a005_ + cur_;\na004_ = a010_ + a008_;\na000_ = a015_ - a018_;\na015_ = a017_ - a017_;\na008_ = a001_ + a008_;\na002_ = a009_ - a012_;\na010_ = a006_ - a012_;\na014_ = a009_ + a001_;\na016_ = a000_ - a016_;\na004_ = a018_ - a019_;\na007_ = a003_ + a011_;\na019_ = a004_ - a017_;\na015_ = a018_ - a017_;\na003_ = a000_ + a002_;\na005_ = a007_ - a014_;\na001_ = cur_ + a017_;\n}\na012_ = a012_ + cur_;\n} else {\na010_ = a018_ + a000_;\na002_ = a000_ - a003_;\na005_ = a012_ + a012_;\na015_ = a004_ + a004_;\na008_ = a013_ - a019_;\na004_ = a002_ + a015_;\na011_ = a014_ + a012_;\na004_ = a019_ + a010_;\na002_ = a018_ + a010_;\ncur_ = a017_ + a019_;\na017_ = a013_ + a005_;\na013_ = a008_ - a012_;\na004_ = a012_ + a007_;\n}\na009_ = a015_ - a016_;\na000_ = a006_ + a008_;\na003_ = a008_ - a011_;\na001_ = a016_ - a006_;\na016_ = a014_ + a016_;\na000_ = a011_ + a003_;\na004_ = a010_ + a019_;\na013_ = a008_ + cur_;\na016_ = a016_ + a015_;\n}\na010_ = a003_ + a007_;\na006_ = a009_ - a000_;\na002_ = a017_ - a001_;\na013_ = a016_ + a019_;\na013_ = a009_ - a015_;\na005_ = a002_ - a018_;\na009_ = a002_ + a007_;\na008_ = a008_ + a002_;\na007_ = a005_ + a009_;\na017_ = a019_ + a013_;\na012_ = a003_ + a004_;\na008_ = a012_ + a012_;\na003_ = a007_ + a005_;\ncur_ = a014_ + a007_;\na009_ = a016_ + a010_;\na006_ = a005_ - a003_;\na014_ = a019_ + cur_;\na006_ = a007_ + a000_;\na013_ = a011_ - a011_;\na018_ = a009_ - 1;\na002_ = a004_ - a014_;\n} else {\na004_ = a006_ - a014_;\na016_ = a017_ + 2;\na014_ = a006_ - a002_;\na002_ = a016_ + cur_;\na014_ = -3 + a018_;\n}\ncur_ = a017_ + a015_;\na005_ = a003_ - a015_;\na014_ = a019_ + a009_;\ncur_ = cur_ + a005_;\na009_ = a007_ - a004_;\ncur_ = a014_ + a006_;\na013_ = a002_ - a012_;\na002_ = a008_ + a014_;\na000_ = a006_ + a004_;\na017_ = 1 - a009_;\na012_ = a017_ + a001_;\na011_ = a009_ - a010_;\na011_ = a018_ - a014_;\na016_ = a003_ - cur_;\na013_ = cur_ + a012_;\na015_ = a012_ + a010_;\na017_ = a007_ + a017_;\na000_ = -1 + a008_;\na010_ = a008_ + a003_;\na016_ = a009_ + a010_;\na002_ = a011_ + a008_;\na016_ = a015_ + a016_;\na002_ = a012_ + a008_;\na017_ = a013_ + a004_;\n}\noutput.collect(prefix, new IntWritable(a005_));\n}"
] |
[
"0.5982721",
"0.58499026",
"0.5399833",
"0.53660995",
"0.53540194",
"0.53425",
"0.53229463",
"0.5183901",
"0.5183316",
"0.517767",
"0.5176647",
"0.51616216",
"0.51383567",
"0.5125327",
"0.5118711",
"0.50397104",
"0.50341344",
"0.5002094",
"0.50007856",
"0.4970477",
"0.49676535",
"0.49390072",
"0.49348506",
"0.4934451",
"0.49240467",
"0.49135724",
"0.4911975",
"0.4910829",
"0.4910829",
"0.49073058",
"0.48925063",
"0.48916328",
"0.4889799",
"0.4855335",
"0.48247078",
"0.48139447",
"0.48110268",
"0.48076332",
"0.47979072",
"0.4789789",
"0.4787657",
"0.47774786",
"0.47762915",
"0.47613555",
"0.47521052",
"0.47515512",
"0.47346222",
"0.4710156",
"0.47074965",
"0.47050273",
"0.47035998",
"0.47030994",
"0.47015315",
"0.46937734",
"0.46876726",
"0.46862108",
"0.4673606",
"0.4669599",
"0.46637908",
"0.46636197",
"0.46514413",
"0.46497345",
"0.46376482",
"0.4627794",
"0.46251032",
"0.45974982",
"0.45873436",
"0.45872965",
"0.45796567",
"0.45775124",
"0.45685843",
"0.45676023",
"0.45634094",
"0.4559424",
"0.45506132",
"0.4545444",
"0.453668",
"0.45342687",
"0.4532426",
"0.45274842",
"0.45269325",
"0.4524304",
"0.4523006",
"0.45185643",
"0.45152816",
"0.45142505",
"0.4511676",
"0.44924653",
"0.44907027",
"0.44902134",
"0.44876045",
"0.44869453",
"0.4485916",
"0.4481655",
"0.44775423",
"0.447596",
"0.44734788",
"0.44730756",
"0.44637352",
"0.44563076",
"0.44538462"
] |
0.0
|
-1
|
TODO Autogenerated method stub
|
@Override
public int run(String[] arg0) throws Exception {
return 0;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] |
[
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] |
0.0
|
-1
|
TODO: Implement test cases to validate the logic of spock works... :)
|
public void testSpock(){
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void test() {\n\n\t}",
"@Test\n\tpublic void getWorksTest() throws Exception {\n\t}",
"@Test\n void userStory1() throws ValidationException, NoShoppingListExist {\n ShoppingListFactory factory = api.createShoppingList();\n factory.setName(\"My Shoopping List\");\n factory.setDescription(\"A short description\");\n ShoppingList list = factory.validateAndCommit();\n\n // Times go on\n\n ShoppingList list2 = api.find(list.getId());\n\n // Test\n\n assertEquals(list.getId(), list2.getId());\n assertEquals(list.getName(), list2.getName());\n assertEquals(list.getDescription(), list2.getDescription());\n }",
"@When(\"Try to Attempt sending crafted records to DNS cache\")\npublic void tryattemptsendingcraftedrecordstodnscache(){\n}",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"@Test\n public void trainWithMasterSplinterTest() {\n\n }",
"public void testGetInsDyn() {\n }",
"public void smell() {\n\t\t\n\t}",
"@Test\n public void trimsBidAndAsk() {\n }",
"@Then(\"Assert the success of Attempt sending crafted records to DNS cache\")\npublic void assattemptsendingcraftedrecordstodnscache(){\n}",
"@SuppressWarnings(\"unchecked\")\n @Test\n public void singleShock() {\n MarketDataShock shock = MarketDataShock.relativeShift(0.5, MATCHER1);\n FilteredScenarioDefinition scenarioDef = new FilteredScenarioDefinition(shock);\n SimpleEnvironment env = new SimpleEnvironment(ZonedDateTime.now(), MARKET_DATA_BUNDLE, scenarioDef);\n\n assertEquals(1.5, FN.foo(env, SEC1).getValue(), DELTA);\n assertEquals(2d, FN.foo(env, SEC2).getValue(), DELTA);\n }",
"@Test\n public void updateAccept() throws Exception {\n\n }",
"@Given(\"prepare to Attempt sending crafted records to DNS cache\")\npublic void preattemptsendingcraftedrecordstodnscache(){\n}",
"public void testItemExists() throws RepositoryException{\n boolean result = true;\n String path=\"path\";\n \n sessionControl.expectAndReturn(session.itemExists(path), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertEquals(jt.itemExists(path), result);\n }",
"@Test\n public void multipleSeparateShocks() {\n MarketDataShock relativeShift = MarketDataShock.relativeShift(0.5, MATCHER1);\n MarketDataShock absoluteShift = MarketDataShock.absoluteShift(0.1, MATCHER2);\n FilteredScenarioDefinition scenarioDef = new FilteredScenarioDefinition(absoluteShift, relativeShift);\n SimpleEnvironment env = new SimpleEnvironment(ZonedDateTime.now(), MARKET_DATA_BUNDLE, scenarioDef);\n\n assertEquals(1.5, FN.foo(env, SEC1).getValue(), DELTA);\n assertEquals(2.1, FN.foo(env, SEC2).getValue(), DELTA);\n }",
"@Test\n\tpublic void runSend(){\n\t\tstandard();\n\t}",
"@Test\n public void sidTest() {\n // TODO: test sid\n }",
"@Test\n public void multipleShocksOnSameData() {\n MarketDataShock absoluteShift = MarketDataShock.absoluteShift(0.1, MATCHER1);\n MarketDataShock relativeShift = MarketDataShock.relativeShift(0.5, MATCHER1);\n FilteredScenarioDefinition scenarioDef = new FilteredScenarioDefinition(absoluteShift, relativeShift);\n SimpleEnvironment env = new SimpleEnvironment(ZonedDateTime.now(), MARKET_DATA_BUNDLE, scenarioDef);\n\n assertEquals(1.65, FN.foo(env, SEC1).getValue(), DELTA);\n assertEquals(2d, FN.foo(env, SEC2).getValue(), DELTA);\n }",
"@Test\n public void sustainMassiveDamage() {\n }",
"@Test\n public void reopenClosedTeamUnavalableOption() {\n\n }",
"@Test\n public void testGetRoundsByGameID() {\n \n \n }",
"@Test\n public void solve1() {\n }",
"public void mo38850q() {\n }",
"@Test\n void isShelfAvailability(){\n Shelf shelf=new Shelf(3);\n\n shelf.addResources(Resource.SHIELD);\n shelf.addResources(Resource.SHIELD);\n assertTrue(shelf.isShelfAvailability());\n }",
"@Test\r\n\tpublic void client() {\n\t}",
"@Test\n public void testCOH9787()\n {\n // Test distributed scheme with local backing map\n COH9787Helper(\"COH9787-local-BM\");\n\n // Test distributed scheme with RWBM\n COH9787Helper(\"COH9787-RWBM-local-front\");\n }",
"@Override\n\tpublic void test() {\n\t\t\n\t}",
"@Test\n public void testSlip() {\n // Setup\n\n // Run the test\n modelUnderTest.slip();\n\n // Verify the results\n }",
"@Test\r\n public void testSamSyndicator() {\n if (!isExistPublisher(TckPublisher.getSamPublisherId())) {\r\n saveSamSyndicator();\r\n deleteSamSyndicator();\r\n }\r\n }",
"@Test\n\tpublic void testReadTicketOk() {\n\t}",
"@Test\n public void temporaryTeamClosingUnavalableOption() {\n\n }",
"@Override\n\t\t\tpublic void worked(int work) {\n\t\t\t\t\n\t\t\t}",
"public void testReceiveFeedback() {\n\n\t}",
"@Test\n public void testDAM30203001() {\n testDAM30102001();\n }",
"@Test\n public void testWin() throws Exception {\n // Setup\n\n // Run the test\n modelUnderTest.win();\n\n // Verify the results\n }",
"@Test\n public void shouldMakeCoffeeWhenShotsAreNotAvailable(){\n given(supplyService.isCoffeeShotAvailable(EXPRESSO)).willReturn(false);\n //When coffee is order\n Boolean orderStatus=kitchenService.makeCoffee(EXPRESSO);\n //Then Kitchen should make coffee\n assertThat(orderStatus, is(false));\n\n }",
"@Test\n public void askForCardSmart() throws Exception {\n Map<Integer,Integer> allMovesMade = new HashMap<Integer,Integer>();\n allMovesMade.put(1, 2);\n SmartPlayer x = new SmartPlayer(0,1);\n x.setCards(2,2);\n x.setMovesMadeByOtherPlayers(allMovesMade);\n SmartPlayer y = new SmartPlayer(1,2);\n y.setCards(2,2);\n int rankToAsk = x.askForCard(2);\n assertTrue(rankToAsk == 2);\n //assertTrue(rankToAsk<=13 && rankToAsk> 0);\n }",
"protected void onBSLock() {\n\n }",
"@Test\n public void fightShredderTest() {\n }",
"@Test\n public void testOverflowClient()\n {\n String sName = \"local-overflow-client\";\n generateEvents(sName);\n checkEvents(true, false);\n }",
"@Test\n public void placeShipsTest()throws GameException, StatusException, IOException,InterruptedException{\n SVToReadTester aliceGameEngineTester = new SVToReadTester();\n //real protocol engine on alice´s side\n SVProtocolEngine aliceSVProtocolEngine = new SVProtocolEngine(aliceGameEngineTester);\n\n //protocol engine\n ProtocolEngine aliceProtocolEngine = aliceSVProtocolEngine;\n SchiffeVersenken aliceGameEngineSide = aliceSVProtocolEngine;\n\n //bobs game engine Tester\n SVToReadTester bobGameEngineTester = new SVToReadTester();\n ProtocolEngine bobProtocolEngine = new SVProtocolEngine(bobGameEngineTester);\n\n // Setup\n int port = this.getPortNumber();\n // this stream plays TCP server role during connection establishment\n TCPStream aliceSide = new TCPStream(port, true, \"aliceSide\");\n // this stream plays TCP client role during connection establishment\n TCPStream bobSide = new TCPStream(port, false, \"bobSide\");\n // start both stream\n aliceSide.start(); bobSide.start();\n // wait until TCP connection is established\n aliceSide.waitForConnection(); bobSide.waitForConnection();\n\n // launch\n aliceProtocolEngine.handleConnection(aliceSide.getInputStream(), aliceSide.getOutputStream());\n bobProtocolEngine.handleConnection(bobSide.getInputStream(), bobSide.getOutputStream());\n\n Thread.sleep(1000);\n\n // run test scenario // todo\n ArrayList<BattleshipsBoardPosition> positions = aliceSVProtocolEngine.placeShips(ALICE, buildPositions(SHIPPOS1));\n ArrayList<BattleshipsBoardPosition> positions1 = aliceSVProtocolEngine.placeShips(BOB, buildPositions(SHIPPOS1));\n BattleshipsBoardPosition testPos = new BattleshipsBoardPosition(\"A\", 0);\n Assert.assertEquals(\"F\", aliceGameEngineSide.attackPos(BOB, testPos));\n\n}",
"@Test\n public void botPlay() {\n Bot.randomBot(0);\n }",
"@Test\n public void searchTrueTest() {\n assertThat(4, is(this.queue.search(\"work4\")));\n assertThat(1, is(this.queue.search(\"work1\")));\n }",
"public void testHasPendingChanges() throws RepositoryException{\n boolean result = true;\n \n sessionControl.expectAndReturn(session.hasPendingChanges(), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertEquals(jt.hasPendingChanges(), result);\n }",
"@Override\n\tpublic void exams() {\n\t\t\n\t}",
"@Test\n public void questionIfNotAlreadyAccusedTest() throws Exception {\n\n }",
"@Test\n public void checkStockWithoutProduction () {\n\n player.playRole(new Trader(stockGlobal,1));\n assertEquals(true,stockGlobal.getStockResource(TypeWare.INDIGO)==initialIndigoInStock);\n\n }",
"@Test\n\tvoid testLectureChoixInt() {\n\t\t\n\t}",
"@Test\n public void testPrintPosLnS() throws Exception\n {\n//TODO: Test goes here... \n }",
"abstract boolean test(SPObject spo, String comp);",
"@Test\n public void testDAM30601001() {\n testDAM30102001();\n }",
"@Test\r\n\tpublic void testFrontTimes() {\r\n//\t\tassertEquals(\"ChoCho\", WarmUpTwo.frontTimes)\r\n\t\tfail(\"Not yet implemented\");\r\n\t\t\r\n\t}",
"@Test\r\n void testSpitefulAlwaysCooperate() {\r\n AlwaysCooperate testStrat = new AlwaysCooperate();\r\n Spiteful testStrat2 = new Spiteful();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n Game game = new Game(testStrat, testStrat2, 3, payoffs);\r\n game.playGame();\r\n assertEquals(testStrat2.getPoints(), 9, \"Spiteful strategy not functioning correctly\");\r\n }",
"@Test\n public void testDAM30402001() {\n testDAM30101001();\n }",
"@Test\n public void winGame() {\n }",
"@Then(\"Assert the success of Attempt well-known or guessable resource locations\")\npublic void assattemptwellknownorguessableresourcelocations(){\n}",
"public void testWriteOrders() throws Exception {\n }",
"@Test\n\tpublic void acceptedOfferCanNotBeRejected() {\n\t}",
"@Test\n\tpublic void hasWorkstationTest(){\n\t\tcmcSystem.logInUser(2);\n\t\tOrder testOrder = makeOrder(new ModelA());\n\t\tcmcSystem.logInUser(2);\n\t\tOrder testOrder2 = makeOrder(new ModelB());\n//\t\tOrder testOrder3 = makeOrder(new ModelC());\n//\t\tOrder testOrder4 = makeOrder(new ModelX());\n//\t\tcmcSystem.logInUser(2);\n//\t\tOrder testOrder5 = makeOrder(new ModelY());\n\t\tcmcSystem.logInUser(1);\n\t\tassemblyLine.setStatus(Status.OPERATIONAL, 1);\n\t\tassertTrue(assemblyLine.supports(testOrder));\n\t\tassertTrue(assemblyLine.supports(testOrder2));\n//\t\tassertFalse(assemblyLine.supports(testOrder3));\n//\t\tassertFalse(assemblyLine.supports(testOrder4));\n//\t\tassertFalse(assemblyLine.supports(testOrder5));\n\t}",
"@Test\n\tpublic void trial01() {\n\t\tspec1.pathParam(\"id\", 3);\n\t\tResponse response =given().spec(spec1).get(\"/{id}\");\n\t\tresponse.prettyPrint();\n\t\t\n\t\tresponse.then().assertThat().statusCode(200).contentType(ContentType.JSON).statusLine(\"HTTP/1.1 200 OK\");\n\t}",
"@Test\n void getMandatoryDeepSuccessors () {\n\n }",
"@Test\r\n\tpublic void client2() {\n\t}",
"@When(\"Try to Access & exfiltrate data within the victim's security zone\")\npublic void tryaccessexfiltratedatawithinthevictimssecurityzone(){\n}",
"@When(\"Try to Analysis\")\npublic void tryanalysis(){\n}",
"public void mock(){\n\n }",
"@Test\n public void askForCardSmart2() throws Exception {\n Map<Integer,Integer> allMovesMade = new HashMap<Integer,Integer>();\n allMovesMade.put(3, 2);\n SmartPlayer x = new SmartPlayer(0,1);\n x.setCards(3,2);\n x.setMovesMadeByOtherPlayers(allMovesMade);\n SmartPlayer y = new SmartPlayer(0,2);\n y.setCards(2,2);\n int rankToAsk = x.askForCard(2);\n assertTrue(rankToAsk == 3);\n\n }",
"@Test\r\n public void testMergeSpectra() throws Exception {\n }",
"@Test\n void testHumanActionMakeSpeak(){\n Humans human = new Humans();\n human.setName(\"tuandung\");\n\n human.setCalm(100);\n assertEquals(human.getName() + \" \"+ \"wanna stop that war\", human.makeSpeakVote(),\"stop the war when calm\");\n human.setCalm(0);\n assertEquals(human.getName() + \" \"+ \"said what ever\", human.makeSpeakVote(),\"human make speak when calm < 0\");\n }",
"@Test\r\n\t public void hasSubmitted1() {\n\t \tthis.admin.createClass(\"ecs60\",2017,\"sean\",50);\r\n\t \tthis.student.registerForClass(\"gurender\", \"ecs60\", 2017);\r\n\t // this.instructor.addHomework(\"sean\", \"ecs60\", 2017, \"p1\");\r\n\t this.student.submitHomework(\"gurender\", \"p1\", \"abc\", \"ecs60\", 2017);\r\n\t // assertFalse(this.student.isRegisteredFor(\"gurender\", \"ecs60\", 2018));\r\n\t\t assertFalse(this.student.hasSubmitted(\"gurender\", \"p1\", \"ecs60\", 2017));\r\n\t }",
"@Test\n public void shouldSavePlayerInTheWinnerGame() {\n String player = \"player\" ;\n scoreService.saveWinnerGame(player) ;\n assertThat( scoreService.getWinerGames() , \n is(not(empty()))) ;\n }",
"public void testImproperUseOfTheCircuit() {\n \t fail(\"testImproperUseOfTheCircuit\");\n }",
"public void testIsLive() {\n boolean result = true;\n \n sessionControl.expectAndReturn(session.isLive(), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertEquals(jt.isLive(), result);\n }",
"@Test\n public void checkBook2() throws Exception {\n SmartPlayer x = new SmartPlayer(0,0);\n boolean gotBook = x.checkBook();\n assertTrue(!gotBook);\n }",
"@Test\n\tpublic void testGetSparePartSpec() {\n\t\t\t\n\t\tassertTrue(spReg.getSparePartSpecification(\"1\") != null);\n\t\t\n\t\t//fail(\"Not yet implemented\");\n\t}",
"@Override\n public void testTwoRequiredGroups() {\n }",
"@Override\n public void testTwoRequiredGroups() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Test\n public void verifyPathsInSequence() {\n LOG.debug(\"### Executing \"+ Thread.currentThread().getStackTrace()[1].getMethodName() +\" ####\");\n testGetCompanyHome();\n testGetCabinetFolder();\n testGetCaseFolder();\n testGetDocumentLibraryFolder();\n testEvidenceBankFolder();\n\n }",
"@Test\n public void shouldStartNewGameIfNotAlreadyOneExisting() {\n\n boolean expResult = true ;\n boolean result = scoreService.tryNewGame() ;\n assertThat(expResult, is(result)) ;\n }",
"@Test\n\tpublic void testShow() {\n\t}",
"public void testListClaim(){\n\t}",
"public void testGitHub() {\n\t}",
"@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testSCRS8() {\n CuteNetlibCase.doTest(\"SCRS8.SIF\", \"960.0206152764557\", null, NumberContext.of(7, 4));\n }",
"@Override\r\n\tpublic void worked(int work) {\n\t}",
"public void think() {\n\t\t\n\t}",
"@Test\r\n void testSpitefulAlwaysDefect() {\r\n AlwaysDefect testStrat = new AlwaysDefect();\r\n Spiteful testStrat2 = new Spiteful();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n Game game = new Game(testStrat, testStrat2, 3, payoffs);\r\n game.playGame();\r\n assertEquals(testStrat2.getPoints(), 2, \"Spiteful strategy not functioning correctly\");\r\n }",
"private void test() throws DroolsParserException, IOException {\n\t\tRuleBase ruleBase = initialiseDrools();\n\t\tWorkingMemory workingMemory = initializeMessageObjects(ruleBase);\n\t\tint expectedNumberOfRulesFired = 1;\n\n\t\tint actualNumberOfRulesFired = workingMemory.fireAllRules();\n\t}",
"@Test\n public void testSend() throws Exception {\n//TODO: Test goes here...\n message.send(\"hello\", \"Bob\");\n }",
"@Test\n public void testFinder() throws WorkflowException {\n ProtocolFactory.createProtocolDocument(PROTOCOL_NUMBER, 1);\n ProtocolDocument protocolDocument1 = ProtocolFactory.createProtocolDocument(PROTOCOL_NUMBER, 2);\n\n ProtocolDocument protocolDocument2 = ProtocolFactory.createProtocolDocument(PROTOCOL_NUMBER2, 1);\n\n Protocol protocol = protocolFinder.findCurrentProtocolByNumber(PROTOCOL_NUMBER2);\n assertNotNull(protocol);\n assertEquals(protocolDocument2.getProtocol().getProtocolId(), protocol.getProtocolId());\n\n protocol = protocolFinder.findCurrentProtocolByNumber(PROTOCOL_NUMBER);\n assertNotNull(protocol);\n assertEquals(protocolDocument1.getProtocol().getProtocolId(), protocol.getProtocolId());\n }",
"public void solution() {\n\t\t\n\t}",
"@Test\r\n\t public void hasSubmitted2() {\n\t \tthis.admin.createClass(\"ecs60\",2017,\"sean\",50);\r\n\t \tthis.student.registerForClass(\"gurender\", \"ecs60\", 2017);\r\n\t this.instructor.addHomework(\"sean\", \"ecs60\", 2017, \"p1\");\r\n\t this.student.submitHomework(\"gurender\", \"p1\", \"abc\", \"ecs61\", 2017); \r\n\t assertFalse(this.student.hasSubmitted(\"gurender\", \"p1\", \"ecs61\", 2017));\r\n\t }",
"@Test\r\n void checkSession() {\n }",
"@When(\"Try to Attempt well-known or guessable resource locations\")\npublic void tryattemptwellknownorguessableresourcelocations(){\n}",
"@Test\r\n public void testGreeting02(){\r\n\r\n assertEquals(\"Hello SQS\", greets.greet(\"SQS\"));\r\n assertEquals(\"Hello TDD\", greets.greet(\"TDD\"));\r\n }",
"@Test\r\n void testTitForTatWithHistoryCooperate() {\r\n TitForTat testStrat = new TitForTat();\r\n AlwaysCooperate testStrat2 = new AlwaysCooperate();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n Game game = new Game(testStrat, testStrat2, 2, payoffs);\r\n game.playGame();\r\n int points = testStrat.getPoints();\r\n assertEquals(points, 6, \"tit for tat not returning correctly \"\r\n + \"against cooperating opponent\"); \r\n }",
"@Test\n public void consentsTest() {\n // TODO: test consents\n }",
"@Given(\"prepare to Access & exfiltrate data within the victim's security zone\")\npublic void preaccessexfiltratedatawithinthevictimssecurityzone(){\n}",
"public void test_ck_02() {\n OntModel vocabModel = ModelFactory.createOntologyModel();\n ObjectProperty p = vocabModel.createObjectProperty(\"p\");\n OntClass A = vocabModel.createClass(\"A\");\n \n OntModel workModel = ModelFactory.createOntologyModel();\n Individual sub = workModel.createIndividual(\"uri1\", A);\n Individual obj = workModel.createIndividual(\"uri2\", A);\n workModel.createStatement(sub, p, obj);\n }",
"@Test\r\n void testTitForTatWithHistoryDefect() {\r\n TitForTat testStrat = new TitForTat();\r\n AlwaysDefect testStrat2 = new AlwaysDefect();\r\n ArrayList<Integer> payoffs = new ArrayList<>(Arrays.asList(3, 5, 0, 1));\r\n Game game = new Game(testStrat, testStrat2, 2, payoffs);\r\n game.playGame();\r\n int points = testStrat.getPoints();\r\n assertEquals(points, 1, \"tit for tat not returning \"\r\n + \"correctly against defecting opponent\"); \r\n }",
"@Test\n void shouldHaveFatSilentFoxes() {\n }"
] |
[
"0.5795958",
"0.57711476",
"0.5763365",
"0.5729042",
"0.57190436",
"0.57055",
"0.5704202",
"0.5623766",
"0.5607949",
"0.5549689",
"0.5472308",
"0.54493695",
"0.5425648",
"0.5411241",
"0.5404886",
"0.5394221",
"0.53896976",
"0.5383601",
"0.53832155",
"0.5378559",
"0.53440654",
"0.5342902",
"0.5329055",
"0.532418",
"0.5320747",
"0.53147364",
"0.5310981",
"0.5306561",
"0.53063315",
"0.5286899",
"0.52857244",
"0.52853",
"0.5282576",
"0.5277784",
"0.5272434",
"0.5268778",
"0.52601767",
"0.5252864",
"0.52492845",
"0.52480257",
"0.5236004",
"0.52345735",
"0.5232328",
"0.522974",
"0.52153754",
"0.5212575",
"0.520487",
"0.5200391",
"0.5198871",
"0.51987857",
"0.51955104",
"0.51926535",
"0.51909864",
"0.518989",
"0.51875603",
"0.5184954",
"0.51834434",
"0.51774967",
"0.51750296",
"0.517448",
"0.5171346",
"0.5170438",
"0.51666576",
"0.5163649",
"0.51635146",
"0.5162529",
"0.5161661",
"0.51606023",
"0.51595026",
"0.51575214",
"0.51568335",
"0.5156477",
"0.5155123",
"0.51541054",
"0.5149355",
"0.5149355",
"0.51464283",
"0.51450545",
"0.5143813",
"0.51434875",
"0.51402926",
"0.51383483",
"0.5132343",
"0.5132128",
"0.5130498",
"0.5129531",
"0.51286703",
"0.51280606",
"0.5126407",
"0.51244915",
"0.51213294",
"0.51122844",
"0.51058286",
"0.51022756",
"0.51018244",
"0.50998986",
"0.5097518",
"0.50957495",
"0.5094968",
"0.5091557"
] |
0.6648351
|
0
|
TODO: Implement test cases to validate the logic of lizard works
|
public void testLizard(){
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Yard createYard();",
"ICard deal();",
"public LaundryCard() {\n\t}",
"@Test\n public void testArmiesInAirliftCommand() {\n d_gameData.getD_playerList().get(0).getD_ownedCountries().get(0).setD_noOfArmies(5);\n d_gameData.getD_playerList().get(1).getD_ownedCountries().get(0).setD_noOfArmies(3);\n\n d_orderProcessor.processOrder(\"airlift india nepal 6\".trim(), d_gameData);\n d_gameData.getD_playerList().get(0).issue_order();\n Order l_order = d_gameData.getD_playerList().get(0).next_order();\n assertFalse(l_order.executeOrder());\n }",
"void appliquerBrouillard();",
"public static void main(String[] args) {\n EosApi api = EosApiFactory.create(\"https://api.jungle.alohaeos.com\");\n //EosApi api = EosApiFactory.create(\"https://jungle.cryptolions.io\");\n //EosApi api = EosApiFactory.create(\"https://eos.newdex.one\");\n //System.out.println(api.getChainInfo());\n //buyRam(api, \"5K3iYbkjpvZxxAJyHQVAtJmCi4CXetBKq3CfcboMz21Y5Pjvovo\", \"bihuexwallet\", \"bihuexwallet\",15000);\n //delegate(api, \"5KD2hyi84H46ND8citJr6L84mYegnX1UKw9osLnF3qpcjoeRAAn\", \"carilking111\", \"carilking444\",\"1.5000 EOS\",\"1.5000 EOS\");\n //updateAuth(api,\"5JhoFQMN9xWGMFfUDJHHPVsuSytSDot8Q5TNv3rN6VVGPbjTrGN\",\"carilking444\",\"EOS82Psyaqk86jbSdSmGzonNCUHsBp1Xj42q37g6UkiA1UhzLe57j\",\"active\");\n //updateAuth(api,\"5JrTcSsUmzoLDxsNFcpGBRt2Wd488qTmHp5yfBPy71MbxaqSJ4g\",\"carilking555\",\"EOS5X6Sbmbc2zaJ8EHNZmdSnA26DsuTim59pdUNiNd34HugzvTp5m\",\"active\");\n //transfer(api,\"5JhoFQMN9xWGMFfUDJHHPVsuSytSDot8Q5TNv3rN6VVGPbjTrGN\", \"carilking444\",\"carilking111\",BigDecimal.valueOf(0.01),\"喵喵喵~\");\n //Object obj=api.getTransaction(new TransactionRequest(\"e5aeee319e8c767cdda35a3b6d460328f958833e58723bc18581765494018700\"));\n //System.out.println(obj);\n List<String> accounts = new ArrayList<>();\n accounts.add(\"carilking111\");\n accounts.add(\"carilking444\");\n //updateMultipleAuth(api, \"5JPNqMSZ8M567hgDGW9CmD9vr2RaDm1eWpJqHaHa2S5xKTMmFKm\", \"heydoojqgege\", 2, accounts, \"active\");\n //proposeTransfer(api, \"5K3iYbkjpvZxxAJyHQVAtJmCi4CXetBKq3CfcboMz21Y5Pjvovo\", \"bihuexwallet\", \"firstmsig152\", \"heydoojqgege\", \"carilking222\", BigDecimal.valueOf(0.2), \"test1\", accounts);\n //approveTransfer(api,\"5KD2hyi84H46ND8citJr6L84mYegnX1UKw9osLnF3qpcjoeRAAn\",\"carilking111\",\"bihuexwallet\",\"firstmsig151\");\n //execPropose(api,\"5K3iYbkjpvZxxAJyHQVAtJmCi4CXetBKq3CfcboMz21Y5Pjvovo\",\"bihuexwallet\",\"bihuexwallet\",\"firstmsig151\");\n }",
"public static void main(String[] args)\n {\n Card card1 = new Card( 1000 , \"Lynn\" , 5 , 10 );\n //Test 2 calling getName method to return the name of the card.\n Card card2 = new Card( 1001 , \"May\" , 3 , 30 );\n // Test 3 calling getluxury_Rating method to return the luxury_rating of the card. \n Card card3 = new Card( 1002 , \"Nils\" , 10 , 25 );\n //Test 4 calling getNumber_of_Credits method to return the noc of the card. \n Card card4 = new Card( 1003 , \"Olek\" , 2 , 12);\n \n System.out.println(card1.getCard_Id());\n System.out.println(card2.getName());\n System.out.println(card3.getluxury_Rating());\n System.out.println(card4.getNumber_of_Credits());\n // Calling upon setNumber_of_credits method\n System.out.println(card1.toString());\n card1.setNumber_of_credits(5); \n System.out.println(card1.toString());\n // Calling upon setLuxury_Rating method\n System.out.println(card2.toString());\n card2.setLuxury_Rating(10);\n System.out.println(card2.toString());\n // Calling upon setName method\n System.out.println(card3.toString());\n card3.setName(\"Mary\");\n System.out.println(card3.toString());\n // calling upon setcard_ID method \n System.out.println(card4.toString());\n card4.setcard_ID(1004);\n System.out.println(card4.toString());\n \n \n \n }",
"public void run() {\n try {\n Class pcscterminal\n = Class.forName(\"sun.security.smartcardio.PCSCTerminals\");\n Field contextId = pcscterminal.getDeclaredField(\"contextId\");\n contextId.setAccessible(true);\n\n if (contextId.getLong(pcscterminal) != 0L) {\n Class pcsc\n = Class.forName(\"sun.security.smartcardio.PCSC\");\n\n Method SCardEstablishContext = pcsc.getDeclaredMethod(\n \"SCardEstablishContext\", new Class[]{Integer.TYPE});\n SCardEstablishContext.setAccessible(true);\n\n Field SCARD_SCOPE_USER\n = pcsc.getDeclaredField(\"SCARD_SCOPE_USER\");\n SCARD_SCOPE_USER.setAccessible(true);\n\n long newId = ((Long) SCardEstablishContext.invoke(pcsc, new Object[]{Integer.valueOf(SCARD_SCOPE_USER.getInt(pcsc))})).longValue();\n contextId.setLong(pcscterminal, newId);\n }\n } catch (Exception ex) {\n }\n ///////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n TerminalFactory factory = null;\n List<CardTerminal> terminals = null;\n try {\n factory = TerminalFactory.getDefault();\n\n terminals = factory.terminals().list();\n } catch (Exception ex) { //\n Logger.getLogger(NFC_Test.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n if (factory != null && factory.terminals() != null && terminals\n != null && terminals.size() > 0) {\n try {\n CardTerminal terminal = terminals.get(0);\n\n if (terminal != null) {\n\n System.out.println(terminal);\n if (terminal.isCardPresent()) {\n System.out.println(\"Card|\"+terminal.getName()+\"|\"+terminal.hashCode()+\"|\");\n } else {\n System.out.println(\"No Card\");\n }\n\n } else {\n System.out.println(\"No terminal\");\n }\n\n terminal = null;\n } catch (Exception e) {\n Logger.getLogger(NFC_Test.class.getName()).log(Level.SEVERE, null, e);\n }\n factory = null;\n\n terminals = null;\n\n Runtime.getRuntime().gc();\n\n } else {\n System.out.println(\"No terminal\");\n }\n\n }",
"public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Card createCard();",
"public static void main(String[] args) {\n Factory factory=new IDCArdFactory();\n Product card1=factory.create(\"小明\");\n Product card2=factory.create(\"小红\");\n Product card3=factory.create(\"小绿\");\n card1.use();\n card2.use();\n card3.use();\n\n }",
"Card dealOneCard();",
"@Test\n public void bookHotelTest() throws BookHotelFault, DatatypeConfigurationException{\n // Booking of an hotel that doesn't require credit card \n BookHotelInputType input = CreateBookHotelInputType(\"booking_Hotel_4\", \"Tick Joachim\", \"50408824\", 2, 11);\n boolean result = bookHotel(input);\n assertEquals(true, result); \n }",
"@Test\n @Order(7)\n void taillardTest() {\n try {\n\n for (int i = 0; i < SearchTestUtil.taillardFilenames.length; i++) {\n System.out.println(\"Run#\" + SearchTestUtil.taillardFilenames[i]);\n assignementProblem.taillardInitializer(SearchTestUtil.taillardFilenames[i]);\n assignementProblem.setNeighborsFunction(NEIGHBORHOOD_TYPE, assignementProblem.getAssignmentData().getLength());\n assignementProblem.setInCombination(Combination.generateRandom(assignementProblem.getAssignmentData().getLength()));\n executeAlgo(SearchTestUtil.ALGO.TABU);\n executeAlgo(SearchTestUtil.ALGO.RECUIT);\n\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private static int zzaz(java.lang.String r5) {\n /*\n int r0 = r5.hashCode()\n r1 = 0\n r2 = 3\n r3 = 2\n r4 = 1\n switch(r0) {\n case -1095064472: goto L_0x002a;\n case 187078296: goto L_0x0020;\n case 1504578661: goto L_0x0016;\n case 1505942594: goto L_0x000c;\n default: goto L_0x000b;\n }\n L_0x000b:\n goto L_0x0034\n L_0x000c:\n java.lang.String r0 = \"audio/vnd.dts.hd\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 3\n goto L_0x0035\n L_0x0016:\n java.lang.String r0 = \"audio/eac3\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 1\n goto L_0x0035\n L_0x0020:\n java.lang.String r0 = \"audio/ac3\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 0\n goto L_0x0035\n L_0x002a:\n java.lang.String r0 = \"audio/vnd.dts\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 2\n goto L_0x0035\n L_0x0034:\n r5 = -1\n L_0x0035:\n if (r5 == 0) goto L_0x0045\n if (r5 == r4) goto L_0x0043\n if (r5 == r3) goto L_0x0041\n if (r5 == r2) goto L_0x003e\n return r1\n L_0x003e:\n r5 = 8\n return r5\n L_0x0041:\n r5 = 7\n return r5\n L_0x0043:\n r5 = 6\n return r5\n L_0x0045:\n r5 = 5\n return r5\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.zzio.zzaz(java.lang.String):int\");\n }",
"@Test\n public void testCrediCard() {\n PaymentInstrument instrument = new PaymentInstrument();\n instrument.setCardNumber(\"5424000000000015\");\n instrument.setCvv(\"999\");\n instrument.setMonth(\"12\");\n instrument.setYear(\"17\");\n\n PaymentGatewayRequest gatewayRequest = new PaymentGatewayRequest(\"Bying Test prodocut\", 6, instrument,300.00);\n gatewayRequest.setCustomerId(\"1419278590612\");\n gatewayRequest.setInvoiceNumber(\"INV0001\");\n gatewayRequest.setRefId(\"IN00021\");\n PaymentGatewayResponse process = authorizedNetGateway.process(gatewayRequest);\n\n LOG.debug(\"Response returend is \" + process);\n Assert.assertTrue(process.isSuccess());\n\n }",
"@Test \n public void bookHotelTestWithCreditCard() throws BookHotelFault, DatatypeConfigurationException{\n try{\n BookHotelInputType input = CreateBookHotelInputType(\"booking_Hotel_2\", \"Thor-Jensen Claus\", \"50408825\", 5, 9);\n boolean result = bookHotel(input);\n assertEquals(true, result); \n } catch(BookHotelFault e){\n System.out.println(e.getMessage());\n fail();\n }\n }",
"@Override\n\t\tpublic void action() {\n\t\t\tMessageTemplate mt = MessageTemplate.MatchPerformative(ACLMessage.REQUEST); \n\t\t\tACLMessage msg = receive(mt);\n\t\t\tif(msg != null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tContentElement ce = null;\n\t\t\t\t\tSystem.out.println(msg.getContent()); //print out the message content in SL\n\n\t\t\t\t\t// Let JADE convert from String to Java objects\n\t\t\t\t\t// Output will be a ContentElement\n\t\t\t\t\tce = getContentManager().extractContent(msg);\n\t\t\t\t\tSystem.out.println(ce);\n\t\t\t\t\tif(ce instanceof Action) {\n\t\t\t\t\t\tConcept action = ((Action)ce).getAction();\n\t\t\t\t\t\tif (action instanceof SupplierOrder) {\n\t\t\t\t\t\t\tSupplierOrder order = (SupplierOrder)action;\n\t\t\t\t\t\t\t//CustomerOrder cust = order.getItem();\n\t\t\t\t\t\t\t//OrderQuantity = order.getQuantity();\n\t\t\t\t\t\t\tif(!order.isFinishOrder()) {\n\t\t\t\t\t\t\tSystem.out.println(\"exp test: \" + order.getQuantity());\n\t\t\t\t\t\t\trecievedOrders.add(order);}\n\t\t\t\t\t\t\telse {orderReciever = true;}\n\t\t\t\t\t\t\t//Item it = order.getItem();\n\t\t\t\t\t\t\t// Extract the CD name and print it to demonstrate use of the ontology\n\t\t\t\t\t\t\t//if(it instanceof CD){\n\t\t\t\t\t\t\t\t//CD cd = (CD)it;\n\t\t\t\t\t\t\t\t//check if seller has it in stock\n\t\t\t\t\t\t\t\t//if(itemsForSale.containsKey(cd.getSerialNumber())) {\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Selling CD \" + cd.getName());\n\t\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t\t\t//else {\n\t\t\t\t\t\t\t\t\t//System.out.println(\"You tried to order something out of stock!!!! Check first!\");\n\t\t\t\t\t\t\t\t//}\n\n\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t}\n\t\t\t\t\t//deal with bool set here\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcatch (CodecException ce) {\n\t\t\t\t\tce.printStackTrace();\n\t\t\t\t}\n\t\t\t\tcatch (OntologyException oe) {\n\t\t\t\t\toe.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tblock();\n\t\t\t}\n\t\t}",
"public static void main(String[] args) {\n System.out.println(\"\\n--------\\nLibCard Class\\n--------\\n\");\n\n /* Create Object card1 of LibCard Class */\n LibCard card1;\n card1 = new LibCard();\n\n System.out.println(\"Card ID: \" + card1.getId());\n System.out.println(\"Card Expiration Date: \" + card1.getExpiry_date());\n System.out.println(\"Card Valid: \" + card1.isValid());\n\n /* change Validity to false */\n System.out.println(\"\\n*block card*\\n\");\n card1.setValid(false);\n System.out.println(\"Valid: \" + card1.isValid());\n\n /* change Validity to true */\n System.out.println(\"\\n*unblock card*\\n\");\n card1.setValid(true);\n System.out.println(\"Valid: \" + card1.isValid());\n\n /* Testing BorrowConditions Class*/\n System.out.println(\"\\n--------\\nBorrowCondition Class\\n--------\\n\");\n\n System.out.println(\"Borrow Time: \" + BorrowCondition.getBorrow_time());\n System.out.println(\"Expiry Fee: \" + BorrowCondition.getExpiry_fee());\n System.out.println(\"Maximum Fee: \" + BorrowCondition.getMax_fee());\n System.out.println(\"Maximum Renewal Time: \" + BorrowCondition.getMax_renewal());\n\n /* Test LibUser Class */\n System.out.println(\"\\n--------\\nLibUser Class\\n--------\\n\");\n\n /* Create object user1 of LibUser Class */\n LibUser user1;\n user1 = new LibUser(\"Max Schwab\");\n\n System.out.println(\"User ID: \" + user1.getId());\n System.out.println(\"User Name: \" + user1.getName());\n System.out.println(\"Fee State: \" + user1.getFeeState());\n\n /* Print out LibCard of user */\n System.out.println(\"\\n--------\\nLibCard of LibUser\\n--------\\n\");\n\n System.out.println(\"User Card ID: \" + user1.getCard().getId());\n System.out.println(\"User Card Expiration: \" + user1.getCard().getExpiry_date());\n System.out.println(\"User Card Valid: \" + user1.getCard().isValid());\n\n /* Extend Card & Lock Card */\n user1.getCard().extend();\n user1.getCard().setValid(false);\n\n System.out.println(\"\\n*Extend Card Expiration Date*\\n*locks card*\\n\");\n System.out.println(\"User Card ID: \" + user1.getCard().getId());\n System.out.println(\"User Card Expiration Extended: \" + user1.getCard().getExpiry_date());\n System.out.println(\"User Card Valid: \" + user1.getCard().isValid());\n\n\n /* Test Book Class */\n //System.out.println(\"\\n--------\\nBook Class\");\n\n /* Render GUI window for creating new LibCard\n * Unimportant for now */\n //createLibCard.renderCreateLibCard();\n }",
"@Test\n public void checkBook() throws Exception {\n SmartPlayer x = new SmartPlayer(0,0);\n x.setCards(3,4);\n boolean gotBook = x.checkBook();\n assertTrue(gotBook);\n }",
"void buyDevCard();",
"@Override\n\tpublic void challenge10() {\n\n\t}",
"@Test\n public void receiveCard() throws Exception {\n SmartPlayer x = new SmartPlayer(0, 0);\n x.receiveCard(4, 4);\n assertTrue(x.getCards().get(4) == 4);\n }",
"public void snare();",
"public static void main(String[] args) {\n\n\t\tString peopleAndPets = \"C:/people+pets.owl\"; \n\n\t\tString ip = \"localhost\";\n\t\tint port = 8088;\n\n\t\tRacerClient racer = new RacerClient(ip,port);\t\t\n\n\t\ttry {\n\n\t\t\tracer.openConnection();\n\n\t\t\tracer.loggingOn();\n\t\t\tracer.sendRaw(\"(logging-on)\");\n\n\t\t\tracer.fullReset();\n\n\t\t\tracer.owlReadFile(\"\\\"\"+peopleAndPets+\"\\\"\"); \n\n\t\t\tSystem.out.println(racer.taxonomy()); \n\t\t\tSystem.out.println(racer.taxonomy$()); \n\n\t\t\tRacerList<RacerList>\n\t\t\tres1 = (RacerList<RacerList>)\n\t\t\tracer.taxonomy$(); \n\n\t\t\tfor (RacerList triple : res1) {\n\t\t\t\tSystem.out.println(\"--------\"); \n\t\t\t\tSystem.out.println(\"Concept : \"+triple.getValue().get(0)); \n\t\t\t\tSystem.out.println(\"Parents : \"+triple.getValue().get(1)); \n\t\t\t\tSystem.out.println(\"Children: \"+triple.getValue().get(2)); \n\t\t\t} \n\n\t\t\tSystem.out.println(racer.currentAbox()); \n\t\t\tSystem.out.println(racer.currentAbox$()); \n\n\t\t\tracer.instanceM(\"i\",\"C\"); \n\n\t\t\tSystem.out.println(racer.aboxConsistentP()); \n\t\t\tSystem.out.println(racer.aboxConsistentP(racer.currentAbox())); \n\t\t\tSystem.out.println(racer.aboxConsistentMP(racer.currentAbox())); \n\t\t\tSystem.out.println(racer.aboxConsistentP(racer.currentAbox$())); \n\t\t\tSystem.out.println(racer.aboxConsistentMP(racer.currentAbox$())); \n\n\t\t\tSystem.out.println(racer.racerAnswerQuery(\"(?x ?y)\",\n\t\t\t\t\t\"(and (?x #!:person) (?x ?y #!:has_pet))\")); \n\n\t\t\tRacerList<RacerList<RacerList<RacerSymbol>>>\n\t\t\tres2 = (RacerList<RacerList<RacerList<RacerSymbol>>>)\n\t\t\tracer.racerAnswerQuery$(\"(?x ?y)\",\"(and (?x #!:person) (?x ?y #!:has_pet))\"); \n\n\t\t\tfor (RacerList<RacerList<RacerSymbol>> bindings : res2) {\n\t\t\t\tfor (RacerList<RacerSymbol> binding : bindings) {\n\t\t\t\t\tfor (RacerSymbol varval : binding) {\n\t\t\t\t\t\tSystem.out.println(varval);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\n\n\t\t\tSystem.out.println(racer.retrieveM$(\"(?x ?y)\",\n\t\t\t\t\t\"(and (?x #!:person) (?x ?y #!:has_pet))\")); \n\n\t\t\tRacerList<RacerList<RacerList<RacerSymbol>>>\n\t\t\tres2b = (RacerList<RacerList<RacerList<RacerSymbol>>>)\n\t\t\tracer.racerAnswerQuery$(\"(?x ?y)\",\"(and (?x #!:person) (?x ?y #!:has_pet))\"); \n\n\t\t\tfor (RacerList<RacerList<RacerSymbol>> bindings : res2b) {\n\t\t\t\tfor (RacerList<RacerSymbol> binding : bindings) {\n\t\t\t\t\tfor (RacerSymbol varval : binding) {\n\t\t\t\t\t\tSystem.out.println(varval);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(racer.describeAllQueries()); \n\t\t\tSystem.out.println(racer.describeAllQueries(true)); \n\t\t\tSystem.out.println(racer.describeAllQueries(false)); \n\t\t\tSystem.out.println(racer.describeAllQueries$(true)); \n\t\t\tSystem.out.println(racer.describeAllQueries$(\"nil\")); \n\t\t\tSystem.out.println(racer.describeAllQueries$(\"t\")); \n\t\t\tSystem.out.println(racer.describeAllQueries$(new RacerSymbol(\"nil\"))); \n\t\t\tSystem.out.println(racer.describeAllQueries$(new RacerSymbol(\"t\"))); \n\t\t\tSystem.out.println(racer.describeAllQueries(new RacerSymbol(\"nil\"))); \n\t\t\tSystem.out.println(racer.describeAllQueries(new RacerSymbol(\"t\"))); \n\n\t\t\tRacerList res3 = (RacerList)\n\t\t\t\t\tracer.racerAnswerQuery$(\"(?x)\",\n\t\t\t\t\t\t\t\"(?x #!:person)\",\n\t\t\t\t\t\t\t\":how-many\",3,\n\t\t\t\t\t\t\t\":exclude-permutations\",true);\n\n\t\t\tSystem.out.println(res3); \n\n\t\t\tString res4 = \n\t\t\t\t\tracer.racerAnswerQuery(\"(?x)\",\n\t\t\t\t\t\t\t\"(?x #!:person)\",\n\t\t\t\t\t\t\t\":how-many\",3,\n\t\t\t\t\t\t\t\":exclude-permutations\",true);\n\n\t\t\tSystem.out.println(res4); \n\n\t\t\tRacerList<RacerList<RacerResult>>\n\t\t\tres5 = (RacerList<RacerList<RacerResult>>)\n\t\t\tracer.allConceptAssertions$(); \n\n\t\t\tfor (RacerList<RacerResult> ass : res5) {\n\t\t\t\tSystem.out.println(\"-----------\");\n\t\t\t\tSystem.out.println(\"Individual: \"+ass.getValue().get(0)); \n\t\t\t\tSystem.out.println(\"Concept : \"+ass.getValue().get(1)+\" of \"+ass.getValue().get(1).getClass()); \n\n\t\t\t}\n\n\t\t\tRacerList<RacerList<RacerResult>>\n\t\t\tres6 = (RacerList<RacerList<RacerResult>>)\n\t\t\tracer.allAnnotationConceptAssertions$(); \n\n\t\t\tfor (RacerList<RacerResult> ass : res6) {\n\t\t\t\tSystem.out.println(\"-----------\");\n\t\t\t\tSystem.out.println(\"Individual: \"+ass.getValue().get(0)); \n\t\t\t\tSystem.out.println(\"Concept : \"+ass.getValue().get(1)+\" of \"+ass.getValue().get(1).getClass()); \n\n\t\t\t}\n\n\t\t\tracer.withUniqueNameAssumption(); \n\n\t\t\tracer.aboxConsistentP(); \n\n\t\t\tracer.withNrqlSettings(\":how-many-tuples\",1); \n\t\t\tSystem.out.println(racer.racerAnswerQuery$(\"(?x)\",\"(?x #!:person)\")); \n\n\t\t\tracer.endWithNrqlSettings(); \n\n\t\t\tSystem.out.println(racer.racerAnswerQuery$(\"(?x)\",\"(?x #!:person)\")); \n\n\t\t\tRacerList<RacerSymbol> head = new RacerList();\n\t\t\thead.getValue().add(new RacerSymbol(\"?x\")); \n\t\t\tRacerList body = (RacerList)racer.parseRacerAnswer(\"(?x #!:person)\"); \n\t\t\tSystem.out.println(racer.racerAnswerQuery$(head,body)); \n\t\t\tracer.endWithUniqueNameAssumption(); \n\n\t\t\tSystem.out.println(racer.racerAnswerQuery(head,body)); \n\n\t\t\t// sometimes, type casts and dynamic type checks can't be avoided: \n\n\t\t\tfor(String concept : new String[] {\"top\",\"#!:person\",\"#!:mad_cow\",\"bottom\"}) {\n\n\t\t\t\tSystem.out.println(); \n\t\t\t\tSystem.out.println(\"Retrieving instances of \"+concept+\":\"); \n\n\t\t\t\tRacerResult \n\t\t\t\tres7 = (RacerResult)\n\t\t\t\tracer.conceptInstancesM$(concept); \n\n\t\t\t\tif (res7 instanceof RacerSymbol) { // no instances? nil can't be cast in a RacerList!\n\t\t\t\t\tSystem.out.println(\"No instances!\"); \n\t\t\t\t} else {\n\t\t\t\t\tfor (RacerSymbol ind : (RacerList<RacerSymbol>) res7) {\n\t\t\t\t\t\tSystem.out.println(ind); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(racer.evaluateM$(\"(+ 1 2)\")); \n\n\t\t\tracer.mirror(\"\\\"http://www.people+pets.owl/people+pets.owl\\\"\",\"\\\"file://\"+peopleAndPets+\"\\\"\");\n\n\t\t\tracer.owlReadDocument(\"\\\"http://www.people+pets.owl/people+pets.owl\\\"\");\n\n\t\t\tracer.fullReset();\n\n\t\t\tracer.mirror(racer.RacerStringArgument(\"http://www.people+pets.owl/people+pets.owl\"),\n\t\t\t\t\tracer.RacerStringArgument(\"file://\"+peopleAndPets));\n\n\t\t\tracer.owlReadDocument(racer.RacerStringArgument(\"http://www.people+pets.owl/people+pets.owl\"));\n\n\t\t\tSystem.out.println(racer.describeAbox(racer.currentAbox())); \n\n\t\t\tSystem.out.println(racer.describeAbox(racer.RacerSymbolArgument(\"file://\"+peopleAndPets))); \n\n\t\t\tSystem.out.println(racer.racerAnswerQuery(\n\t\t\t\t\t\"(?x ?y)\",\n\t\t\t\t\t\"(and (?x #!:person) (?x ?y #!:has_pet))\")); \n\n\t\t\tSystem.out.println(racer.describeQuery(racer.RacerSymbolArgument(\":last\"),racer.RacerBooleanArgument(true)));\n\n\t\t\t// System.out.println(racer.exitServer());\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t}",
"@Test\n public void testDeck() {\n System.out.println(\"getCards\");\n assertTrue(instance.getSize() == deckSize);\n\n System.out.println(\"getUsedCards\");\n assertTrue(instance.getUsedPileSize() == ditchCount);\n\n System.out.println(\"ditch\");\n Class<? extends ICardType> type = DefaultType2.class;\n IMarauroaCard ditchedCard = (IMarauroaCard) instance.ditch(RPDeck.PAGES, type);\n assertTrue(ditchedCard == null || ditchedCard instanceof DefaultType2);\n cardDitched();\n assertTrue(instance.getUsedPileSize() == ditchCount);\n assertTrue(instance.getSize() == deckSize);\n updateInterfaceIndex();\n\n System.out.println(\"ditchBottom\");\n IMarauroaCard toDitch = (IMarauroaCard) instance.getCards().get(instance.getCards().size() - 1);\n assertEquals(toDitch, instance.ditchBottom());\n cardDitched();\n assertEquals(ditchCount, instance.getUsedPileSize());\n\n System.out.println(\"ditch\");\n int ditch = 2;\n List<ICard> ditched = instance.ditch(RPDeck.PAGES, ditch, false);\n cardDitched(ditch);\n assertTrue(ditched.size() == ditch);\n\n System.out.println(\"ditch\");\n ditch = 5;\n List result = instance.ditch(RPDeck.PAGES, ditch);\n cardDitched(ditch);\n assertTrue(result.size() == ditch);\n\n System.out.println(\"ditch\");\n toDitch = (IMarauroaCard) instance.getCards().get(0);\n card = (IMarauroaCard) instance.ditch(RPDeck.PAGES, false);\n cardDitched();\n assertEquals(ditchCount, instance.getUsedPileSize());\n assertEquals(toDitch, card);\n\n System.out.println(\"ditch\");\n toDitch = (IMarauroaCard) instance.getCards().get(0);\n card = (IMarauroaCard) instance.ditch(RPDeck.PAGES);\n cardDitched();\n assertEquals(ditchCount, instance.getUsedPileSize());\n assertEquals(toDitch, card);\n\n System.out.println(\"draw\");\n updateInterfaceIndex();\n toDitch = (IMarauroaCard) instance.getCards().get(interfaceIndex);\n card = (IMarauroaCard) instance.draw(DefaultType2.class);\n assertEquals(toDitch, card);\n updateInterfaceIndex();\n interfaceCounter--;\n cardDrawn();\n assertEquals(ditchCount, instance.getUsedPileSize());\n\n System.out.println(\"draw\");\n IMarauroaCard toDraw = (IMarauroaCard) instance.getCards().get(0);\n card = (IMarauroaCard) instance.draw();\n assertEquals(toDraw, card);\n cardDrawn();\n assertEquals(ditchCount, instance.getUsedPileSize());\n\n System.out.println(\"draw\");\n toDraw = (IMarauroaCard) instance.getCards().get(0);\n card = (IMarauroaCard) instance.draw(false);\n assertEquals(toDraw, card);\n cardDrawn();\n assertEquals(ditchCount, instance.getUsedPileSize());\n\n System.out.println(\"drawBottom\");\n toDraw = (IMarauroaCard) instance.getCards().get(instance.getSize() - 1);\n card = (IMarauroaCard) instance.drawBottom();\n assertEquals(toDraw, card);\n cardDrawn();\n assertEquals(ditchCount, instance.getUsedPileSize());\n\n System.out.println(\"draw\");\n int draw = 5;\n list = instance.draw(draw, false);\n assertTrue(result.size() == draw);\n cardDrawn(draw);\n\n System.out.println(\"draw\");\n draw = 5;\n list = instance.draw(draw);\n cardDrawn(draw);\n assertTrue(result.size() == draw);\n\n System.out.println(\"getSize\");\n assertEquals(deckSize, instance.getSize());\n\n System.out.println(\"getUsedPileSize\");\n assertEquals(ditchCount, instance.getUsedPileSize());\n\n System.out.println(\"shuffle\");\n ArrayList<ICard> current = (ArrayList<ICard>) instance.getCards();\n instance.shuffle();\n assertTrue(current.size() == instance.getCards().size());\n updateInterfaceIndex();\n }",
"@Override\r\n\tpublic void buyCard() {\n\t\t\r\n\t}",
"private Card aiRequestLogic()\n {\n Random randomCard = new Random(); // A placeholder is set aside for generating a random integer.\n return hand.get(randomCard.nextInt(hand.size())); // A card at a randomized index will be returned.\n }",
"public void processStandardECard(ErgebnisLOSCard card) {\n\t\tswitch(card.getId()) {\n\t\tcase 1:\n\t\t\tcurrent.raiseScore(20);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tcurrent.raiseScore(10);\n\t\t\tgetLeftNeighbor().raiseScore(20);\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\traiseScoreOfEveryPlayer(10);\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tcurrent.raiseScore(10);\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tcurrent.raiseScore(30);\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tcurrent.raiseScore(20);\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\tgetLeftNeighbor().raiseScore(10);\n\t\t\tgetRightNeigbour().raiseScore(10);\n\t\t\tbreak;\n\t\tcase (12):\n\t\tcase (13):\n\t\tcase (14):\n\t\t\tcurrent.raiseScore(10);\n\t\t\tbreak;\n\t\tcase (15):\n\t\tcase (16):\n\t\tcase (17):\n\t\t\tbreak;\n\t\tcase (18):\n\t\t\tcurrent.raiseScore(30);\n\t\t\tbreak;\n\t\tcase (19):\n\t\t\tcurrent.raiseScore(20);\n\t\t\tbreak;\n\t\tcase (20):\n\t\t\tcurrent.raiseScore(50);\n\t\t\tbreak;\n\t\tcase (21):\n\t\t\tgetRightNeigbour().lowerScore(50);\n\t\t\tcurrent.raiseScore(50);\n\t\t\tbreak;\n\t\tcase (22):\n\t\t\tcurrent.raiseScore(20);\n\t\t\tbreak;\n\t\tcase (23):\n\t\t\tbreak;\n\t\tcase (25):\n\t\t\tcurrent.raiseScore(20);\n\t\t\tbreak;\n\t\tcase (26):\n\t\tcase (27):\n\t\tcase (28):\n\t\tcase (29):\n\t\tcase (30):\n\t\tcase (31):\n\t\t\tcurrent.raiseScore(10);\n\t\tcase (32):\n\t\t\tcurrent.raiseScore(30);\n\t\tcase (33):\n\t\t\tcurrent.raiseScore(20);\n\t\tcase (34):\n\t\t\tcurrent.raiseScore(20);\n\t\t\tgetRightNeigbour().raiseScore(10);\n\t\tcase (35):\n\t\t\tcurrent.raiseScore(20);\n\t\tcase (36):{\n\t\t\tif(!projectsAvailable.isEmpty()) {\n\t\t\t\topenUpProject(drawProject());\t\t\t\t\n\t\t\t}\n\t\t\telse current.raiseScore(30);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase (37):\n\t\t\tcurrent.raiseScore(20);\n\t\t\tbreak;\n\t\tcase (38):\n\t\t\tcurrent.raiseScore(10);\n\t\t\tbreak;\n\t\tcase (39):\n\t\t\tcurrent.raiseScore(10);\n\t\t\traiseScoreSecondRightNeighbor(10);\n\t\t\tbreak;\n\t\tcase (40):\n\t\t\tcurrent.raiseScore(20);\n\t\t\tbreak;\n\t\tcase (41):\n\t\t\tcurrent.raiseScore(10);\n\t\t\tbreak;\n\t\tcase (43):\n\t\t\tcurrent.lowerScore(20);\n\t\t\tgetRightNeigbour().raiseScore(20);\n\t\t\tbreak;\n\t\tcase (44):\n\t\tcase (45):\n\t\t\tcurrent.raiseScore(20);\n\t\t\tbreak;\n\t\tcase (46):\n\t\t\traiseScoreOfEveryPlayer(10);\n\t\t\tbreak;\n\t\tcase (48):\n\t\t\tcurrent.raiseScore(20);\n\t\tcase (50):\n\t\t\tbreak;\n\t\tcase (52):\n\t\t\tcurrent.raiseScore(20);\n\t\t\tbreak;\n\t\tcase (54):\n\t\t\tcurrent.raiseScore(50);\n\t\t\tbreak;\n\t\tcase (55):\n\t\t\tcurrent.raiseScore(10);\n\t\t\tbreak;\n\t\t}\n\t}",
"@Test\r\n public void testCreateNoSpaceReceipt_givenACar_thenGiveANoSpaceReceipt() {\r\n Car mockCar = mock(Car.class);\r\n ParkingLot mockParkingLot = mock(ParkingLot.class);\r\n InOrderParkingStrategy inOrderParkingStrategy = new InOrderParkingStrategy();\r\n when(mockParkingLot.isFull()).thenReturn(true);\r\n when(mockCar.getName()).thenReturn(\"A888888\");\r\n Receipt receipt = inOrderParkingStrategy.park(Collections.singletonList(mockParkingLot),mockCar);\r\n Assert.assertEquals(ParkingStrategy.NO_PARKING_LOT,receipt.getParkingLotName());\r\n Assert.assertEquals(\"A888888\",receipt.getCarName());\r\n }",
"public static void main(String[] args) {\n\t\tjava.util.Scanner stdin = new java.util.Scanner(System.in);\n\t\tSystem.out.println(\"Enter the credit card number: \");\n\t\tString creditCard = stdin.next();\n\n\t\t// First check that the card has a known prefix and a valid length for that prefix\n\t\tboolean validLength = true;\n\t\tString cardType = null;\n\t\tif (creditCard.startsWith(\"34\") || creditCard.startsWith(\"37\")) {\n\t\t\t// American Express\n\t\t\tvalidLength = (creditCard.length() == 15);\n\t\t\tcardType = \"American Express\";\n\t\t} else if (creditCard.startsWith(\"4\")) {\n\t\t\t// Visa\n\t\t\tvalidLength = (creditCard.length() == 13 || creditCard.length() == 16 || creditCard.length() == 19);\n\t\t\tcardType = \"Visa\";\n\t\t} else if (creditCard.startsWith(\"5\")) {\n\t\t\t// MasterCard \n\t\t\tint prefix = Integer.valueOf(creditCard.substring(0, 2));\n\t\t\tif (prefix >= 51 && prefix <= 55) {\n\t\t\t\tvalidLength = (creditCard.length() == 16);\n\t\t\t\tcardType = \"MasterCard\";\n\t\t\t}\n\t\t}\n\n\t\t// If card type is unknown, exit with no further checks\n\t\tif (cardType == null) {\n\t\t\tSystem.out.println(\"Unknown card type\");\n\t\t\tSystem.exit(0);\n\t\t} \n\t\t\n\t\t// Known card type -- print it out and check length\n\t\tSystem.out.println(\"Card type: \" + cardType);\n\t\tif (!validLength) {\n\t\t\tSystem.out.println(\"Invalid length\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\n\t\t\n\t\tstdin.close();\n\t}",
"public abstract boolean mo9234ar();",
"public static void main(String[] args) throws UnexpectedException, OperationNotPermittedException, SizeHandleException {\n\t\tQReg register = new QReg(new BigInteger(\"0\"), 4);\n\t\t// see the content of register, in this case 0011\n\t\tSystem.out.println(register);\n\n\t\t// Create a gate hadamard gate for see more gates see EGateTypes enumaration\n\t\tIGate hadamard = GateFactory.getInstance().getGate(EGateTypes.HADAMARDGATE);\n\n\t\t// Apply the gate calling the method \"apply\" and the proper parameters.\n\t\thadamard.apply(register, 0);\n\n\t\t// see the content of register, in this case the result of hadamard and puting the 0 bit in superposition\n\t\tSystem.out.println(register);\n\n\t}",
"@Test\n public void CardRequirement2() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(1);\n\n LeaderCard l3 = new LeaderCard(4,\n new CardRequirements(Map.of(Color.YELLOW, new ReqValue(1, 2))),\n new Production(Resource.SHIELD));\n ArrayList<LeaderCard> cards = new ArrayList<>();\n cards.add(l1);\n cards.add(l3);\n p.associateLeaderCards(cards);\n DevelopmentCard card1 = new DevelopmentCard(1, Color.GREEN, 0, null, null);\n DevelopmentCard card2 = new DevelopmentCard(2, Color.YELLOW, 0, null, null);\n p.getDevelopmentSlot().addCard(card1, 1);\n p.getDevelopmentSlot().addCard(card2, 1);\n c.emptyQueue();\n\n assertTrue(am.activateLeaderCard(p, message));\n\n assertTrue(l3.isEnabled());\n\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_NOTIFICATION).count());\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_UPD_Player).count());\n assertEquals(2, c.messages.size());\n }",
"@Test\r\n public void testGetSpecificCard() {\r\n Deck instance = new Deck();\r\n System.out.println(\"Testing getSpecificCard\");\r\n Card result = instance.getSpecificCard(51);\r\n System.out.println('\\t' + \"Card toString: \" + result.toString());\r\n assertNotNull(result);\r\n }",
"@Override\r\n\t\tpublic void action() {\n MessageTemplate mt = MessageTemplate.MatchPerformative(ACLMessage.ACCEPT_PROPOSAL);\r\n MessageTemplate mt2 = MessageTemplate.MatchPerformative(ACLMessage.PROPOSE);\r\n ACLMessage msg = myAgent.receive(mt);\r\n //If it is a ACCEPT_PROPOSAL, the seller sell the book to the buyer (execpt if the book if not here anymore)\r\n if (msg != null) {\r\n // ACCEPT_PROPOSAL Message received. Process it\r\n title = msg.getContent();\r\n ACLMessage reply = msg.createReply();\r\n\r\n Integer price = (Integer) catalogue.remove(title);\r\n if (price != null) {\r\n reply.setPerformative(ACLMessage.INFORM);\r\n reply.setContent(String.valueOf(price));\r\n System.out.println(title+\" sold to agent \"+msg.getSender().getName());\r\n }\r\n else {\r\n // The requested book has been sold to another buyer in the meanwhile .\r\n reply.setPerformative(ACLMessage.FAILURE);\r\n reply.setContent(\"not-available\");\r\n }\r\n myAgent.send(reply);\r\n }\r\n //If it is a new PROPOSE, the buyer is trying to negociate.\r\n else {\r\n ACLMessage msg2 = myAgent.receive(mt2);\r\n if(msg2 != null){\r\n ACLMessage reply = msg2.createReply();\r\n //If the price of the buyer is OK for the seller according to his tolerance, the transaction is made\r\n if(((Integer) catalogue.get(title) - Integer.parseInt(msg2.getContent())) <= tolerance){\r\n System.out.println(myAgent.getLocalName() + \" say : OK, let's make a deal\");\r\n updateCatalogue(title, Integer.parseInt(msg2.getContent()));\r\n reply.setPerformative(ACLMessage.INFORM);\r\n reply.setContent(msg2.getContent());\r\n }\r\n //Else, the seller accept to negociate, he up his tolerance and ask the buyer to up his real price\r\n else{\r\n //Send a REQUEST Message to negociate with the buyer\r\n reply.setPerformative(ACLMessage.REQUEST);\r\n //Up the tolerance by *change*\r\n tolerance += change;\r\n reply.setContent(String.valueOf(change));\r\n System.out.println(myAgent.getLocalName() + \" say : Let's up your real price while I up my tolerance (\" + ((Integer) catalogue.get(title) - Integer.parseInt(msg2.getContent())) + \" < \" + tolerance + \")\");\r\n }\r\n myAgent.send(reply);\r\n }\r\n else{\r\n block();\r\n }\r\n }\r\n\t\t}",
"public interface CreditCardStore\r\n{\r\n /**\r\n * This method should add the credit card number to the store given a pass key.\r\n *\r\n * @param cc The credit card number.\r\n * @param key The pass key.\r\n * @throws CreditCardAPIException if an error occurs.\r\n */\r\n public void addCc(String cc, String key) throws CreditCardAPIException;\r\n \r\n /**\r\n * This method should edit the credit card number in the store given a pass key.\r\n *\r\n * @param cc The credit card number.\r\n * @param key The pass key.\r\n * @throws CreditCardAPIException if an error occurs.\r\n */\r\n public void editCc(String cc, String key) throws CreditCardAPIException;\r\n \r\n /**\r\n * This method should delete the credit card number to the store given a pass key.\r\n *\r\n * @param cc The credit card number.\r\n * @param key The pass key.\r\n * @throws CreditCardAPIException if an error occurs.\r\n */\r\n public void deleteCc(String cc, String key) throws CreditCardAPIException;\r\n \r\n /**\r\n * This method should return the credit card number from the store given a pass key.\r\n *\r\n * @param key The pass key.\r\n * @return String\r\n * @throws CreditCardAPIException if an error occurs.\r\n */\r\n public String getCc(String key) throws CreditCardAPIException;\r\n}",
"@Test\n public void CardRequirement1() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(1);\n DevelopmentCard card1 = new DevelopmentCard(1, Color.YELLOW, 0, null, null);\n DevelopmentCard card2 = new DevelopmentCard(2, Color.GREEN, 0, null, null);\n p.getDevelopmentSlot().addCard(card1, 1);\n p.getDevelopmentSlot().addCard(card2, 1);\n c.emptyQueue();\n\n assertTrue(am.activateLeaderCard(p, message));\n\n assertTrue(l2.isEnabled());\n\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_UPD_Player).count());\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_NOTIFICATION).count());\n assertEquals(2, c.messages.size());\n\n }",
"private static void processFlop(String content) {\n\t\tString[] sts = content.split(\" \\n| \");\n\n\t\tcards[2] = new Card();\n\t\tcards[2].setColor(sts[0]);\n\t\tcards[2].setPoint(sts[1]);\n\t\t\n\t\tcards[3] = new Card();\n\t\tcards[3].setColor(sts[2]);\n\t\tcards[3].setPoint(sts[3]);\n\t\t\n\t\tcards[4] = new Card();\n\t\tcards[4].setColor(sts[4]);\n\t\tcards[4].setPoint(sts[5]);\n\t\t\n\t\tCard.numsPlus();\n\t\tCard.numsPlus();\n\t\tCard.numsPlus();\n\t\t\n\t\t\n\n\t\t//之后模拟对手的牌,求胜率\n\t\twinRate = calWinRate5Cards(cards, Player.getNums());\n\t\t\n\t\t\n\t}",
"void parseCardData(ICardContext context);",
"void askDevCardProduction();",
"public void validateRpd9s2()\n {\n // This guideline cannot be automatically tested.\n }",
"private java.util.LinkedList<com.tencent.mm.plugin.game.model.d> aRy() {\n /*\n r8 = this;\n r3 = new java.util.LinkedList;\n r3.<init>();\n r0 = r8.njD;\n r0 = r0.nop;\n if (r0 != 0) goto L_0x000d;\n L_0x000b:\n r0 = r3;\n L_0x000c:\n return r0;\n L_0x000d:\n r0 = r8.nja;\n r1 = r0 + 1;\n r0 = r8.nja;\n r0 = r0 / 15;\n r0 = r0 + 901;\n r2 = r8.njD;\n r2 = r2.nop;\n r5 = r2.iterator();\n r2 = r1;\n r1 = r0;\n L_0x0021:\n r0 = r5.hasNext();\n if (r0 == 0) goto L_0x007a;\n L_0x0027:\n r0 = r5.next();\n r0 = (com.tencent.mm.plugin.game.c.c) r0;\n r4 = 0;\n r6 = r0.kzz;\n switch(r6) {\n case 1: goto L_0x0046;\n case 2: goto L_0x0056;\n default: goto L_0x0033;\n };\n L_0x0033:\n r0 = r1;\n r1 = r2;\n r2 = r4;\n L_0x0036:\n if (r2 == 0) goto L_0x007c;\n L_0x0038:\n r4 = 11;\n r2.scene = r4;\n r4 = 1111; // 0x457 float:1.557E-42 double:5.49E-321;\n r2.fGe = r4;\n r3.add(r2);\n r2 = r1;\n r1 = r0;\n goto L_0x0021;\n L_0x0046:\n r0 = r0.nkO;\n r0 = com.tencent.mm.plugin.game.model.ad.a(r0);\n if (r0 == 0) goto L_0x0083;\n L_0x004e:\n r4 = r2 + 1;\n r0.position = r2;\n r2 = r0;\n r0 = r1;\n r1 = r4;\n goto L_0x0036;\n L_0x0056:\n r6 = r0.nkR;\n if (r6 == 0) goto L_0x0033;\n L_0x005a:\n r4 = r0.nkR;\n r4 = r4.nkO;\n r4 = com.tencent.mm.plugin.game.model.ad.a(r4);\n if (r4 == 0) goto L_0x007f;\n L_0x0064:\n r6 = 1;\n r4.type = r6;\n r6 = r0.nkR;\n r6 = r6.nkQ;\n r4.ngB = r6;\n r0 = r0.nkR;\n r0 = r0.nkP;\n r4.ngC = r0;\n r0 = r1 + 1;\n r4.position = r1;\n r1 = r2;\n r2 = r4;\n goto L_0x0036;\n L_0x007a:\n r0 = r3;\n goto L_0x000c;\n L_0x007c:\n r2 = r1;\n r1 = r0;\n goto L_0x0021;\n L_0x007f:\n r0 = r1;\n r1 = r2;\n r2 = r4;\n goto L_0x0036;\n L_0x0083:\n r7 = r0;\n r0 = r1;\n r1 = r2;\n r2 = r7;\n goto L_0x0036;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.plugin.game.model.al.aRy():java.util.LinkedList<com.tencent.mm.plugin.game.model.d>\");\n }",
"public Card chooseFromHand(String sign , String colorName){\n Scanner scanner = new Scanner(System.in);\n Card chosenCard = null;\n int cardIndex;\n do{\n System.out.println(\"which cart ? (-1 to pick up card from cardDeck) ?\");\n cardIndex =scanner.nextInt();\n// scanner.nextLine();\n if(cardIndex == -1){\n ArrayList<Card> playableCards = playableNormalCards(sign , colorName);\n if(playableCards.size() == 0){\n return null;\n }\n else {\n System.out.println(\"you still can play : \");\n for(Card card : playableCards){\n System.out.print(card + \" \");\n }\n System.out.println();\n }\n }\n else if(cardIndex<=0 ||cardIndex > hand.size()){\n System.out.println(\"not valid input\");\n System.out.println(\"please try again : \");\n }\n else if(hand.get(cardIndex-1).getSign().equals(\"B\")){\n chosenCard = hand.get(cardIndex -1);\n }\n else if((!(hand.get(cardIndex-1).getSign().equals(sign))) &&\n (!(hand.get(cardIndex-1).getColorName().equals(colorName)))){\n System.out.println(\"not playable card\");\n System.out.println(\"please try again : \");\n }\n else{\n chosenCard = hand.get(cardIndex - 1);\n }\n\n }while(cardIndex <= 0 || cardIndex > hand.size() || chosenCard == null);\n\n\n hand.remove(chosenCard);\n return chosenCard;\n }",
"void askBuyDevCards();",
"public int askWhatPoliticCards(List<PoliticCard> cards);",
"public void testGetHand() throws Exception {\r\n// System.out.println(getClass().getSimpleName() + \": getHand\");\r\n//\r\n// HandRank hr = hand.getHandRank();\r\n// Card[] result = hr.getHand();\r\n// System.out.println(hr.getHandType());\r\n// System.out.println(\"hand:\" + Arrays.toString(result));\r\n// Assert.isTrue(hr.getHandType() == HandType.HIGH);\r\n//\r\n// SimpleHandAggregator sha = new SimpleHandAggregator();\r\n// System.out.println(sha.scoreHand(hand));\r\n }",
"@Test\n public void giveCard2() throws Exception {\n SmartPlayer x = new SmartPlayer(0,0);\n int numberOfCardsToGive = x.giveCard(5);\n assertTrue(numberOfCardsToGive == 0);\n }",
"static void checkSignatures() {\n Reader stringReader;\n StringBuffer out;\n FreecellOperations<?> model = FreecellModelCreator.create(\n FreecellModelCreator.GameType.MULTIMOVE);\n\n checkNewModel(\n FreecellModelCreator.create(FreecellModelCreator.GameType\n .MULTIMOVE),\n FreecellModelCreator.create(FreecellModelCreator.GameType.MULTIMOVE)\n .getDeck());\n stringReader = new StringReader(\"C1 8 F1 q\");\n out = new StringBuffer();\n checkNewController(\n FreecellModelCreator.create(FreecellModelCreator.GameType.SINGLEMOVE),\n FreecellModelCreator.create(FreecellModelCreator.GameType.SINGLEMOVE)\n .getDeck(),\n new FreecellController(stringReader, out));\n checkNewController(\n FreecellModelCreator.create(FreecellModelCreator.GameType.MULTIMOVE),\n FreecellModelCreator.create(FreecellModelCreator.GameType.MULTIMOVE)\n .getDeck(),\n new FreecellController(stringReader, out));\n\n }",
"public static void main(String[] args) throws Exception {\n NubankRewards card = new NubankRewards();\n\n card.validate();\n card.collectPayment();\n }",
"@Test\n public void testGiveHand() throws Exception {\n\n Deck giveHand = new Deck();\n giveHand.add(cardB);\n giveHand.add(cardB);\n giveHand.add(cardP);\n playerHuman.addCardToDeck(cardB);\n playerHuman.addCardToDeck(cardB);\n playerHuman.addCardToDeck(cardP);\n playerHuman.giveHand();\n org.junit.Assert.assertEquals(giveHand, playerHuman.getPlayHand());\n }",
"protected CardCommandAPDU() {\n }",
"public final void mo12623a(boolean z) {\n if (mo9140c() != null) {\n C8435g c = new C8435g().mo21597c(\"initiative\");\n if (this.f13394b.getId() == this.f13396d.f11665c) {\n c.mo21594b(this.f13394b.getOwner().getId());\n c.mo21596c(this.f13396d.f11667e);\n } else {\n c.mo21594b(this.f13396d.f11667e);\n c.mo21596c(this.f13394b.getOwner().getId());\n }\n if (this.f13395c && this.f13396d.get(\"data_pk_state\") == PkState.PK) {\n if (LinkCrossRoomDataHolder.m13782a().f11672j > 0 && LinkCrossRoomDataHolder.m13782a().f11680r == 0) {\n c.mo21591a(LinkCrossRoomDataHolder.m13782a().f11669g);\n }\n C8443c a = C8443c.m25663a();\n String str = \"livesdk_pk_end\";\n Object[] objArr = new Object[3];\n objArr[0] = c.mo21597c(z ? \"disconnect\" : \"time_out\").mo21593a(z ? String.valueOf((System.currentTimeMillis() - this.f13396d.f11686x) / 1000) : \"120\");\n objArr[1] = this.f13396d.mo11449b();\n objArr[2] = Room.class;\n a.mo21607a(str, objArr);\n }\n ((C3245ad) ((LinkPKApi) C9178j.m27302j().mo22373b().mo10440a(LinkPKApi.class)).finish(this.f13396d.f11665c, this.f13396d.f11680r, z ? 1 : 0, this.f13396d.f11681s).mo19297a((C7494t<T, ? extends R>) mo13033u())).mo10183a(new C4714gg(this, SystemClock.uptimeMillis(), z), new C4700ft(this, z));\n }\n }",
"@Test\n void testForLargestCardInTrick() {\n Dealer testDealer = new Dealer();\n\n Suit suit1 = Suit.DIAMONDS;\n Suit suit2 = Suit.SPADES;\n Suit suit3 = Suit.SPADES;\n Suit suit4 = Suit.DIAMONDS;\n \n Rank rank1 = Rank.TWO;\n Rank rank2 = Rank.KING;\n Rank rank3 = Rank.ACE;\n Rank rank4 = Rank.FIVE;\n\n Card card1 = new Card(suit1,rank1,false);\n Card card2 = new Card(suit2,rank2,false);\n Card card3 = new Card(suit3,rank3,false);\n Card card4 = new Card(suit4,rank4,false);\n\n \n testDealer.addToPlayedCards(card1);\n testDealer.addToPlayedCards(card2);\n testDealer.addToPlayedCards(card3);\n testDealer.addToPlayedCards(card4);\n\n assertEquals(card4 , testDealer.getLargestCardFromTrick());\n }",
"private void inzsr() {\n\t\tid1Ctdta = 1;\n\t\tstrCtdta = \"Each KGS \";\n\t\tfor (int idxCtdta = 1; idxCtdta <= 1; idxCtdta++) {\n\t\t\tum[idxCtdta] = subString(strCtdta, id1Ctdta, 11);\n\t\t\tid1Ctdta = Integer.valueOf(id1Ctdta + 11);\n\t\t}\n\t\t// Initialise message subfile\n\t\tnmfkpinds.setPgmInd32(true);\n\t\tstateVariable.setZzpgm(replaceStr(stateVariable.getZzpgm(), 1, 8, \"WWCONDET\"));\n\t\t// - Set date\n\t\tstateVariable.setZzdate(getDate().toInt());\n\t\t// -\n\t\t// - CONTRACT\n\t\tcontractHeader.retrieve(stateVariable.getXwordn());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// - CUSTOMER\n\t\tpurchases.retrieve(stateVariable.getXwbccd());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00012 Debtor not found on Purchases\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwg4tx(all(\"-\", 40));\n\t\t}\n\t\t// - REPRESENTATIVE\n\t\tsalespersons.retrieve(stateVariable.getPerson());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00013 Rep not found on Salespersons\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setPname(all(\"-\", 34));\n\t\t}\n\t\t// - STATUS\n\t\torderStatusDescription.retrieve(stateVariable.getXwstat());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00014 Status not found on Order_status_description\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwsdsc(all(\"-\", 20));\n\t\t}\n\t}",
"@Test\n public void Oriental()throws ParseException\n {\n System.out.println(\"Oriental Dish\");\n //Elementos del plato\n OrientalDish platoOriental;\n platoOriental = new OrientalDish(\"Arroz Oriental\", \"Arroz Estilo Oriental\", \"\", \"\", 5500d, new ArrayList(), Size.ALL);\n platoOriental.addPart(new Dish(\"ShopSuey\",\"\",\"\",5000d, new ArrayList(), Size.ALL));\n \n DishBuilder orientalBuilder = new OrientalDishBuilder();\n orientalBuilder.setDish(platoOriental);\n \n DishDirector director = new DishDirector(orientalBuilder);\n //director.create();\n Dish dish = director.getDish();\n assertEquals(10500, dish.getPrice()); \n }",
"boolean hasAlreadCheckCard();",
"@Test\n public void giveCard() throws Exception {\n SmartPlayer x = new SmartPlayer(0,0);\n x.setCards(5,3);\n int numberOfCardsToGive = x.giveCard(5);\n assertTrue(numberOfCardsToGive == 3);\n }",
"private void manual() {\n State q1 = new State(\"q1\", \"ID\");\n State q2 = new State(\"q2\", \"IF\");\n State q3 = new State(\"q3\", \"ID\");\n State q4 = new State(\"q4\", \"CONSTANTE\");\n State q5 = new State(\"q5\", \"ABRE_PARENTESES\");\n State q6 = new State(\"q6\", \"FECHA_PARENTESES\");\n State q7 = new State(\"q7\", \"OPERADOR_MAIOR\");\n State q8 = new State(\"q8\", \"OPERADOR_MENOR\");\n State q9 = new State(\"q9\", \"OPERADOR_DIFERENTE\");\n State q10 = new State(\"q10\", \"ID\");\n State q11 = new State(\"q11\", \"ID\");\n State q12 = new State(\"q12\", \"ID\");\n State q13 = new State(\"q13\", \"ID\");\n State q14 = new State(\"q14\", \"BEGIN\");\n State q15 = new State(\"q15\", \"ID\");\n State q16 = new State(\"q16\", \"ID\");\n State q17 = new State(\"q17\", \"END\");\n State q18 = new State(\"q18\", \"ESPACO\");\n State q19 = new State(\"q19\", \"ID\");\n State q20 = new State(\"q20\", \"ID\");\n State q21 = new State(\"q21\", \"ELSE\");\n\n // IF\n q0.put(\"[i]\", q1);\n q1.put(\"[f]\", q2);\n q1.put(\"[^\\\\Wf]\", q3);\n q2.put(\"[\\\\w]\", q3);\n\n // ID\n q0.put(\"[^\\\\Wbei0-9_]\", q3);\n q3.put(\"[\\\\w]\", q3);\n\n // CONSTANTE\n q0.put(\"[\\\\d]\", q4);\n q4.put(\"[\\\\d]\", q4);\n\n // ABRE_PARENTESES\n q0.put(\"[(]\", q5);\n\n // ABRE_PARENTESES\n q0.put(\"[)]\", q6);\n\n // OPERADOR_MAIOR\n q0.put(\"[>]\", q7);\n\n // OPERADOR_MENOR\n q0.put(\"[<]\", q8);\n\n // OPERADOR_DIFERENTE\n q0.put(\"[#]\", q9);\n\n // BEGIN\n q0.put(\"[b]\", q10);\n q10.put(\"[e]\", q11);\n q11.put(\"[g]\", q12);\n q12.put(\"[i]\", q13);\n q13.put(\"[n]\", q14);\n q10.put(\"[^\\\\We]\", q3);\n q11.put(\"[^\\\\Wg]\", q3);\n q12.put(\"[^\\\\Wi]\", q3);\n q13.put(\"[^\\\\Wn]\", q3);\n q14.put(\"[\\\\w]\", q3);\n\n // END\n q0.put(\"[e]\", q15);\n q15.put(\"[n]\", q16);\n q16.put(\"[d]\", q17);\n q15.put(\"[^\\\\Wnl]\", q3);\n q16.put(\"[^\\\\Wd]\", q3);\n q17.put(\"[\\\\w]\", q3);\n\n // ELSE\n q15.put(\"[l]\", q19);\n q19.put(\"[s]\", q20);\n q20.put(\"[e]\", q21);\n q19.put(\"[^\\\\Ws]\", q3);\n q20.put(\"[^\\\\We]\", q3);\n q21.put(\"[\\\\w]\", q3);\n\n // ESPACO\n q0.put(\"[\\\\s]\", q18);\n }",
"@Test\n public void testPlay1()\n {\n List<Card> hand = new ArrayList<Card>();\n hand.add(new Card(UnoPlayer.Color.RED, UnoPlayer.Rank.NUMBER, 4));\n hand.add(new Card(UnoPlayer.Color.GREEN, UnoPlayer.Rank.NUMBER, 7));\n hand.add(new Card(UnoPlayer.Color.GREEN, UnoPlayer.Rank.REVERSE, -1));\n hand.add(new Card(UnoPlayer.Color.BLUE, UnoPlayer.Rank.NUMBER, 2));\n hand.add(new Card(UnoPlayer.Color.BLUE, UnoPlayer.Rank.SKIP, -1));\n hand.add(new Card(UnoPlayer.Color.NONE, UnoPlayer.Rank.WILD, -1));\n\n Card upCard = new Card(UnoPlayer.Color.RED, UnoPlayer.Rank.NUMBER, 7);\n int cardPlayed = thePlayer.play(hand, upCard, UnoPlayer.Color.RED, new\n GameState(upCard));\n\n // Let's see whether the card played was legit.\n assertTrue(\"Player didn't think a card could be played.\\nThis is an \"\n + \"error, since cards 0, 1, and 5 are legal plays.\",\n cardPlayed >= 0);\n assertTrue(\"Player tried to play \" + hand.get(cardPlayed)\n + \", which is an error.\", cardPlayed == 0 || cardPlayed == 1\n || cardPlayed == 5);\n System.out.println(\"Player played \" + hand.get(cardPlayed));\n }",
"@Test\n public void testAirliftCommand() {\n List<Country> l_countryList = d_gameData.getD_warMap().getD_continents().get(1).getD_countryList();\n l_countryList.add(d_gameData.getD_playerList().get(1).getD_ownedCountries().get(0));\n d_gameData.getD_playerList().get(0).getD_ownedCountries().get(0).setD_noOfArmies(7);\n d_gameData.getD_playerList().get(1).getD_ownedCountries().get(0).setD_noOfArmies(3);\n\n d_orderProcessor.processOrder(\"airlift india nepal 6\".trim(), d_gameData);\n d_gameData.getD_playerList().get(0).issue_order();\n Order l_order = d_gameData.getD_playerList().get(0).next_order();\n assertEquals(true, l_order.executeOrder());\n\n assertEquals(0, d_gameData.getD_playerList().get(1).getD_ownedCountries().size());\n assertEquals(3, d_gameData.getD_playerList().get(0).getD_ownedCountries().size());\n assertEquals(4, d_gameData.getD_playerList().get(0).getD_ownedCountries().get(2).getD_noOfArmies());\n assertEquals(1, d_gameData.getD_playerList().get(0).getD_ownedCountries().get(0).getD_noOfArmies());\n }",
"void pushCard(ICard card);",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void addACard() {\n Card card = new Card();\n int index = 0;\n doubleCapacity(orderByTitle);\n doubleCapacity(orderByAuthor);\n doubleCapacity(orderBySubject);\n \n \n System.out.println(\"Title of book is : \");\n card.titleOfBook = input.next();\n orderByTitle[index] = card.titleOfBook;\n System.out.println(\"Author of book is : \");\n card.autherOfBook = input.next();\n orderByAuthor[index] = card.autherOfBook;\n System.out.println(\"Subject Of Book is : \");\n card.subjectOfBook = input.next();\n orderBySubject[index] = card.subjectOfBook;\n cards.add(card) ; \n System.out.println(card);\n System.out.println();\n }",
"@Before\n public void before(){\n this.card = new Card(Suit.CLUBS, Rank.NINE);\n }",
"public static void main(String[] args) {\n Item i1 = new Item(\"Energy Drink 10-pack\", 546.86, 17.89, 550759400);\n Item i2 = new Item(\"Ramen 12-pack\", 74.84, 17.21, 12);\n Item i3 = new Item(\"Coke\", 454.5, 4.99, 123123123);\n Item i4 = new Item(2.98, 926367);\n CheckoutMachine c = new CheckoutMachine(\"Walmart\");\n try {\n System.out.println(\"Scanning Item 1: \" + i1.toString());\n c.scan(i1);\n System.out.println(\"Scanning Item 2: \" + i2.toString());\n c.scan(i2);\n System.out.println(\"Scanning Item 3: \" + i3.toString());\n c.scan(i3);\n System.out.println(\"Scanning Item 4: \" + i4.toString());\n c.scan(i4);\n } catch (InvalidItemException e) {\n System.out.println(e.toString());\n }\n java.time.LocalDate date = java.time.LocalDate.now();\n date = date.minusMonths(1);\n BuzzCard bCard = new BuzzCard(\"John Smith\", 0.0);\n CreditCard cCard = new CreditCard(\"John Smith\", 1000.0, date);\n Cash cash = new Cash(1000.0);\n boolean payed = false;\n try {\n System.out.println(\"Trying BuzzCard\");\n c.payForCart(bCard);\n payed = true;\n } catch (PaymentFailedException e1) {\n System.out.println(e1.toString());\n }\n if (!payed) {\n try {\n System.out.println(\"Trying Credit Card\");\n c.payForCart(cCard);\n payed = true;\n } catch (PaymentFailedException e2) {\n System.out.println(e2.toString());\n }\n }\n if (!payed) {\n try {\n System.out.println(\"Paying With Cash\");\n c.payForCart(cash);\n payed = true;\n } catch (PaymentFailedException e2) {\n System.out.println(e2.toString());\n }\n }\n\n }",
"@Test\n void testForLargestCardInTrickComparingRank() {\n Dealer testDealer = new Dealer();\n\n Suit suit1 = Suit.DIAMONDS;\n Suit suit2 = Suit.SPADES;\n Suit suit3 = Suit.DIAMONDS;\n Suit suit4 = Suit.DIAMONDS;\n \n Rank rank1 = Rank.TWO;\n Rank rank2 = Rank.KING;\n Rank rank3 = Rank.ACE;\n Rank rank4 = Rank.FIVE;\n\n Card card1 = new Card(suit1,rank1,false);\n Card card2 = new Card(suit2,rank2,false);\n Card card3 = new Card(suit3,rank3,false);\n Card card4 = new Card(suit4,rank4,false);\n\n \n testDealer.addToPlayedCards(card1);\n testDealer.addToPlayedCards(card2);\n testDealer.addToPlayedCards(card3);\n testDealer.addToPlayedCards(card4);\n\n assertEquals(card3 , testDealer.getLargestCardFromTrick());\n }",
"private void m56322b(String str, boolean z, String str2) {\n AppMethodBeat.m2504i(41903);\n C4990ab.m7417i(this.TAG, \"go to card manager: %s\", str);\n Intent intent = new Intent(this, HoneyPayCardManagerUI.class);\n intent.putExtra(\"key_card_no\", str);\n intent.putExtra(\"key_scene\", 0);\n intent.putExtra(\"key_is_create\", z);\n intent.putExtra(\"key_card_type\", str2);\n startActivityForResult(intent, 3);\n AppMethodBeat.m2505o(41903);\n }",
"@Test\n\tpublic void testGetYards() throws UnirestException {\n\tHttpResponse<String> response = Unirest.get(\"http://localhost:8080/TrackingVehicle/api/service/getYards\")\n\t\t\t .header(\"Cache-Control\", \"no-cache\")\n\t\t\t .header(\"Postman-Token\", \"0e777d04-8184-440d-a59e-1e9df67d7543\")\n\t\t\t .asString();\n\t}",
"@Override\n\tpublic void challenge9() {\n\n\t}",
"public boolean affordCard() {\n \t\treturn (FREE_BUILD || getResources(Type.WOOL) >= 1\n \t\t\t\t&& getResources(Type.GRAIN) >= 1 && getResources(Type.ORE) >= 1);\n \t}",
"@Test\n public void testGetReward() throws IOException {\n ResponseBase<VoterDividendResponse> voterRewardResult = topj.queryVoterDividend(account, \"T00000La8UTDgQQVRBjkCWEsKYk1XRpjZSK3zUbM\");\n System.out.println(\"voter reward result > \" + JSON.toJSONString(voterRewardResult));\n\n ResponseBase<AccountInfoResponse> accountInfoResponseBase = topj.getAccount(account);\n System.out.println(\"account address > \" + accountInfoResponseBase.getData().getAccountAddr() + \" balance > \" + accountInfoResponseBase.getData().getBalance());\n\n ResponseBase<XTransactionResponse> claimRewardResult = topj.claimVoterDividend(account);\n System.out.println(\"node claim reward hash >> \" + claimRewardResult.getData().getOriginalTxInfo().getTxHash() + \" >> is success > \" + claimRewardResult.getData().isSuccess());\n\n voterRewardResult = topj.queryVoterDividend(account, account.getAddress());\n System.out.println(\"voter reward result > \" + JSON.toJSONString(voterRewardResult));\n\n accountInfoResponseBase = topj.getAccount(account);\n System.out.println(\"account address > \" + accountInfoResponseBase.getData().getAccountAddr() + \" balance > \" + accountInfoResponseBase.getData().getBalance());\n }",
"@Test\r\n\tpublic void testPlayableCards2()\r\n\t{\n\t\t\r\n\t\tCardList clubList = new CardList();\r\n\t\tclubList.add(AllCards.a6C);\r\n\t\tclubList.add(AllCards.aTC);\t\t\r\n//\t\tassertTrue( h.playableCards(Suit.CLUBS, null).toString().equals(clubList.toString()));\r\n\t\t\r\n\t\tCardList diamondsList = new CardList();\r\n\t\tdiamondsList.add(AllCards.a7D);\r\n\t\tdiamondsList.add(AllCards.aQD);\r\n\t\tdiamondsList.add(AllCards.aKD);\r\n//\t\tassertTrue( h.playableCards(Suit.DIAMONDS, null).toString().equals(diamondsList.toString()));\r\n\t\t\r\n\t\tCardList heartsList = new CardList();\r\n\t\theartsList.add(AllCards.a9H);\t\t\r\n//\t\tassertTrue( h.playableCards(Suit.HEARTS, null).toString().equals(heartsList.toString()));\r\n\t\t\r\n\t\tCardList spadesList = new CardList();\r\n\t\tspadesList.add(AllCards.aTS);\r\n\t\tspadesList.add(AllCards.a7S);\r\n\t\tspadesList.add(AllCards.aJS);\r\n\t\tspadesList.add(AllCards.aKS);\r\n//\t\tassertTrue( h.playableCards(Suit.SPADES, null).toString().equals(spadesList.toString()));\r\n\t\t\r\n\t\tCardList joker = new CardList();\t\t\t\r\n\t\tjoker.add(AllCards.aLJo);\t\t\r\n\t\tjoker.add(AllCards.aHJo);\r\n//\t\tassertTrue(jokerhand.playableCards(Suit.DIAMONDS, null).sort(new Card.ByRankComparator()).toString().equals(joker.toString()));\r\n\t\t\r\n\t\t\r\n\t\t// Trump\r\n\t\tclubList.add(AllCards.aJS);\r\n\t\tclubList.add(AllCards.aLJo);\r\n\t\tclubList = clubList.sort(new Card.ByRankComparator());\r\n\t\tassertTrue( h.playableCards(Suit.CLUBS, Suit.CLUBS).sort(new Card.ByRankComparator()).toString().equals(clubList.toString()));\r\n\t\t\r\n\t\tdiamondsList.add(AllCards.aLJo);\r\n\t\tdiamondsList = diamondsList.sort(new Card.ByRankComparator());\r\n\t\tassertTrue( h.playableCards(Suit.DIAMONDS, Suit.DIAMONDS).sort(new Card.ByRankComparator()).toString().equals(diamondsList.toString()));\r\n\r\n\t\theartsList = heartsList.sort(new Card.ByRankComparator());\t\t\r\n\t\tassertTrue( h.playableCards(Suit.HEARTS, Suit.DIAMONDS).sort(new Card.ByRankComparator()).toString().equals(heartsList.toString()));\r\n\t\t\r\n\t\tspadesList.remove(AllCards.aJS);\r\n\t\tspadesList = spadesList.sort(new Card.ByRankComparator());\r\n\t\tassertTrue( h.playableCards(Suit.SPADES, Suit.CLUBS).sort(new Card.ByRankComparator()).toString().equals(spadesList.toString()));\r\n\t\t\r\n\t\t// no Trump in hand\r\n\t\tassertTrue(jokerhand.playableCards(Suit.DIAMONDS, Suit.DIAMONDS).sort(new Card.ByRankComparator()).toString().equals(joker.toString()));\r\n\t\tassertTrue(jokerhand.playableCards(Suit.DIAMONDS, Suit.CLUBS).sort(new Card.ByRankComparator()).toString().equals(joker.toString()));\r\n\t\t\r\n\t\tCardList jackList = new CardList();\r\n\t\tjackList.add(AllCards.aJS);\r\n\t\tjackList.add(AllCards.aJC);\r\n\t\tassertTrue(jackHand.playableCards(Suit.CLUBS, Suit.SPADES).sort(new Card.ByRankComparator()).toString().equals(jackList.toString()));\r\n\t\t\r\n\t}",
"@Test\n public void Oriental()throws ParseException\n {\n System.out.println(\"Oriental Dish\");\n //Elementos del plato\n OrientalDish platoOriental;\n platoOriental = new OrientalDish(0.0);\n platoOriental.setBase(new Product(1, \"Shop Suey\", 5000d));\n platoOriental.addOption(new Product(4, \"Pollo Agridulce\", 5800d));\n platoOriental.setSize(Size.FAMILY);\n \n DishBuilder orientalBuilder = new OrientalDishBuilder();\n orientalBuilder.setDish(platoOriental);\n \n DishDirector director = new DishDirector(orientalBuilder);\n //director.create();\n Dish dish = director.getDish();\n assertEquals(32400, dish.getPrice()); \n }",
"@Test\n public void testAdvanceWithHighNumberOfArmies() {\n List<Country> l_countryList = d_gameData.getD_warMap().getD_continents().get(1).getD_countryList();\n l_countryList.add(d_gameData.getD_playerList().get(1).getD_ownedCountries().get(0));\n d_gameData.getD_playerList().get(0).getD_ownedCountries().get(0).getD_neighbourCountries().add(\"nepal\");\n d_gameData.getD_playerList().get(0).getD_ownedCountries().get(0).setD_noOfArmies(7);\n d_gameData.getD_playerList().get(1).getD_ownedCountries().get(0).setD_noOfArmies(3);\n d_orderProcessor.processOrder(\"advance india nepal 15\".trim(), d_gameData);\n d_gameData.getD_playerList().get(0).issue_order();\n Order l_order = d_gameData.getD_playerList().get(0).next_order();\n assertEquals(false, l_order.executeOrder());\n }",
"@Test\n public void CardRequirementError() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(0);\n DevelopmentCard card1 = new DevelopmentCard(1, Color.GREEN, 0, null, null);\n p.getDevelopmentSlot().addCard(card1, 1);\n c.emptyQueue();\n assertFalse(am.activateLeaderCard(p, message));\n assertEquals(MessageType.MSG_ERROR, c.messages.get(0).getMessageType());\n assertEquals(1, c.messages.size());\n }",
"@Test\n public void testAddProgramRecordToHead() {\n System.out.println(\"addProgramRecordToHead\");\n SAMFileHeader header = new SAMFileHeader();\n SAMProgramRecord programRecord = new SAMProgramRecord(\"test\");\n PicardCommandLine instance = new PicardCommandLineImpl();\n instance.addProgramRecordToHead(header, programRecord);\n assertEquals(header.getProgramRecords().size(), 1);\n instance.addProgramRecordToHead(header, programRecord);\n assertEquals(header.getProgramRecords().size(), 2);\n assertNotNull(header.getProgramRecord(\"test_1\"));\n }",
"@Test\n public void checkBook2() throws Exception {\n SmartPlayer x = new SmartPlayer(0,0);\n boolean gotBook = x.checkBook();\n assertTrue(!gotBook);\n }",
"@Test\n public void testNextCardGood() {\n System.out.println(\"nextCardGood\");\n Deck deck = new Deck();\n Card card = deck.nextCard();\n ////since the deck is unshuffled, that last card should be WILDCARD\n assertEquals(CardType.WILDCARD, card.getValue());\n }",
"@Test\n\tpublic void TCAPIAR_03(){\n\t\taudioControl.addLog(\"ID : TCAPIAR_03 : Verify that Partner user is unable to get audio route detail\");\n\t\t/*\n\t\t\tSend a sample GET request using JssionID and CSRF token of partner user as following:\n\t\t\tGET http://devportal.dts.com/saap/api/route/154?revision=0 HTTP/1.1\n\t\t */\n\t\t// Log into DTS portal as partner user\n\t\tloginControl.login(SUPER_PARTNER_USER, SUPER_PARTNER_PASSWORD);\n\t\t// Get user CSRF token and cookie\n\t\tcsrfToken = audioControl.getCSRFToken();\n\t\tcookie = audioControl.getCookie();\n\t\t// Send a sample GET request using JssionID and CSRF token of partner user as following:\n\t\t// GET http://devportal.dts.com/saap/api/route/154?revision=0 HTTP/1.1\n\t\tJSONObject requestResult = APIUtil.sendGet(APIData.AUDIO_ROUTE_DETAIL_URL, csrfToken, cookie);\n\t\t/*\n\t\t * {\"apiErrorCode\":\"PEMISSION_DENY\",\"message\":\"You don't have permission.\"}\n\t\t */\n\t\tAssert.assertEquals(requestResult.get(\"message\").toString(), APIData.ERROR_MESSAGE);\n\t}",
"@Test\r\n public void testGenerateHand() {\r\n System.out.println(\"generateHand\");\r\n Cardhand instance = new Cardhand();\r\n instance.generateHand();\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"private void yy() {\n\n\t}",
"@Override\n\tpublic void challenge11() {\n\n\t}",
"public interface CardHand { // if you want to be considered a CardHand you MUST define these methods(behaviors)\n\t\n\tpublic ArrayList<PlayingCard> getHand(); // returns the cards in the hand as an ArrayList\n\n\tpublic void addCard(PlayingCard aCard); // receive a PlayingCard and add to the hand\n\t\n\tpublic void emptyHand(); // remove all PlayingCards from the hand\n\n\tpublic void show(); // display all the cards in the hand\n\n}",
"static void perform_rz(String passed){\n\t\tint type = type_of_rz(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\treturn_when_zero(passed);\n\t\t\tbreak;\n\t\t}\n\t}",
"abstract void output(Card cd);",
"@Test\n\tpublic void TCAPIAR_02(){\n\t\taudioControl.addLog(\"ID : TCAPIAR_02 : Verify that Partner user is unable to get list of audio route\");\n\t\t/*\n\t\t\tSend a sample GET request using JssionID and CSRF token of partner user as following:\n\t\t\tGET http://devportal.dts.com/saap/api/route HTTP/1.1\n\t\t */\n\t\t// Log into DTS portal as Partner user\n\t\tloginControl.login(SUPER_PARTNER_USER, SUPER_PARTNER_PASSWORD);\n\t\t// Get user CSRF token and cookie\n\t\tcsrfToken = audioControl.getCSRFToken();\n\t\tcookie = audioControl.getCookie();\n\t\t\n\t\t// Send a sample GET request using JssionID and CSRF token of partner user as following: GET http://devportal.dts.com/saap/api/route HTTP/1.1\n\t\tJSONObject requestResult = APIUtil.sendGet(APIData.GET_AUDIO_ROUTES_LIST_URL, csrfToken, cookie);\n\t\t/*\n\t\t * {\"apiErrorCode\":\"PEMISSION_DENY\",\"message\":\"You don't have permission.\"}\n\t\t */\n\t\tAssert.assertEquals(requestResult.get(\"message\").toString(), APIData.ERROR_MESSAGE);\n\t}",
"@Test\n public void askForCardSmart() throws Exception {\n Map<Integer,Integer> allMovesMade = new HashMap<Integer,Integer>();\n allMovesMade.put(1, 2);\n SmartPlayer x = new SmartPlayer(0,1);\n x.setCards(2,2);\n x.setMovesMadeByOtherPlayers(allMovesMade);\n SmartPlayer y = new SmartPlayer(1,2);\n y.setCards(2,2);\n int rankToAsk = x.askForCard(2);\n assertTrue(rankToAsk == 2);\n //assertTrue(rankToAsk<=13 && rankToAsk> 0);\n }",
"void playMonumentCard();",
"private AssistantJack()\n\t{\n\t\tthis.timesAsked = 0;\n\t\tthis.correctTheory = null;\n\t}",
"private S(com.google.ad r9, com.google.h r10) {\n /*\n r8 = this;\n r0 = 0;\n r1 = -1;\n r7 = 2;\n r2 = 1;\n r5 = org.whispersystems.Y.r;\n r8.<init>();\n r8.k = r1;\n r8.n = r1;\n r8.c();\n r6 = com.google.eV.g();\n r1 = r0;\n L_0x0015:\n if (r0 != 0) goto L_0x006f;\n L_0x0017:\n r3 = r9.z();\t Catch:{ fN -> 0x008b, IOException -> 0x00aa }\n switch(r3) {\n case 0: goto L_0x0085;\n case 10: goto L_0x00c6;\n case 18: goto L_0x0055;\n default: goto L_0x001e;\n };\n L_0x001e:\n r3 = r8.a(r9, r6, r10, r3);\t Catch:{ fN -> 0x0089, IOException -> 0x00aa }\n if (r3 != 0) goto L_0x006d;\n L_0x0024:\n if (r5 == 0) goto L_0x00c4;\n L_0x0026:\n r3 = r2;\n L_0x0027:\n r0 = 0;\n r4 = r8.h;\t Catch:{ fN -> 0x008b, IOException -> 0x00aa }\n r4 = r4 & 1;\n if (r4 != r2) goto L_0x00c1;\n L_0x002e:\n r0 = r8.f;\t Catch:{ fN -> 0x008b, IOException -> 0x00aa }\n r0 = r0.w();\t Catch:{ fN -> 0x008b, IOException -> 0x00aa }\n r4 = r0;\n L_0x0035:\n r0 = org.whispersystems.Y.o;\t Catch:{ fN -> 0x00a8, IOException -> 0x00aa }\n r0 = r9.a(r0, r10);\t Catch:{ fN -> 0x00a8, IOException -> 0x00aa }\n r0 = (org.whispersystems.Y) r0;\t Catch:{ fN -> 0x00a8, IOException -> 0x00aa }\n r8.f = r0;\t Catch:{ fN -> 0x00a8, IOException -> 0x00aa }\n if (r4 == 0) goto L_0x004c;\n L_0x0041:\n r0 = r8.f;\t Catch:{ fN -> 0x00a8, IOException -> 0x00aa }\n r4.a(r0);\t Catch:{ fN -> 0x00a8, IOException -> 0x00aa }\n r0 = r4.a();\t Catch:{ fN -> 0x00a8, IOException -> 0x00aa }\n r8.f = r0;\t Catch:{ fN -> 0x00a8, IOException -> 0x00aa }\n L_0x004c:\n r0 = r8.h;\t Catch:{ fN -> 0x00b9, IOException -> 0x00aa }\n r0 = r0 | 1;\n r8.h = r0;\t Catch:{ fN -> 0x00b9, IOException -> 0x00aa }\n if (r5 == 0) goto L_0x00bf;\n L_0x0054:\n r0 = r3;\n L_0x0055:\n r3 = r1 & 2;\n if (r3 == r7) goto L_0x0062;\n L_0x0059:\n r3 = new java.util.ArrayList;\t Catch:{ fN -> 0x008b, IOException -> 0x00aa }\n r3.<init>();\t Catch:{ fN -> 0x008b, IOException -> 0x00aa }\n r8.l = r3;\t Catch:{ fN -> 0x008b, IOException -> 0x00aa }\n r1 = r1 | 2;\n L_0x0062:\n r3 = r8.l;\t Catch:{ fN -> 0x008b, IOException -> 0x00aa }\n r4 = org.whispersystems.Y.o;\t Catch:{ fN -> 0x008b, IOException -> 0x00aa }\n r4 = r9.a(r4, r10);\t Catch:{ fN -> 0x008b, IOException -> 0x00aa }\n r3.add(r4);\t Catch:{ fN -> 0x008b, IOException -> 0x00aa }\n L_0x006d:\n if (r5 == 0) goto L_0x0015;\n L_0x006f:\n r0 = r1 & 2;\n if (r0 != r7) goto L_0x007b;\n L_0x0073:\n r0 = r8.l;\t Catch:{ fN -> 0x00bb }\n r0 = java.util.Collections.unmodifiableList(r0);\t Catch:{ fN -> 0x00bb }\n r8.l = r0;\t Catch:{ fN -> 0x00bb }\n L_0x007b:\n r0 = r6.d();\n r8.e = r0;\n r8.b();\n return;\n L_0x0085:\n if (r5 == 0) goto L_0x00c4;\n L_0x0087:\n r0 = r2;\n goto L_0x001e;\n L_0x0089:\n r0 = move-exception;\n throw r0;\t Catch:{ fN -> 0x008b, IOException -> 0x00aa }\n L_0x008b:\n r0 = move-exception;\n r0 = r0.a(r8);\t Catch:{ all -> 0x0091 }\n throw r0;\t Catch:{ all -> 0x0091 }\n L_0x0091:\n r0 = move-exception;\n r1 = r1 & 2;\n if (r1 != r7) goto L_0x009e;\n L_0x0096:\n r1 = r8.l;\t Catch:{ fN -> 0x00bd }\n r1 = java.util.Collections.unmodifiableList(r1);\t Catch:{ fN -> 0x00bd }\n r8.l = r1;\t Catch:{ fN -> 0x00bd }\n L_0x009e:\n r1 = r6.d();\n r8.e = r1;\n r8.b();\n throw r0;\n L_0x00a8:\n r0 = move-exception;\n throw r0;\t Catch:{ fN -> 0x008b, IOException -> 0x00aa }\n L_0x00aa:\n r0 = move-exception;\n r2 = new com.google.fN;\t Catch:{ all -> 0x0091 }\n r0 = r0.getMessage();\t Catch:{ all -> 0x0091 }\n r2.<init>(r0);\t Catch:{ all -> 0x0091 }\n r0 = r2.a(r8);\t Catch:{ all -> 0x0091 }\n throw r0;\t Catch:{ all -> 0x0091 }\n L_0x00b9:\n r0 = move-exception;\n throw r0;\t Catch:{ fN -> 0x008b, IOException -> 0x00aa }\n L_0x00bb:\n r0 = move-exception;\n throw r0;\n L_0x00bd:\n r0 = move-exception;\n throw r0;\n L_0x00bf:\n r0 = r3;\n goto L_0x006d;\n L_0x00c1:\n r4 = r0;\n goto L_0x0035;\n L_0x00c4:\n r0 = r2;\n goto L_0x006d;\n L_0x00c6:\n r3 = r0;\n goto L_0x0027;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.whispersystems.S.<init>(com.google.ad, com.google.h):void\");\n }",
"private void constructACLMessage()\n {\n PlayIntroAction playIntroObject = new PlayIntroAction();\n playIntroObject.setLenght(numberOfMeasures);\n playIntroObject.setNow(true);\n playIntroObject.setDuration(-1);\n msg = new ACLMessage(ACLMessage.CFP);\n msg.setLanguage(codec.getName());\n msg.setOntology(ontology.getName());\n for(int i = 0; i < receivers.size(); i++)\n {\n try\n {\n //fill the content using the Ontology concept\n myAgent.getContentManager().fillContent(msg,new Action((AID)receivers.elementAt(i),playIntroObject));\n }catch (Exception ex) { ex.printStackTrace(); }\n //Set the receiver of the message\n msg.addReceiver((AID)receivers.elementAt(i));\n\n }\n\n //Set the protocol that we gonna use\n msg.setProtocol(FIPANames.InteractionProtocol.FIPA_CONTRACT_NET);\n //We indicate the deadline of the reply\n msg.setReplyByDate(new Date(System.currentTimeMillis() + 30000));\n\n\n }",
"public void mo4359a() {\n }",
"private void m56325id(boolean z) {\n AppMethodBeat.m2504i(41902);\n C4990ab.m7416i(this.TAG, \"get payer list\");\n C1207m c28288f = new C28288f();\n c28288f.mo70321o(this);\n mo39970a(c28288f, z, false);\n AppMethodBeat.m2505o(41902);\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n public void perish() {\n \n }"
] |
[
"0.64873713",
"0.57480526",
"0.5599382",
"0.54575276",
"0.53104556",
"0.52182597",
"0.520332",
"0.51902956",
"0.5180657",
"0.51733714",
"0.51603746",
"0.5123719",
"0.5120082",
"0.5112192",
"0.50877607",
"0.50801224",
"0.5077275",
"0.50715613",
"0.505798",
"0.5052106",
"0.50467694",
"0.5041885",
"0.50410616",
"0.5024874",
"0.50209117",
"0.5018699",
"0.50175923",
"0.5010024",
"0.49903134",
"0.4987683",
"0.497887",
"0.49788177",
"0.49748707",
"0.49738634",
"0.4967284",
"0.49649957",
"0.49630186",
"0.49596226",
"0.4955308",
"0.49527285",
"0.49521586",
"0.49510008",
"0.49495852",
"0.49439886",
"0.49298677",
"0.49297982",
"0.4927173",
"0.49216598",
"0.4919499",
"0.4919115",
"0.49174613",
"0.49132013",
"0.49095953",
"0.4903022",
"0.48966053",
"0.48934552",
"0.48803926",
"0.48744932",
"0.48730835",
"0.48710018",
"0.4864766",
"0.48558125",
"0.48519915",
"0.4851492",
"0.48496976",
"0.48455134",
"0.48452467",
"0.48449096",
"0.48358783",
"0.4835469",
"0.4834306",
"0.48340684",
"0.48244163",
"0.48214835",
"0.4820894",
"0.48192808",
"0.48189136",
"0.48181325",
"0.48177528",
"0.48116964",
"0.48085555",
"0.48071796",
"0.48057324",
"0.48043633",
"0.47996175",
"0.47993022",
"0.47935352",
"0.47915676",
"0.47904718",
"0.47884205",
"0.47855264",
"0.47846672",
"0.4780452",
"0.47768623",
"0.47768623",
"0.47768623",
"0.47768623",
"0.47768623",
"0.47768623",
"0.47768623",
"0.4776852"
] |
0.0
|
-1
|
Calculates the resolution (world units / pixel) for the given scale denominator (1 / map scale) and coordinate reference system (determines the world units).
|
public static double calcResolution( double scaleDenominator, ICRS crs ) {
IUnit units = crs.getAxis()[0].getUnits();
return calcResolution( scaleDenominator, units );
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static double calcResolution( double scaleDenominator, IUnit units ) {\n if ( units.equals( METRE ) ) {\n return calcMetricResFromScale( scaleDenominator );\n } else if ( units.equals( DEGREE ) ) {\n return calcDegreeResFromScale( scaleDenominator );\n }\n String msg = \"Unhandled unit type: \" + units\n + \". Conversion from scale denominator to resolution not implemented\";\n throw new IllegalArgumentException( msg );\n }",
"public float getEqualizationScale() {\n return Gdx.graphics.getWidth() / WE.getCurrentConfig().getRenderResolutionWidth();\n }",
"private double resolution(int zoom) {\n\t\treturn this.initialResolution / (Math.pow(2, zoom));\r\n\t}",
"public void updateScale()\n {\n // get scale from world presenter\n s2 = (cam.getScale());\n //Convert to English Miles if appropriate\n if( !SettingsScreen.getUnits() ) s2 *= 0.60934;\n s1 = s2/2;\n repaint();\n }",
"public final Vector2f getResolution() {\r\n return settings.getResolution();\r\n }",
"public float getScale();",
"public float getMetersPerPixel(float scale) {\r\n\t\treturn scale;\r\n\t}",
"int getScale();",
"public static List<Float> getPixelsPerMicrometer(String slideRef, Object... varargs) {\n\t\t// setting the default values when arguments' values are omitted\n\t\tInteger zoomLevel = null;\n\t\tString sessionID = null;\n\t\tif (varargs.length > 0) {\n\t\t\tif (!(varargs[0] instanceof Integer) && varargs[0] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getZoomLevelsDict() : Invalid argument\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"...\");\n\t\t\t}\n\t\t\tzoomLevel = (Integer) varargs[0];\n\t\t}\n\t\tif (varargs.length > 1) {\n\t\t\tif (!(varargs[1] instanceof String) && varargs[1] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getZoomLevelsDict() : Invalid argument\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"...\");\n\t\t\t}\n\t\t\tsessionID = (String) varargs[1];\n\t\t}\n\t\t// Retrieve the physical dimension in terms of pixels per micrometer.\n\t\t// When zoom level is left to its default value of None, dimensions at the\n\t\t// highest zoom level are returned\n\t\t// (in effect returning the \"native\" resolution at which the slide was\n\t\t// registered)\n\t\tint maxZoomLevel = getMaxZoomLevel(slideRef, sessionID);\n\t\tMap<String, Object> info = getSlideInfo(slideRef, sessionID);\n\t\tfloat xppm = (float) info.get(\"MicrometresPerPixelX\");\n\t\tfloat yppm = (float) info.get(\"MicrometresPerPixelY\");\n\t\tList<Float> result = new ArrayList<>();\n\t\tif ((zoomLevel == null) || (zoomLevel == maxZoomLevel)) {\n\t\t\tresult.add(xppm);\n\t\t\tresult.add(yppm);\n\t\t\treturn result;\n\t\t} else {\n\t\t\tdouble factor = Math.pow(2, zoomLevel - maxZoomLevel);\n\t\t\tresult.add((float) (xppm / factor));\n\t\t\tresult.add((float) (yppm / factor));\n\t\t\treturn result;\n\t\t}\n\t}",
"public float getGlobalScale() {\n // per convenzione se la scala deve essere su tutti e tre gli assi\n // allora si considera scale.x() per tutti gli assi\n return (float) scale.x();\n }",
"public Vector2 getDrawScale() {\n \tscaleCache.set(drawScale);\n \treturn scaleCache; \n }",
"public int getResolution() {\n return resolution;\n }",
"public double getResolution() {\n return resolution;\n }",
"public float getResolution() {\n return resolution;\n }",
"public Integer getScale() {\n return _scale;\n }",
"public Integer getScale() {\n return _scale;\n }",
"ScaleType getScale();",
"BigInteger getResolution();",
"private int getScale(){\n Display display = ((WindowManager) Objects.requireNonNull(getContext())\n .getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();\n\n int width = display.getWidth();\n Double val = (double) width / 360d;\n val = val * 100d;\n return val.intValue();\n }",
"public void setResolution(Size resolution, long scale) {\n\t\tAssert.assertNotNull(resolution);\n\n\t\tJWLC.nativeHandler().wlc_output_set_resolution(this.to(),\n\t\t\t\tresolution.to(), Utils.getAsUnsignedInt(scale));\n\t}",
"public double getScale(\n )\n {return scale;}",
"public float getScale() {\n \t\treturn scale;\n \t}",
"public native void setUnits(int resolutionType) throws MagickException;",
"public int getScale() {\r\n return scale;\r\n }",
"public double getScale() {\n return scale;\n }",
"public double getScale() {\r\n return scale;\r\n }",
"public float getDscale() {\r\n\t\treturn dscale;\r\n\t}",
"public double getScale() {\n\t\treturn disp.getScale();\n\t}",
"MapScale(int x, int y, int width, int height, Camera cam)\n {\n super();\n this.cam = cam;\n s2 = (cam.getScale());\n setOpaque(false);\n\n setLocation(x, y);\n setSize(width, height);\n }",
"public double getScale() {\n return scale;\n }",
"public int zoom() {\n double sizex = scale * getWidth();\n double sizey = scale * getHeight();\n for (int zoom = 0; zoom <= 32; zoom++, sizex *= 2, sizey *= 2)\n if (sizex > world.east() || sizey > world.north())\n return zoom;\n return 32;\n }",
"public double getScale(){\n\t\treturn scale;\n\t}",
"public short getResolutionUnit()\r\n\t{\r\n\t\treturn super.getShort(0);\r\n\t}",
"public float getScale()\n\t{\n\t\treturn scale;\n\t}",
"public double getScale() {\n return this.scale;\n }",
"public native double getXResolution() throws MagickException;",
"public native int getUnits() throws MagickException;",
"public static int getMagnification(String slideRef, Object... varargs) {\n\t\t// setting the default values when arguments' values are omitted\n\t\tInteger zoomLevel = null;\n\t\tBoolean exact = false;\n\t\tString sessionID = null;\n\t\tif (varargs.length > 0) {\n\t\t\tif (!(varargs[0] instanceof Integer) && varargs[0] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getMagnification() : Invalid argument\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"...\");\n\t\t\t}\n\t\t\tzoomLevel = (Integer) varargs[0];\n\t\t}\n\t\tif (varargs.length > 1) {\n\t\t\tif (!(varargs[1] instanceof Boolean) && varargs[1] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getMagnification() : Invalid argument\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"...\");\n\t\t\t}\n\t\t\texact = (Boolean) varargs[1];\n\t\t}\n\t\tif (varargs.length > 2) {\n\t\t\tif (!(varargs[2] instanceof String) && varargs[2] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getMagnification() : Invalid argument\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"...\");\n\t\t\t}\n\t\t\tsessionID = (String) varargs[2];\n\t\t}\n\t\t// Get the magnification represented at a certain zoom level\n\t\tfloat ppm = getPixelsPerMicrometer(slideRef, zoomLevel, sessionID).get(0);\n\t\tif (ppm > 0) {\n\t\t\tif (exact == true) {\n\t\t\t\treturn (int) (40 / (ppm / 0.25));\n\t\t\t} else {\n\t\t\t\treturn (int) (40 / ((int) (ppm / 0.25)));\n\t\t\t}\n\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"public double getScale() {\r\n\t\treturn scale;\r\n\t}",
"public int getScale() {\n return scale_;\n }",
"public float getScale() {\n\t\treturn scale;\n\t}",
"private void computeDimensions(int bitResolution) {\n\t\tint dimension = (int) Math.round(Math.sqrt(bitResolution + 1));\n\n\t\t// width //height\n\t\tint normalBound = (dimension - 1) * (dimension);\n\t\tint higherBound = (dimension - 1) * (dimension + 1);\n\n\t\tthis.width = dimension;\n\t\tthis.height = dimension;\n\n\t\tif (higherBound < bitResolution) {\n\t\t\tthis.width++;\n\t\t\tthis.height++;\n\t\t} else {\n\t\t\tif (normalBound < bitResolution || (normalBound - bitResolution) > (higherBound - bitResolution)) {\n\t\t\t\tthis.height++;\n\t\t\t}\n\t\t}\n\n\t}",
"float getCostScale();",
"public void scale(float scale, float scale2) {\n\t\t\n\t}",
"public void setScale(double scale, double xscale, double yscale) {\n\t\tif (this.scale != scale || this.xscale != xscale || this.yscale != yscale) {\n\t\t\tthis.scale = scale;\n\t\t\tthis.xscale = xscale;\n\t\t\tthis.yscale = yscale;\n\n\t\t\t// calculate the absolute coordinates and dimensions on the base\n\t\t\t// of the given scale parameters\n\t\t\tint x = (int) (xRel * xscale);\n\t\t\tint y = (int) (yRel * yscale);\n\t\t\tint width = (int) (widthRel * scale);\n\t\t\tint height = (int) (heightRel * scale);\n\n\t\t\t// the border rope holders must always be at the border\n\t\t\t// small rounding failures are eliminated here\n\t\t\tif (this instanceof Seilaufhaenger) {\n\t\t\t\tSeilaufhaenger aufhaenger = (Seilaufhaenger) this;\n\t\t\t\tif (!aufhaenger.isUnderTreibscheibe()) {\n\t\t\t\t\tif (aufhaenger.getHimmel() == Seilaufhaenger.NORD) {\n\t\t\t\t\t\tif (x > aufzugschacht.getWidth() - width - 1)\n\t\t\t\t\t\t\tx = aufzugschacht.getWidth() - width - 1;\n\t\t\t\t\t\tif (x < 1)\n\t\t\t\t\t\t\tx = 1;\n\t\t\t\t\t\ty = 1;\n\t\t\t\t\t} else if (aufhaenger.getHimmel() == Seilaufhaenger.SUED) {\n\t\t\t\t\t\tif (x > aufzugschacht.getWidth() - width - 1)\n\t\t\t\t\t\t\tx = aufzugschacht.getWidth() - width - 1;\n\t\t\t\t\t\tif (x < 1)\n\t\t\t\t\t\t\tx = 1;\n\t\t\t\t\t\ty = aufzugschacht.getHeight() - height - 1;\n\t\t\t\t\t} else if (aufhaenger.getHimmel() == Seilaufhaenger.WEST) {\n\t\t\t\t\t\tif (y > aufzugschacht.getHeight() - width - 1)\n\t\t\t\t\t\t\ty = aufzugschacht.getHeight() - height - 1;\n\t\t\t\t\t\tif (y < 1)\n\t\t\t\t\t\t\ty = 1;\n\t\t\t\t\t\tx = 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (y > aufzugschacht.getHeight() - width - 1)\n\t\t\t\t\t\t\ty = aufzugschacht.getHeight() - height - 1;\n\t\t\t\t\t\tif (y < 1)\n\t\t\t\t\t\t\ty = 1;\n\t\t\t\t\t\tx = aufzugschacht.getWidth() - width - 1;\n\t\t\t\t\t}\n\t\t\t\t\t// moves and resizes the element\n\t\t\t\t\tsetSize(width, height);\n\t\t\t\t\tsetLocation(x, y);\n\t\t\t\t} else {\n\t\t\t\t\tif (x > aufzugschacht.getWidth() - width - 1)\n\t\t\t\t\t\tx = aufzugschacht.getWidth() - width - 1;\n\t\t\t\t\tif (x < 1)\n\t\t\t\t\t\tx = 1;\n\t\t\t\t\t// moves and resizes the element\n\t\t\t\t\tsetSize(width, height);\n\t\t\t\t\t// setLocation(x, y);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (x > aufzugschacht.getWidth() - width - 1)\n\t\t\t\t\tx = aufzugschacht.getWidth() - width - 1;\n\t\t\t\tif (y > aufzugschacht.getHeight() - width - 1)\n\t\t\t\t\ty = aufzugschacht.getHeight() - height - 1;\n\t\t\t\tif (x < 1)\n\t\t\t\t\tx = 1;\n\t\t\t\tif (y < 1)\n\t\t\t\t\ty = 1;\n\t\t\t\t// moves and resizes the element\n\t\t\t\tsetSize(width, height);\n\t\t\t\tsetLocation(x, y);\n\t\t\t}\n\t\t}\n\t}",
"public native double getYResolution() throws MagickException;",
"public void zoomToBounds(double ulLon, double ulLat, double lrLon, double lrLat)\n/* 116: */ {\n/* 117:182 */ int x_min = 2147483647;\n/* 118:183 */ int y_min = 2147483647;\n/* 119:184 */ int x_max = -2147483648;\n/* 120:185 */ int y_max = -2147483648;\n/* 121:186 */ int mapZoomMax = 20;\n/* 122: */\n/* 123:188 */ x_max = Math.max(x_max, MercatorProj.LonToX(lrLon, mapZoomMax));\n/* 124:189 */ x_max = Math.max(x_max, MercatorProj.LonToX(ulLon, mapZoomMax));\n/* 125:190 */ y_max = Math.max(y_max, MercatorProj.LatToY(ulLat, mapZoomMax));\n/* 126:191 */ y_max = Math.max(y_max, MercatorProj.LatToY(lrLat, mapZoomMax));\n/* 127:192 */ x_min = Math.min(x_min, MercatorProj.LonToX(ulLon, mapZoomMax));\n/* 128:193 */ x_min = Math.min(x_min, MercatorProj.LonToX(lrLon, mapZoomMax));\n/* 129:194 */ y_min = Math.min(y_min, MercatorProj.LatToY(ulLat, mapZoomMax));\n/* 130:195 */ y_min = Math.min(y_min, MercatorProj.LatToY(lrLat, mapZoomMax));\n/* 131: */\n/* 132: */\n/* 133: */\n/* 134:199 */ int height = Math.max(0, this.mapPanel.getHeight());\n/* 135:200 */ int width = Math.max(0, this.mapPanel.getWidth());\n/* 136:201 */ int newZoom = mapZoomMax;\n/* 137:202 */ int x = x_max - x_min;\n/* 138:203 */ int y = y_max - y_min;\n/* 139:204 */ while ((x > width) || (y > height))\n/* 140: */ {\n/* 141:205 */ newZoom--;\n/* 142:206 */ x >>= 1;\n/* 143:207 */ y >>= 1;\n/* 144: */ }\n/* 145:209 */ x = x_min + (x_max - x_min) / 2;\n/* 146:210 */ y = y_min + (y_max - y_min) / 2;\n/* 147:211 */ int z = 1 << mapZoomMax - newZoom;\n/* 148:212 */ x /= z;\n/* 149:213 */ y /= z;\n/* 150:214 */ this.mapPanel.setZoom(new Point(x, y), newZoom);\n/* 151: */ }",
"short getHResolution();",
"int getHorizontalResolution();",
"public void scale(float scale) {\n if (scale != 1.0f) {\n left = (int) (left * scale + 0.5f);\n top = (int) (top * scale + 0.5f);\n right = (int) (right * scale + 0.5f);\n bottom = (int) (bottom * scale + 0.5f);\n }\n }",
"public void setScale(float scale);",
"public int getResolution() {\n return this.resolution;\n }",
"int getWrongScale();",
"public void setScaleFactor(float scale){\n scaleFactor = scale;\n }",
"public double resolution(final Slit slit, final double imgQuality) {\n return resolution(slit);\n }",
"public double resolution(final Slit slit) {\n return getEffectiveWavelength() / resolution.get(getGrismNumber());\n }",
"@Override\n\tpublic Dimension getResolution() {\n\t\treturn null;\n\t}",
"public float getScale(int xform) {\n\t\treturn m_xforms[xform].m_scale * m_xforms[xform].m_dscale;\n\t}",
"public float getScale() {\n return this.scale;\n }",
"private void computeRatio() {\n int i;\n int i2;\n int i3;\n boolean z = false;\n if (CameraSettings.getStrictAspectRatio(this.mRenderWidth, this.mRenderHeight) > -1 || !CameraSettings.isNearAspectRatio(this.mCameraWidth, this.mCameraHeight, this.mRenderWidth, this.mRenderHeight)) {\n int i4 = this.mCameraWidth;\n int i5 = this.mCameraHeight;\n switch (this.mTargetRatio) {\n case 0:\n this.mIsFullScreen = false;\n this.mIsRatio16_9 = false;\n if (!CameraSettings.isAspectRatio4_3(i4, i5)) {\n this.mNeedCropped = true;\n if (i4 * 4 > i5 * 3) {\n int i6 = (int) (((float) i5) * 0.75f);\n this.mScaleX = ((float) i6) / ((float) i4);\n i4 = i6;\n } else {\n int i7 = (int) ((((float) i4) * 4.0f) / 3.0f);\n this.mScaleY = ((float) i7) / ((float) i5);\n i5 = i7;\n }\n } else {\n this.mNeedCropped = false;\n this.mScaleX = 1.0f;\n this.mScaleY = 1.0f;\n }\n if (CameraSettings.sCroppedIfNeeded) {\n this.mIsFullScreen = true;\n this.mNeedCropped = true;\n this.mIsRatio16_9 = true;\n i = (int) ((((float) i4) * 16.0f) / 9.0f);\n this.mScaleX *= 0.75f;\n } else {\n i = i5;\n }\n if (b.isPad()) {\n this.mIsFullScreen = true;\n break;\n }\n break;\n case 1:\n this.mIsRatio16_9 = true;\n this.mIsFullScreen = true;\n if (!CameraSettings.isAspectRatio16_9(i4, i5)) {\n this.mNeedCropped = true;\n if (i4 * 16 <= i5 * 9) {\n int i8 = (int) ((((float) i4) * 16.0f) / 9.0f);\n this.mScaleY = ((float) i8) / ((float) i5);\n int i9 = i8;\n i2 = i4;\n i3 = i9;\n if (b.isPad()) {\n this.mIsRatio16_9 = false;\n this.mNeedCropped = true;\n i3 = (int) (((float) i3) * 0.75f);\n this.mScaleY *= 0.75f;\n }\n i = i3;\n i4 = i2;\n break;\n } else {\n i2 = (int) ((((float) i5) * 9.0f) / 16.0f);\n this.mScaleX = ((float) i2) / ((float) i4);\n }\n } else {\n this.mNeedCropped = false;\n this.mScaleX = 1.0f;\n this.mScaleY = 1.0f;\n i2 = i4;\n }\n i3 = i5;\n if (b.isPad()) {\n }\n i = i3;\n i4 = i2;\n case 2:\n this.mIsFullScreen = false;\n this.mIsRatio16_9 = false;\n this.mNeedCropped = true;\n if (i4 != i5) {\n this.mScaleX = 1.0f;\n this.mScaleY = ((float) i4) / ((float) i5);\n i = i4;\n break;\n }\n default:\n i = i5;\n break;\n }\n this.mWidth = i4;\n this.mHeight = i;\n } else if (!(this.mCameraWidth == 0 || this.mCameraHeight == 0)) {\n if (this.mRenderWidth == 0 || this.mRenderHeight == 0 || this.mRenderWidth * this.mCameraHeight == this.mRenderHeight * this.mCameraWidth) {\n this.mNeedCropped = false;\n this.mScaleX = 1.0f;\n this.mScaleY = 1.0f;\n this.mWidth = this.mCameraWidth;\n this.mHeight = this.mCameraHeight;\n } else {\n this.mNeedCropped = true;\n if (this.mCameraWidth * this.mRenderHeight > this.mCameraHeight * this.mRenderWidth) {\n this.mHeight = this.mCameraHeight;\n this.mWidth = (this.mCameraHeight * this.mRenderWidth) / this.mRenderHeight;\n this.mScaleX = ((float) this.mWidth) / ((float) this.mCameraWidth);\n this.mScaleY = 1.0f;\n } else {\n this.mWidth = this.mCameraWidth;\n this.mHeight = (this.mCameraWidth * this.mRenderHeight) / this.mRenderWidth;\n this.mScaleX = 1.0f;\n this.mScaleY = ((float) this.mHeight) / ((float) this.mCameraHeight);\n }\n }\n if ((((float) this.mRenderHeight) / ((float) this.mRenderWidth)) - (((float) Util.sWindowHeight) / ((float) Util.sWindowWidth)) < 0.1f) {\n z = true;\n }\n this.mIsFullScreen = z;\n }\n updateRenderSize();\n updateRenderRect();\n }",
"public int getScale(){\n return scale;\n }",
"public int getByproductScaled(int scale)\n {\n return this.byproduct.getFluidAmount() * scale / TOTAL_BYPRODUCT_SPACE;\n }",
"public void zoomScale(double scaleDelta) {\n \t\tzoomToScale((float) (mapDisplay.sc * scaleDelta));\n \t}",
"@Override\n public float getScale() {\n return scale;\n }",
"static int[] getResolution ()\n\t{\n\t\t//get the Toolkit of this instance\n\t\tToolkit tk = Toolkit.getDefaultToolkit ();\n\t\t\n\t\t//get the screen size as Dimension object\n\t\tDimension resolution = tk.getScreenSize ();\n\n\t\tint[] rez = new int[2];\n\n\t\t//extract integers from that Dimension object\n\t\trez[0] = new Double (resolution.getWidth ()).intValue ();\n\t\trez[1] = new Double (resolution.getHeight ()).intValue ();\n\n\t\treturn rez;\n\t}",
"public int resolution()\r\n\t{\r\n\t\treturn resolution;\r\n\t}",
"public void setScale(float scale) {\n setLocalScale(scale);\n }",
"public void scale(float x, float y);",
"protected void setScaleDenominator(double scaleDenominator) {\n this.scaleDenominator = scaleDenominator;\n }",
"public static double[] getDisplayResolution() {\n\t\tjava.awt.Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tdouble width = screenSize.getWidth();\n\t\tdouble height = screenSize.getHeight();\n\t\tdouble[] displayRes = {width, height};\n\t\treturn displayRes;\n\t}",
"int getMaxScale();",
"public String getResolution() {\n return resolution;\n }",
"public String getResolution() {\n return resolution;\n }",
"public double[] setMapBounds(double ulLon, double ulLat, double lrLon, double lrLat)\n/* 154: */ {\n/* 117:182 */ int x_min = 2147483647;\n/* 118:183 */ int y_min = 2147483647;\n/* 119:184 */ int x_max = -2147483648;\n/* 120:185 */ int y_max = -2147483648;\n/* 121:186 */ int mapZoomMax = 20;\n/* 122: */\n/* 123:188 */ x_max = Math.max(x_max, MercatorProj.LonToX(lrLon, mapZoomMax));\n/* 124:189 */ x_max = Math.max(x_max, MercatorProj.LonToX(ulLon, mapZoomMax));\n/* 125:190 */ y_max = Math.max(y_max, MercatorProj.LatToY(ulLat, mapZoomMax));\n/* 126:191 */ y_max = Math.max(y_max, MercatorProj.LatToY(lrLat, mapZoomMax));\n/* 127:192 */ x_min = Math.min(x_min, MercatorProj.LonToX(ulLon, mapZoomMax));\n/* 128:193 */ x_min = Math.min(x_min, MercatorProj.LonToX(lrLon, mapZoomMax));\n/* 129:194 */ y_min = Math.min(y_min, MercatorProj.LatToY(ulLat, mapZoomMax));\n/* 130:195 */ y_min = Math.min(y_min, MercatorProj.LatToY(lrLat, mapZoomMax));\n /* x_max= (int)(Math.max(ulLon,lrLon)*1000000);\n x_min= (int)(Math.min(ulLon,lrLon)*1000000);\n y_max= (int)(Math.max(ulLat,lrLat)*1000000);\n y_min= (int)(Math.min(ulLat,lrLat)*1000000);*/\n/* 134:199 */ int height = Math.max(0, this.mapPanel.getHeight());\n/* 135:200 */ int width = Math.max(0, this.mapPanel.getWidth());\n/* 136:201 */ int newZoom = mapZoomMax;\n/* 137:202 */ int x = x_max - x_min;\n/* 138:203 */ int y = y_max - y_min;\n/* 139:204 */ while ((x > width) || (y > height))\n/* 140: */ {\n/* 141:205 */ newZoom--;\n/* 142:206 */ x >>= 1;\n/* 143:207 */ y >>= 1;\n/* 144: */ }\n/* 145:209 */ x = x_min + (x_max - x_min)/2;\n/* 146:210 */ y = y_min + (y_max - y_min)/2;\n/* 147:211 */ int z = 1 << mapZoomMax - newZoom;\n/* 148:212 */ x /= z;\n/* 149:213 */ y /= z;\n /* int Cx=256;\n int Cy=256;\n //Cx>>=(newZoom);\n //Cy>>=(newZoom);\n double x1=((x*(width/2))/Cx);\n double y1=((y*(height/2))/Cy);\n x=(int) x1;\n y=(int) y1;\n x >>=(newZoom-this.mapPanel.zoom);\n y >>=(newZoom-this.mapPanel.zoom);\n //x = x+156;\n //y = y-137;*/\n x=x/10000;\n y=y/10000;\n /* 150:214 */ this.mapPanel.setZoom(new Point((int)x, (int)y), newZoom);\n double[] res = { this.mapPanel.zoom, this.mapPanel.centerX, this.mapPanel.centerY,x,y, newZoom, z };\n traceln(Arrays.toString(res));\n traceln( x_max+\",\"+x_min+\",\"+y_max+\",\"+y_min+\",x:\"+x+\",y:\"+y+\",z:\"+z+\",nZomm:\"+newZoom);\n // this.mapPanel.getBounds().getX()setBounds( (int)ulLon,(int)ulLat, (int)width,(int)height);\n return res;\n\n/* 167: */ }",
"public final float getScale() {\n\treturn svd(null);\n }",
"private void updateImageScale() {\r\n\t\t//Check which dimension is larger and store it in this variable.\r\n\t\tint numHexLargestDimension = this.numHexRow;\r\n\t\tif (this.totalHexWidth > this.totalHexHeight) {\r\n\t\t\tnumHexLargestDimension = this.numHexCol;\r\n\t\t}\r\n\t\t\r\n\t\tif (numHexLargestDimension < 35) {\r\n\t\t\tif (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 16.5) {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.LARGE;\r\n\t\t\t} else if (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 7){\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.MEDIUM;\r\n\t\t\t} else {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.SMALL;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (numHexLargestDimension < 70) {\r\n\t\t\tif (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 22.2) {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.LARGE;\r\n\t\t\t} else if (this.zoomer.getZoomScale() \r\n\t\t\t\t\t* (this.numHexCol / 2) > 14.5){\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.MEDIUM;\r\n\t\t\t} else {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.SMALL;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (numHexLargestDimension < 105) {\r\n\t\t\tif (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 32.6) {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.LARGE;\r\n\t\t\t} else if (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 21){\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.MEDIUM;\r\n\t\t\t} else {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.SMALL;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 44.4) {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.LARGE;\r\n\t\t\t} else if (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 28){\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.MEDIUM;\r\n\t\t\t} else {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.SMALL;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void scale(double factor);",
"private int getResizedDimension(int maxPrimary, int maxSecondary, int actualPrimary, int actualSecondary) {\n\t\t// If no dominant value at all, just return the actual.\n\t\tif (maxPrimary == 0 && maxSecondary == 0) {\n\t\t\treturn actualPrimary;\n\t\t}\n\t\t// If primary is unspecified, scale primary to match secondary's scaling ratio.\n\t\tif (maxPrimary == 0) {\n\t\t\tdouble ratio = (double) maxSecondary / (double) actualSecondary;\n\t\t\treturn (int) (actualPrimary * ratio);\n\t\t}\n\t\tif (maxSecondary == 0) {\n\t\t\treturn maxPrimary;\n\t\t}\n\t\tdouble ratio = (double) actualSecondary / (double) actualPrimary;\n\t\tint resized = maxPrimary;\n\t\tif (resized * ratio > maxSecondary) {\n\t\t\tresized = (int) (maxSecondary / ratio);\n\t\t}\n\t\treturn resized;\n\t}",
"public Mercator(double refLon, double refLat,\n\t\t\tdouble mPerPixel, double scaleLat,\n\t\t\tint ellipsoid, int range) {\n\t\tthis.ellipsoid = ellipsoid;\n\t\tthis.range = range;\n\t\tinit();\n\t\tthis.refLon = refLon;\n\t\tthis.refLat = refLat;\n\t\tscaleLat = Math.toRadians(scaleLat);\n\t\tdouble m1 = Math.cos(scaleLat);\n\t\tscale = 2. * Math.PI * major[ellipsoid] * m1 / mPerPixel / Math.sqrt( 1 - es * (1-m1*m1) );\n\t\tscale /= 360;\n\t\tscaleY = Math.toDegrees(scale);\n\t\trefY = 0;\n\t\tif( refLat!=0 )refY = getY(refLat)/scaleY;\n\t}",
"private void calculateBasicRatio() {\n if (mLastZoomRatio == DEFAULT_VALUE) {\n if(isAngleCamera()){\n mBasicZoomRatio = 1.6f;\n }else{\n mBasicZoomRatio = ZOOM_UNSUPPORTED_DEFAULT_VALUE;\n }\n } else {\n mBasicZoomRatio = mLastZoomRatio;\n }\n //modify by bv liangchangwei for fixbug 3518\n }",
"public void setScale(float scale) {\n this.scale = scale;\n }",
"public void updateBaseDisplayMetrics(int baseWidth, int baseHeight, int baseDensity) {\n int i;\n if (baseDensity == 0) {\n Slog.e(TAG, \"density is 0\", new Exception());\n }\n if (HwActivityTaskManager.isCastDisplay(getDisplay().getUniqueId(), \"padCast\")) {\n DisplayContent defaultDisplayContent = this.mWmService.getDefaultDisplayContentLocked();\n int defaultDisplayWidth = 0;\n int defaultDisplayHeight = 0;\n if (defaultDisplayContent != null) {\n defaultDisplayWidth = defaultDisplayContent.mBaseDisplayWidth;\n defaultDisplayHeight = defaultDisplayContent.mBaseDisplayHeight;\n }\n float defaultRatio2 = 0.0f;\n float baseRatio = baseWidth != 0 ? ((float) baseHeight) / ((float) baseWidth) : 0.0f;\n float defaultRatio1 = defaultDisplayWidth != 0 ? ((float) defaultDisplayHeight) / ((float) defaultDisplayWidth) : 0.0f;\n if (defaultDisplayHeight != 0) {\n defaultRatio2 = ((float) defaultDisplayWidth) / ((float) defaultDisplayHeight);\n }\n if (Math.abs(baseRatio - defaultRatio1) <= 0.001f || Math.abs(baseRatio - defaultRatio2) <= 0.001f) {\n this.mRotation = 0;\n } else {\n baseWidth = baseHeight;\n baseHeight = baseWidth;\n this.mRotation = 1;\n }\n }\n this.mBaseDisplayWidth = baseWidth;\n this.mBaseDisplayHeight = baseHeight;\n this.mBaseDisplayDensity = baseDensity;\n int i2 = this.mMaxUiWidth;\n if (i2 > 0 && (i = this.mBaseDisplayWidth) > i2) {\n this.mBaseDisplayHeight = (this.mBaseDisplayHeight * i2) / i;\n this.mBaseDisplayDensity = (this.mBaseDisplayDensity * i2) / i;\n this.mBaseDisplayWidth = i2;\n if (WindowManagerDebugConfig.DEBUG_DISPLAY) {\n Slog.v(TAG, \"Applying config restraints:\" + this.mBaseDisplayWidth + \"x\" + this.mBaseDisplayHeight + \" at density:\" + this.mBaseDisplayDensity + \" on display:\" + getDisplayId());\n }\n }\n this.mBaseDisplayRect.set(0, 0, this.mBaseDisplayWidth, this.mBaseDisplayHeight);\n updateBounds();\n this.mDisplayCutoutCache.clearCacheTable();\n }",
"public static List<Float> getPhysicalDimensions(String slideRef, String... varargs) {\n\t\t// setting the default value when arguments' value is omitted\n\t\tString sessionID = varargs.length > 0 ? varargs[0] : null;\n\t\t// Determine the physical dimensions of the sample represented by the slide.\n\t\t// This is independent of the zoom level: the physical properties don't change\n\t\t// because the magnification changes\n\t\tList<Float> ppmData = getPixelsPerMicrometer(slideRef, sessionID);\n\t\tList<Integer> pixelSz = getPixelDimensions(slideRef, sessionID);\n\t\tList<Float> result = new ArrayList<>();\n\t\tresult.add(pixelSz.get(0) * ppmData.get(0));\n\t\tresult.add(pixelSz.get(1) * ppmData.get(1));\n\t\treturn result;\n\t}",
"public void setScaleFactor(float scaleFactor) {\n\t\ttrueCoreRadius *= scaleFactor;\n\t\ttruePetalRadius *= scaleFactor;\n\t\tcoreRadius = (int) trueCoreRadius;\n\t\tpetalRadius = (int) truePetalRadius;\n\t\tthis.scaleFactor *= scaleFactor;\n\t}",
"public ImageScale getScale() {\n return this.scale;\n }",
"public Resolution getResolution() {\n return resolution;\n }",
"public void setResolution(int value) {\n this.resolution = value;\n }",
"short getVResolution();",
"public void scale(double s);",
"public void scale(Vector center, float degree);",
"public void scale(double sx, double sy)\r\n\t{\r\n\t\t// System.out.println(\"scale\");\r\n\t}",
"public DimensionTypeBuilder coordScale(float coordinateScale) {\n this.coordinateScale = coordinateScale;\n return this;\n }",
"protected void zoomToScale(float scale) {\n \t\tif (tweening) {\n \t\t\tscaleIntegrator.target(scale);\n \t\t} else {\n \t\t\tmapDisplay.sc = scale;\n \t\t\t// Also update Integrator to support correct tweening after switch\n \t\t\tscaleIntegrator.target(scale);\n \t\t\tscaleIntegrator.set(scale);\n \t\t}\n \t}",
"public static OperableDiscreteDoubleMap2D<DiscreteRectangle> getDiscreteDiracMap(int resolution) {\r\n\t\tDiscreteDoubleMap2D startMap = DiscreteDoubleMap2D.ifThenElse((x, y) -> x == resolution / 4 && y == resolution / 2, DiscreteDoubleMap2D.ofConstant(1), DiscreteDoubleMap2D.ZERO);\r\n\t\treturn startMap.asOperable(new BaseSquare(resolution));\r\n\t}",
"public String getParamScale() {\n return paramScale;\n }",
"public Scale getScale() {\n return this.scale;\n }",
"public void setScale(Scale scale) {\n this.scale = scale;\n }",
"public Configuration getScale() {\n return scale;\n }",
"public float getScale() {\n\t\treturn getLifeStageHelper().getScale();\n\t}",
"int getScaleCount();"
] |
[
"0.70388955",
"0.589891",
"0.5882139",
"0.58459103",
"0.5829314",
"0.5705644",
"0.56869435",
"0.5682296",
"0.56021976",
"0.5517623",
"0.54503083",
"0.542935",
"0.5403588",
"0.5387282",
"0.53716147",
"0.53716147",
"0.5371301",
"0.5363828",
"0.53540534",
"0.53513867",
"0.53320694",
"0.53296626",
"0.531671",
"0.53010815",
"0.52911955",
"0.5281157",
"0.52770245",
"0.5272953",
"0.5264163",
"0.5238704",
"0.5238053",
"0.5233533",
"0.52306706",
"0.522674",
"0.519962",
"0.51988626",
"0.5198062",
"0.519446",
"0.5194308",
"0.51810265",
"0.5179762",
"0.5175661",
"0.51715904",
"0.51610386",
"0.51564103",
"0.51526046",
"0.5151349",
"0.51513016",
"0.5109664",
"0.5105805",
"0.51020527",
"0.5101722",
"0.50887215",
"0.5079236",
"0.5077678",
"0.5076894",
"0.5070436",
"0.5059035",
"0.5052115",
"0.5049269",
"0.50467443",
"0.50460005",
"0.50412077",
"0.50367373",
"0.50147164",
"0.5012879",
"0.49969238",
"0.4988423",
"0.4988035",
"0.49868262",
"0.49854442",
"0.49643257",
"0.49643257",
"0.4960613",
"0.49592686",
"0.49576294",
"0.49451038",
"0.49321437",
"0.49219015",
"0.4916237",
"0.49078745",
"0.4902468",
"0.48932368",
"0.48900065",
"0.48839328",
"0.4881436",
"0.48693046",
"0.48650965",
"0.48534748",
"0.48454028",
"0.48254165",
"0.48243403",
"0.48225984",
"0.48220924",
"0.48195872",
"0.48183393",
"0.48164892",
"0.4812615",
"0.48049933",
"0.47908148"
] |
0.71662784
|
0
|
Calculates the resolution (world units / pixel) for the given scale denominator (1 / map scale) and unit system.
|
public static double calcResolution( double scaleDenominator, IUnit units ) {
if ( units.equals( METRE ) ) {
return calcMetricResFromScale( scaleDenominator );
} else if ( units.equals( DEGREE ) ) {
return calcDegreeResFromScale( scaleDenominator );
}
String msg = "Unhandled unit type: " + units
+ ". Conversion from scale denominator to resolution not implemented";
throw new IllegalArgumentException( msg );
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static double calcResolution( double scaleDenominator, ICRS crs ) {\n IUnit units = crs.getAxis()[0].getUnits();\n return calcResolution( scaleDenominator, units );\n }",
"private double resolution(int zoom) {\n\t\treturn this.initialResolution / (Math.pow(2, zoom));\r\n\t}",
"public float getMetersPerPixel(float scale) {\r\n\t\treturn scale;\r\n\t}",
"public float getEqualizationScale() {\n return Gdx.graphics.getWidth() / WE.getCurrentConfig().getRenderResolutionWidth();\n }",
"public void updateScale()\n {\n // get scale from world presenter\n s2 = (cam.getScale());\n //Convert to English Miles if appropriate\n if( !SettingsScreen.getUnits() ) s2 *= 0.60934;\n s1 = s2/2;\n repaint();\n }",
"public float getScale();",
"int getScale();",
"public final Vector2f getResolution() {\r\n return settings.getResolution();\r\n }",
"private int getScale(){\n Display display = ((WindowManager) Objects.requireNonNull(getContext())\n .getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();\n\n int width = display.getWidth();\n Double val = (double) width / 360d;\n val = val * 100d;\n return val.intValue();\n }",
"public float getGlobalScale() {\n // per convenzione se la scala deve essere su tutti e tre gli assi\n // allora si considera scale.x() per tutti gli assi\n return (float) scale.x();\n }",
"public Integer getScale() {\n return _scale;\n }",
"public Integer getScale() {\n return _scale;\n }",
"ScaleType getScale();",
"public double getScale(\n )\n {return scale;}",
"public int getScale() {\r\n return scale;\r\n }",
"public native void setUnits(int resolutionType) throws MagickException;",
"public native int getUnits() throws MagickException;",
"public float getScale() {\n \t\treturn scale;\n \t}",
"public Vector2 getDrawScale() {\n \tscaleCache.set(drawScale);\n \treturn scaleCache; \n }",
"public short getResolutionUnit()\r\n\t{\r\n\t\treturn super.getShort(0);\r\n\t}",
"public static List<Float> getPixelsPerMicrometer(String slideRef, Object... varargs) {\n\t\t// setting the default values when arguments' values are omitted\n\t\tInteger zoomLevel = null;\n\t\tString sessionID = null;\n\t\tif (varargs.length > 0) {\n\t\t\tif (!(varargs[0] instanceof Integer) && varargs[0] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getZoomLevelsDict() : Invalid argument\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"...\");\n\t\t\t}\n\t\t\tzoomLevel = (Integer) varargs[0];\n\t\t}\n\t\tif (varargs.length > 1) {\n\t\t\tif (!(varargs[1] instanceof String) && varargs[1] != null) {\n\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\tPMA.logger.severe(\"getZoomLevelsDict() : Invalid argument\");\n\t\t\t\t}\n\t\t\t\tthrow new IllegalArgumentException(\"...\");\n\t\t\t}\n\t\t\tsessionID = (String) varargs[1];\n\t\t}\n\t\t// Retrieve the physical dimension in terms of pixels per micrometer.\n\t\t// When zoom level is left to its default value of None, dimensions at the\n\t\t// highest zoom level are returned\n\t\t// (in effect returning the \"native\" resolution at which the slide was\n\t\t// registered)\n\t\tint maxZoomLevel = getMaxZoomLevel(slideRef, sessionID);\n\t\tMap<String, Object> info = getSlideInfo(slideRef, sessionID);\n\t\tfloat xppm = (float) info.get(\"MicrometresPerPixelX\");\n\t\tfloat yppm = (float) info.get(\"MicrometresPerPixelY\");\n\t\tList<Float> result = new ArrayList<>();\n\t\tif ((zoomLevel == null) || (zoomLevel == maxZoomLevel)) {\n\t\t\tresult.add(xppm);\n\t\t\tresult.add(yppm);\n\t\t\treturn result;\n\t\t} else {\n\t\t\tdouble factor = Math.pow(2, zoomLevel - maxZoomLevel);\n\t\t\tresult.add((float) (xppm / factor));\n\t\t\tresult.add((float) (yppm / factor));\n\t\t\treturn result;\n\t\t}\n\t}",
"public void setResolution(Size resolution, long scale) {\n\t\tAssert.assertNotNull(resolution);\n\n\t\tJWLC.nativeHandler().wlc_output_set_resolution(this.to(),\n\t\t\t\tresolution.to(), Utils.getAsUnsignedInt(scale));\n\t}",
"public float getDscale() {\r\n\t\treturn dscale;\r\n\t}",
"public double getScale() {\r\n return scale;\r\n }",
"public double getScale() {\n return scale;\n }",
"protected void setScaleDenominator(double scaleDenominator) {\n this.scaleDenominator = scaleDenominator;\n }",
"public double getScale() {\n\t\treturn disp.getScale();\n\t}",
"public float getScale()\n\t{\n\t\treturn scale;\n\t}",
"public double getScale() {\n return this.scale;\n }",
"public float getResolution() {\n return resolution;\n }",
"public double getScale(){\n\t\treturn scale;\n\t}",
"public double getScale() {\r\n\t\treturn scale;\r\n\t}",
"public double getResolution() {\n return resolution;\n }",
"public void setScaleFactor(float scale){\n scaleFactor = scale;\n }",
"public float getScale() {\n\t\treturn scale;\n\t}",
"public double getScale() {\n return scale;\n }",
"public int getScale() {\n return scale_;\n }",
"public int getResolution() {\n return resolution;\n }",
"public final float getScale() {\n\treturn svd(null);\n }",
"public float getScale() {\n return this.scale;\n }",
"public int getByproductScaled(int scale)\n {\n return this.byproduct.getFluidAmount() * scale / TOTAL_BYPRODUCT_SPACE;\n }",
"void scale(double factor);",
"int getWrongScale();",
"public int zoom() {\n double sizex = scale * getWidth();\n double sizey = scale * getHeight();\n for (int zoom = 0; zoom <= 32; zoom++, sizex *= 2, sizey *= 2)\n if (sizex > world.east() || sizey > world.north())\n return zoom;\n return 32;\n }",
"public static double[] getDisplayResolution() {\n\t\tjava.awt.Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tdouble width = screenSize.getWidth();\n\t\tdouble height = screenSize.getHeight();\n\t\tdouble[] displayRes = {width, height};\n\t\treturn displayRes;\n\t}",
"float getCostScale();",
"@Override\n public float getScale() {\n return scale;\n }",
"public void scale(float scale, float scale2) {\n\t\t\n\t}",
"private void computeRatio() {\n int i;\n int i2;\n int i3;\n boolean z = false;\n if (CameraSettings.getStrictAspectRatio(this.mRenderWidth, this.mRenderHeight) > -1 || !CameraSettings.isNearAspectRatio(this.mCameraWidth, this.mCameraHeight, this.mRenderWidth, this.mRenderHeight)) {\n int i4 = this.mCameraWidth;\n int i5 = this.mCameraHeight;\n switch (this.mTargetRatio) {\n case 0:\n this.mIsFullScreen = false;\n this.mIsRatio16_9 = false;\n if (!CameraSettings.isAspectRatio4_3(i4, i5)) {\n this.mNeedCropped = true;\n if (i4 * 4 > i5 * 3) {\n int i6 = (int) (((float) i5) * 0.75f);\n this.mScaleX = ((float) i6) / ((float) i4);\n i4 = i6;\n } else {\n int i7 = (int) ((((float) i4) * 4.0f) / 3.0f);\n this.mScaleY = ((float) i7) / ((float) i5);\n i5 = i7;\n }\n } else {\n this.mNeedCropped = false;\n this.mScaleX = 1.0f;\n this.mScaleY = 1.0f;\n }\n if (CameraSettings.sCroppedIfNeeded) {\n this.mIsFullScreen = true;\n this.mNeedCropped = true;\n this.mIsRatio16_9 = true;\n i = (int) ((((float) i4) * 16.0f) / 9.0f);\n this.mScaleX *= 0.75f;\n } else {\n i = i5;\n }\n if (b.isPad()) {\n this.mIsFullScreen = true;\n break;\n }\n break;\n case 1:\n this.mIsRatio16_9 = true;\n this.mIsFullScreen = true;\n if (!CameraSettings.isAspectRatio16_9(i4, i5)) {\n this.mNeedCropped = true;\n if (i4 * 16 <= i5 * 9) {\n int i8 = (int) ((((float) i4) * 16.0f) / 9.0f);\n this.mScaleY = ((float) i8) / ((float) i5);\n int i9 = i8;\n i2 = i4;\n i3 = i9;\n if (b.isPad()) {\n this.mIsRatio16_9 = false;\n this.mNeedCropped = true;\n i3 = (int) (((float) i3) * 0.75f);\n this.mScaleY *= 0.75f;\n }\n i = i3;\n i4 = i2;\n break;\n } else {\n i2 = (int) ((((float) i5) * 9.0f) / 16.0f);\n this.mScaleX = ((float) i2) / ((float) i4);\n }\n } else {\n this.mNeedCropped = false;\n this.mScaleX = 1.0f;\n this.mScaleY = 1.0f;\n i2 = i4;\n }\n i3 = i5;\n if (b.isPad()) {\n }\n i = i3;\n i4 = i2;\n case 2:\n this.mIsFullScreen = false;\n this.mIsRatio16_9 = false;\n this.mNeedCropped = true;\n if (i4 != i5) {\n this.mScaleX = 1.0f;\n this.mScaleY = ((float) i4) / ((float) i5);\n i = i4;\n break;\n }\n default:\n i = i5;\n break;\n }\n this.mWidth = i4;\n this.mHeight = i;\n } else if (!(this.mCameraWidth == 0 || this.mCameraHeight == 0)) {\n if (this.mRenderWidth == 0 || this.mRenderHeight == 0 || this.mRenderWidth * this.mCameraHeight == this.mRenderHeight * this.mCameraWidth) {\n this.mNeedCropped = false;\n this.mScaleX = 1.0f;\n this.mScaleY = 1.0f;\n this.mWidth = this.mCameraWidth;\n this.mHeight = this.mCameraHeight;\n } else {\n this.mNeedCropped = true;\n if (this.mCameraWidth * this.mRenderHeight > this.mCameraHeight * this.mRenderWidth) {\n this.mHeight = this.mCameraHeight;\n this.mWidth = (this.mCameraHeight * this.mRenderWidth) / this.mRenderHeight;\n this.mScaleX = ((float) this.mWidth) / ((float) this.mCameraWidth);\n this.mScaleY = 1.0f;\n } else {\n this.mWidth = this.mCameraWidth;\n this.mHeight = (this.mCameraWidth * this.mRenderHeight) / this.mRenderWidth;\n this.mScaleX = 1.0f;\n this.mScaleY = ((float) this.mHeight) / ((float) this.mCameraHeight);\n }\n }\n if ((((float) this.mRenderHeight) / ((float) this.mRenderWidth)) - (((float) Util.sWindowHeight) / ((float) Util.sWindowWidth)) < 0.1f) {\n z = true;\n }\n this.mIsFullScreen = z;\n }\n updateRenderSize();\n updateRenderRect();\n }",
"public int getScale(){\n return scale;\n }",
"public void setScale(float scale);",
"public double resolution(final Slit slit, final double imgQuality) {\n return resolution(slit);\n }",
"public String getParamScale() {\n return paramScale;\n }",
"public void setScale(float scale) {\n setLocalScale(scale);\n }",
"public void scale(double s);",
"private float aspect_correct_scale_for_rect(float screen[], float rect[]) {\n\t\tfloat screenAspect = screen[0] / screen[1];\n\t\tfloat rectAspect = rect[0] / rect[1];\n\n\t\tfloat scaleFactor;\n\t\tif (screenAspect > rectAspect)\n\t\t\tscaleFactor = screen[1] / rect[1];\n\t\telse\n\t\t\tscaleFactor = screen[0] / rect[0];\n\n\t\treturn scaleFactor;\n\t}",
"public double resolution(final Slit slit) {\n return getEffectiveWavelength() / resolution.get(getGrismNumber());\n }",
"short getHResolution();",
"public void setScale(float scale) {\n this.scale = scale;\n }",
"int getRadiusUnitsValue();",
"private void computeDimensions(int bitResolution) {\n\t\tint dimension = (int) Math.round(Math.sqrt(bitResolution + 1));\n\n\t\t// width //height\n\t\tint normalBound = (dimension - 1) * (dimension);\n\t\tint higherBound = (dimension - 1) * (dimension + 1);\n\n\t\tthis.width = dimension;\n\t\tthis.height = dimension;\n\n\t\tif (higherBound < bitResolution) {\n\t\t\tthis.width++;\n\t\t\tthis.height++;\n\t\t} else {\n\t\t\tif (normalBound < bitResolution || (normalBound - bitResolution) > (higherBound - bitResolution)) {\n\t\t\t\tthis.height++;\n\t\t\t}\n\t\t}\n\n\t}",
"static int[] getResolution ()\n\t{\n\t\t//get the Toolkit of this instance\n\t\tToolkit tk = Toolkit.getDefaultToolkit ();\n\t\t\n\t\t//get the screen size as Dimension object\n\t\tDimension resolution = tk.getScreenSize ();\n\n\t\tint[] rez = new int[2];\n\n\t\t//extract integers from that Dimension object\n\t\trez[0] = new Double (resolution.getWidth ()).intValue ();\n\t\trez[1] = new Double (resolution.getHeight ()).intValue ();\n\n\t\treturn rez;\n\t}",
"int getHorizontalResolution();",
"public void setScaleFactor(float scaleFactor) {\n\t\ttrueCoreRadius *= scaleFactor;\n\t\ttruePetalRadius *= scaleFactor;\n\t\tcoreRadius = (int) trueCoreRadius;\n\t\tpetalRadius = (int) truePetalRadius;\n\t\tthis.scaleFactor *= scaleFactor;\n\t}",
"public void scale(float scale) {\n if (scale != 1.0f) {\n left = (int) (left * scale + 0.5f);\n top = (int) (top * scale + 0.5f);\n right = (int) (right * scale + 0.5f);\n bottom = (int) (bottom * scale + 0.5f);\n }\n }",
"public int getResolution() {\n return this.resolution;\n }",
"private void updateImageScale() {\r\n\t\t//Check which dimension is larger and store it in this variable.\r\n\t\tint numHexLargestDimension = this.numHexRow;\r\n\t\tif (this.totalHexWidth > this.totalHexHeight) {\r\n\t\t\tnumHexLargestDimension = this.numHexCol;\r\n\t\t}\r\n\t\t\r\n\t\tif (numHexLargestDimension < 35) {\r\n\t\t\tif (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 16.5) {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.LARGE;\r\n\t\t\t} else if (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 7){\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.MEDIUM;\r\n\t\t\t} else {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.SMALL;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (numHexLargestDimension < 70) {\r\n\t\t\tif (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 22.2) {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.LARGE;\r\n\t\t\t} else if (this.zoomer.getZoomScale() \r\n\t\t\t\t\t* (this.numHexCol / 2) > 14.5){\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.MEDIUM;\r\n\t\t\t} else {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.SMALL;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (numHexLargestDimension < 105) {\r\n\t\t\tif (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 32.6) {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.LARGE;\r\n\t\t\t} else if (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 21){\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.MEDIUM;\r\n\t\t\t} else {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.SMALL;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 44.4) {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.LARGE;\r\n\t\t\t} else if (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 28){\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.MEDIUM;\r\n\t\t\t} else {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.SMALL;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public ImageScale getScale() {\n return this.scale;\n }",
"public static Resolution convertDisplayModeToResolution(DisplayMode m){\n\t\treturn new Resolution(m.getWidth(),m.getHeight());\n\t}",
"public void zoomScale(double scaleDelta) {\n \t\tzoomToScale((float) (mapDisplay.sc * scaleDelta));\n \t}",
"public Scale getScale() {\n return this.scale;\n }",
"public float centimetresToGridUnits(float cm);",
"public short getUnitsPerEm() throws PDFNetException {\n/* 843 */ return GetUnitsPerEm(this.a);\n/* */ }",
"public void updateBaseDisplayMetrics(int baseWidth, int baseHeight, int baseDensity) {\n int i;\n if (baseDensity == 0) {\n Slog.e(TAG, \"density is 0\", new Exception());\n }\n if (HwActivityTaskManager.isCastDisplay(getDisplay().getUniqueId(), \"padCast\")) {\n DisplayContent defaultDisplayContent = this.mWmService.getDefaultDisplayContentLocked();\n int defaultDisplayWidth = 0;\n int defaultDisplayHeight = 0;\n if (defaultDisplayContent != null) {\n defaultDisplayWidth = defaultDisplayContent.mBaseDisplayWidth;\n defaultDisplayHeight = defaultDisplayContent.mBaseDisplayHeight;\n }\n float defaultRatio2 = 0.0f;\n float baseRatio = baseWidth != 0 ? ((float) baseHeight) / ((float) baseWidth) : 0.0f;\n float defaultRatio1 = defaultDisplayWidth != 0 ? ((float) defaultDisplayHeight) / ((float) defaultDisplayWidth) : 0.0f;\n if (defaultDisplayHeight != 0) {\n defaultRatio2 = ((float) defaultDisplayWidth) / ((float) defaultDisplayHeight);\n }\n if (Math.abs(baseRatio - defaultRatio1) <= 0.001f || Math.abs(baseRatio - defaultRatio2) <= 0.001f) {\n this.mRotation = 0;\n } else {\n baseWidth = baseHeight;\n baseHeight = baseWidth;\n this.mRotation = 1;\n }\n }\n this.mBaseDisplayWidth = baseWidth;\n this.mBaseDisplayHeight = baseHeight;\n this.mBaseDisplayDensity = baseDensity;\n int i2 = this.mMaxUiWidth;\n if (i2 > 0 && (i = this.mBaseDisplayWidth) > i2) {\n this.mBaseDisplayHeight = (this.mBaseDisplayHeight * i2) / i;\n this.mBaseDisplayDensity = (this.mBaseDisplayDensity * i2) / i;\n this.mBaseDisplayWidth = i2;\n if (WindowManagerDebugConfig.DEBUG_DISPLAY) {\n Slog.v(TAG, \"Applying config restraints:\" + this.mBaseDisplayWidth + \"x\" + this.mBaseDisplayHeight + \" at density:\" + this.mBaseDisplayDensity + \" on display:\" + getDisplayId());\n }\n }\n this.mBaseDisplayRect.set(0, 0, this.mBaseDisplayWidth, this.mBaseDisplayHeight);\n updateBounds();\n this.mDisplayCutoutCache.clearCacheTable();\n }",
"public static int computeSampleSizeLarger(float scale) {\n int initialSize = (int) Math.floor(1f / scale);\n if (initialSize <= 1) return 1;\n\n return initialSize <= 8\n ? Utils.prevPowerOf2(initialSize)\n : initialSize / 8 * 8;\n }",
"public static int computeSampleSize(float scale) {\n Utils.assertTrue(scale > 0);\n int initialSize = Math.max(1, (int) FloatMath.ceil(1 / scale));\n \n return initialSize <= 8\n ? Utils.nextPowerOf2(initialSize)\n : (initialSize + 7) / 8 * 8;\n }",
"int getMaxScale();",
"public native double getYResolution() throws MagickException;",
"public static int computeSampleSizeLarger(float scale) {\n int initialSize = (int) FloatMath.floor(1f / scale);\n if (initialSize <= 1) return 1;\n\n return initialSize <= 8\n ? Utils.prevPowerOf2(initialSize)\n : initialSize / 8 * 8;\n }",
"public void setScale(Scale scale) {\n this.scale = scale;\n }",
"public String getResolution() {\n return resolution;\n }",
"public String getResolution() {\n return resolution;\n }",
"private void calculateBasicRatio() {\n if (mLastZoomRatio == DEFAULT_VALUE) {\n if(isAngleCamera()){\n mBasicZoomRatio = 1.6f;\n }else{\n mBasicZoomRatio = ZOOM_UNSUPPORTED_DEFAULT_VALUE;\n }\n } else {\n mBasicZoomRatio = mLastZoomRatio;\n }\n //modify by bv liangchangwei for fixbug 3518\n }",
"public double dimensionsToMeters() {\n\t\tdouble heightMeters = heightInInches / 39.370;\n\t\tdouble widthMeters = widthInInches / 39.370;\n\n\t\treturn areaInMeters = heightMeters * widthMeters;\n\t}",
"BigInteger getResolution();",
"short getVResolution();",
"private int scale(final int pixel, final int scale) {\n \t\treturn scale * (4 - pixel);\n \t}",
"public Configuration getScale() {\n return scale;\n }",
"public float getScale(int xform) {\n\t\treturn m_xforms[xform].m_scale * m_xforms[xform].m_dscale;\n\t}",
"public int xPixScale( double x ) { return (int)(width / xRange * x); }",
"public float getScale() {\n\t\treturn getLifeStageHelper().getScale();\n\t}",
"public double getAsDpi() {\n\t\tif (units != 1 || pixelsxUnitX != pixelsxUnitY)\n\t\t\treturn -1;\n\t\treturn ((double) pixelsxUnitX) * 0.0254;\n\t}",
"public TempScale getOutputScale() {return outputScale;}",
"public void setScale( float scale ) {\n\t\tthis.scale = scale;\n\t}",
"@Override\n\tpublic Dimension getResolution() {\n\t\treturn null;\n\t}",
"public void setScale(double s){\n\t\tsetParameters(location, s);\n\t}",
"public void scale(double sx, double sy)\r\n\t{\r\n\t\t// System.out.println(\"scale\");\r\n\t}",
"public double getScale(int target_w, int target_h){\n\t\tint w = this.w + this.padding_left + this.padding_right;\n\t\tint h = this.h + this.padding_top + this.padding_bottom;\n\t\treturn Math.min((double)target_w/w, (double)target_h/h);\n\t}",
"public int getScaleValue() {\r\n return ScaleValue;\r\n }",
"public static double computeScale(Segment2 s1, Segment2 s2) {\n Tuple2 u = new Tuple2(s1);\n Tuple2 v = new Tuple2(s2);\n double k;\n double lu = u.getEuclidianDistance();\n if (Math.abs(lu) < 0.00001) return 1.0; // TODO : pas terrible, mais correspond à l'identité.\n else return v.getEuclidianDistance() / u.getEuclidianDistance();\n }"
] |
[
"0.74288976",
"0.6231796",
"0.6200341",
"0.6111364",
"0.6059767",
"0.59216195",
"0.5895858",
"0.5768643",
"0.57558626",
"0.57542354",
"0.5696888",
"0.5696888",
"0.5680074",
"0.5670274",
"0.5625611",
"0.5621779",
"0.56181836",
"0.5604833",
"0.5597159",
"0.5594446",
"0.5592226",
"0.55888665",
"0.55710775",
"0.55656165",
"0.55606914",
"0.5514729",
"0.55109584",
"0.55070686",
"0.5500136",
"0.5497403",
"0.5492128",
"0.54913336",
"0.5483852",
"0.54778",
"0.5473321",
"0.5465066",
"0.54401577",
"0.5435777",
"0.5383888",
"0.5376488",
"0.53241634",
"0.5318185",
"0.5303341",
"0.5298239",
"0.529568",
"0.528588",
"0.52847165",
"0.5279322",
"0.5278819",
"0.52706146",
"0.526318",
"0.5258092",
"0.52070576",
"0.51980275",
"0.5194905",
"0.5183449",
"0.51818126",
"0.5166806",
"0.5160482",
"0.5150817",
"0.51493055",
"0.5146904",
"0.51447785",
"0.51352185",
"0.5129508",
"0.51229453",
"0.5114885",
"0.51133734",
"0.51086414",
"0.51075315",
"0.5101022",
"0.5092689",
"0.5072861",
"0.5061933",
"0.5059599",
"0.5053415",
"0.5045915",
"0.5045601",
"0.50446343",
"0.5043515",
"0.50431496",
"0.50431496",
"0.503418",
"0.5024983",
"0.5023673",
"0.50221455",
"0.50076884",
"0.5007567",
"0.49927202",
"0.498286",
"0.49676326",
"0.49659622",
"0.49638844",
"0.4963584",
"0.49554655",
"0.49546614",
"0.49501222",
"0.49401307",
"0.4926426",
"0.49156597"
] |
0.77727014
|
0
|
glisse le message dans la photo
|
public static ImagePNG encodage(ImagePNG imagePNG, ArrayList<Integer> messageBinaire) {
if (messageBinaire.size() >= imagePNG.getWidth() * imagePNG.getHeight()) {
JOptionPane.showMessageDialog(null, "Le message est trop long");
return imagePNG.copy();
}
ImagePNG copy = imagePNG.copy();
int cle = 1;
int compteur = 0;
for (int i = 0; i < messageBinaire.size(); i++) {
int message = messageBinaire.get(i);
int valeurEntierePixelModifiee = ((copy.getImage()[compteur / imagePNG.getHeight()][compteur % imagePNG.getHeight()].getValeurEntierePixel() >> 1) << 1);
copy.getImage()[compteur / imagePNG.getHeight()][compteur % imagePNG.getHeight()]
.setValeurEntierePixel(valeurEntierePixelModifiee | message);
compteur++;
}
return copy;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public abstract void photoMessage(Message m);",
"public abstract void newChatPhotoMessage(Message m);",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tswitch (msg.what){\n\t\t\tcase 0:\n \tBitmap bmp = null;\n \tbmp = Bitmap.createBitmap( mface.cols(), mface.rows(), Bitmap.Config.ARGB_8888);\n \tUtils.matToBitmap(mface, bmp);\n \tmFaceView.setImageBitmap(bmp);\n \tmFaceView.invalidate();\n \tmFaceView.setVisibility(View.VISIBLE);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tString id = (String)(msg.obj);\n\t\t\t\tmTextView.setText(\" 姓 名:\" + id);\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.putExtra(INTENT_PATH_DATA, id+\".jpg\");\n\t\t\t\tLog.i(TAG, \"handleMessage id\" + id);\n\t\t\t\tFrActivity.this.setResult(Activity.RESULT_OK, intent);\n\t\t\t\tFrActivity.this.finish();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"@Override\n public void handleMessage(Message msg) {\n super.handleMessage(msg);\n if(msg.what == 0){\n setImageBitmap((Bitmap)msg.obj);\n }\n }",
"@Override\n public void run() {\n Bitmap bmp = getURLimage(imageUrl);\n Message msg = new Message();\n msg.what = 0;\n msg.obj = bmp;\n handle.sendMessage(msg);\n }",
"public void afficherMessage();",
"public static void posterMessage(Message message, User utilisateurCible){\r\n User utilisateur = message.getAuthor();\r\n if (utilisateur.enRelationAvec(utilisateurCible)){\r\n Wall mur = utilisateurCible.getWall();\r\n mur.ajouterMessage(message); \r\n message.setWall(mur);\r\n } else{\r\n \r\n System.out.println(\"Impossible d'écrire sur le mur d'un inconnu\");\r\n }\r\n }",
"private void setContent (Message message) {\n String content = \"\";\n try {\n if (message.getContent() instanceof String) {\n content = (String) message.getContent();\n msgContent.setText(content);\n } else if (message.isMimeType(\"multipart/*\")) {\n Multipart multipart = (Multipart) message.getContent();\n if (multipart.getCount() > 0) {\n int i;\n for (i = 0; i < multipart.getCount(); i++) {\n content += multipart.getBodyPart(i).getContent().toString();\n }\n msgContent.setText(content);\n }\n } else {\n msgContent.setText(\"This message is in an unsupported format.\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n } catch (MessagingException e) {\n e.printStackTrace();\n }\n\n }",
"public void savePhoto() {\n\n\t\tFacesMessage msg = new FacesMessage();\n\n\t\tSystem.err.println(\"save photo: url----------\" + url);\n\n\t\ttry {\n\n\t\t\t// if not uploading file\n\t\t\tif (url == null || url.equals(\"null\") || url.isEmpty()) {\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_WARN);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_warn_info\") + \": \"\n\t\t\t\t\t\t+ bundleDocument.getString(\"document_warn_charge_photo\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.err.println(\"etudiantid:\" + this.dossierEtudiantId);\n\n\t\t\tif (this.dossierEtudiantId == null || this.dossierEtudiantId.equals(\"null\")\n\t\t\t\t\t|| this.dossierEtudiantId.isEmpty()) {\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_WARN);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_error_passage_parametres_photo\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tdossierEtudiantDto = dossierEtudiantService.findById(Integer.parseInt(dossierEtudiantId));\n\n\t\t\tDossierEtudiantDto oldDossierEtudiant = dossierEtudiantService\n\t\t\t\t\t.findById(Integer.parseInt(dossierEtudiantId));\n\n\t\t\tif (oldDossierEtudiant.getPhoto() == null || oldDossierEtudiant.getPhoto().trim().isEmpty()) {\n\n\t\t\t\tdossierEtudiantDto.setPhoto(url);\n\t\t\t\tdossierEtudiantService.insertOrUpdate(dossierEtudiantDto);\n\t\t\t\tSystem.out.println(\"--------oldDossierEtudiant---------->>>\" + url);\n\t\t\t\tmoveFile(url);\n\t\t\t\tSystem.err.println(\"-----------------file moved------\");\n\t\t\t\t// deleteTempFileByName(url);// probleme en ours d'utilisation\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_INFO);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_msg_success\") + \": \"\n\t\t\t\t\t\t+ bundleDocument.getString(\"document_msg_success_photo_saved\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tif (!oldDossierEtudiant.getPhoto().equals(url)) {\n\n\t\t\t\t// String oldUrl = oldDossierEtudiant.getPhoto();\n\n\t\t\t\tdossierEtudiantDto.setPhoto(url);\n\t\t\t\tdossierEtudiantService.insertOrUpdate(dossierEtudiantDto);\n\t\t\t\tSystem.out.println(\"-------------------->>>\" + url);\n\t\t\t\tmoveFile(url);\n\n\t\t\t\t// deleteFileByName(oldUrl);// probleme en ours d'utilisation\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_INFO);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_msg_success\") + \": \"\n\t\t\t\t\t\t+ bundleDocument.getString(\"document_msg_success_photo_saved\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\t}\n\n\t\t} catch (Exception e2) {\n\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_ERROR);\n\t\t\tmsg.setSummary(bundleDocument.getString(\"document_error_echec\") + \": \"\n\t\t\t\t\t+ bundleDocument.getString(\"document_error_persistence_photo\"));\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\tlog.info(e2.getMessage());\n\t\t}\n\t}",
"@Override\r\n public void handleMessage(Message msg) {\n ImgBeanHolder holder= (ImgBeanHolder) msg.obj;\r\n Bitmap bitmap = holder.bitmap;\r\n ImageView imageview= holder.imageView;\r\n String path = holder.path;\r\n if (imageview.getTag().toString().equals( path)){\r\n imageview.setImageBitmap(bitmap);\r\n }\r\n }",
"public static void posterMessage(Message message){\r\n User utilisateur = message.getAuthor();\r\n Wall mur = utilisateur.getWall();\r\n mur.ajouterMessage(message);\r\n message.setWall(mur);\r\n \r\n }",
"private void tampilPesan(String message) {\n JOptionPane.showMessageDialog(this, message);\n }",
"private void onSendImageClick() {\n Intent intent = new Intent();\n intent.putExtra(Constants.SELECTED_IMAGE, mediaPath);\n intent.putExtra(Constants.CHAT_TYPE, messageType);\n setResult(Activity.RESULT_OK, intent);\n finish();\n }",
"public void ocultarMensaje(String msje, String fo, String nueFo){\n String mensaje, binario;\n Color color;\n int r,g,b;\n try{\n mensaje = lecturaArchivo(msje);\n binario = preparaMensaje(mensaje);\n BufferedImage image = sacaFoto(fo);\n int k = 0;\n for(int i = 0; i < image.getHeight(); i++)\n for(int j = 0; j < image.getWidth(); j++){\n color = new Color(image.getRGB(j, i));\n if(k <= binario.length()){\n String red = toBinary((byte) color.getRed());\n String green = toBinary((byte) color.getGreen());\n String blue = toBinary((byte) color.getBlue());\n red = reemplazarLSB(red, binario);\n green = reemplazarLSB(green, binario);\n blue = reemplazarLSB(blue, binario);\n r = Integer.parseInt(red ,2);\n g = Integer.parseInt(green ,2);\n b = Integer.parseInt(blue ,2);\n }else{\n r = color.getRed();\n g = color.getGreen();\n b = color.getBlue();\n }\n image.setRGB(j, i, new Color(r,g,b).getRGB());\n k+=3;\n }\n File output = new File(nueFo);\n ImageIO.write(image, \"png\", output);\n }catch(IOException ioe){\n System.out.println(\"Hubo un error en la escritura de la imagen\");\n System.exit(1);\n }\n }",
"private void sendImageMessage(String imageUrl) {\n if ( imageUrl == null || imageUrl.length() < 1 ) {\n return;\n }\n DateFormat localDateFormat = Constant.getServerDateFormat();\n Chat chat = new Chat(0,tournamentID,clubID,receiverID, selfID,self.getDisplayName(),\n Constant.MESSAGE_TYPE_IMAGE,imageUrl,localDateFormat.format(new Date()));\n RequestAction actionPostChatImage = new RequestAction() {\n @Override\n public void actOnPre() {\n Log.d(TAG,\"Sending image message to server.\");\n }\n\n @Override\n public void actOnPost(int responseCode, String response) {\n if ( responseCode == 201 ) {\n Log.d(TAG,\"Message sent successfully!\");\n }\n }\n };\n String url;\n if ( tournament != null ) { // tournament chat\n url = UrlHelper.urlChatByTournament(tournament.id,club.id);\n } else if ( club != null ) {// club chat\n url = UrlHelper.urlChatByClub(club.id);\n } else if ( receiver != null ) { // private chat\n url = UrlHelper.urlPrivateChat(receiver.getId());\n } else {\n Toast.makeText(getContext(), \"Unknown error!\", Toast.LENGTH_SHORT).show();\n Log.e(TAG,\"Unspecified chat type.\");\n return;\n }\n RequestHelper.sendPostRequest(url,chat.toJson(),actionPostChatImage);\n }",
"@Override\n public void run() {\n try {\n Drawable drawable = Drawable.createFromStream(new URL(image_path).openStream(), \"\");\n\n Message message = Message.obtain();\n message.obj = drawable;\n handler.sendMessage(message);\n } catch (MalformedURLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"public BufferedImage add_text(BufferedImage image, String text) {\n // convert all items to byte arrays: image, message, message length\n byte img[] = get_byte_data(image);\n byte msg[] = text.getBytes();\n byte len[] = bit_conversion(msg.length);\n try {\n encode_text(img, len, 0); // 0 first positiong\n encode_text(img, msg, 32); // 4 bytes of space for length:\n // 4bytes*8bit = 32 bits\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(\n null,\n \"Target File cannot hold message!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n return image;\n }",
"@Override\n public boolean handleMessage(Message msg) {\n try {\n JSONObject dogObject = new JSONObject(msg.obj.toString()); // one constructor takes String and creates object for you\n // Access\n String status = dogObject.getString(\"status\"); // <--- key for JSON object to get it's value\n if (status.equals(\"success\")) {\n textView.setText(\"Fetch successful!\");\n // Take value associated with \"message\" and use that image as ImageView's source, installed Picasso as dependency to load image\n Picasso.get().load(dogObject.getString(\"message\")).into(dogPicture); // <--- message is key for value of URL of image to use\n } else {\n\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return true;\n }",
"private String buildMessage(String message) {\n\t\tif(message != null && message.contains(\"@record\")) {\n\t\t\tmessage = message.replaceAll(\"@record\", answerUser);\n\t\t\trecorded.put(owner.id(), answerUser);\n\t\t}\n\t\t//o sistema substitui o texto !id pelo id do usuário da conversa\n\t\tif(message != null && message.contains(\"!id\")) {\n\t\t\tmessage = message.replaceAll(\"!id\", owner.id() + \"\");\n\t\t}\n\t\t//o sistema verifica se tem alguma gravacao para o código recebido\n\t\tif(message != null && message.contains(\"#find\")) {\n\t\t\tString gravacao = recorded.get(Integer.parseInt(userLatestAnswer.get(owner.id())));\n\t\t\t//se houver gravacao, o sistema informa qual o desejo do amigo secreto\n\t\t\tif(gravacao != null)\n\t\t\t\tmessage = message.replaceAll(\"#find\", gravacao);\n\t\t\t//caso nao haja gravacao, o sistema notifica o usuário da situacao\n\t\t\telse\n\t\t\t\tmessage = \"O código informado não corresponde ao desejo de um amigo secreto... por favor tente novamente\";\n\t\t}\n\n\t\treturn message;\n\t}",
"@Override\r\n public void sendInfo() {\n System.out.println(\"发送带图片和文字的信息\");\r\n }",
"public void EnvoyerEmailSurveillant(Utilisateur user) {\n\t\t\t\t MimeMessage mimeMessage = mailSender.createMimeMessage(); \n\t\t\t try {\n\t\t\t MimeMessageHelper mimeMessageHelper = new MimeMessageHelper(mimeMessage, true);\n\t\t\t mimeMessageHelper.setSubject(\"Compte Surveillant \");\n\t\t\t mimeMessageHelper.setFrom(\"[email protected]\");\n\n\t\t\t mimeMessageHelper.setTo(user.getEmail());\n\t\t\t String url =\"scolarity.dpc.com.tn\";\n\t\t String content = \"Bonjour Mr ( Mmme), \" + user.getNom()+\" + \" + user.getPrenom()\n\t\t + \", votre nom d'utilisateur par la platforme scolarity est : \\n \" + user.getUsername() +\" \\n\"+\"et votre mot de passe est : \\n\"+ user.getPassword()+\"\\n\"+\"vous pouvez accéder au espace surveillant via l'adresse suivante : \\n\"+url+\"\\n\"+\" \\n Cordialement.\";\n\t\t System.out.println(content);\n\n\t\t\t mimeMessageHelper.setTo(user.getEmail());\n\t\t mimeMessageHelper.setText(content);\n\t\t // Add a resource as an attachment\n\t\t mimeMessageHelper.setText(\"<html><body><p>\" + content + \"</p> <img src=\\\"http://207.180.211.158:/logodpc.bmp\\\" width=\\\"50\\\" alt=\\\"Apen\\\"></body></html>\", true);\n\n\t\t\t \n\t\t\t \n\t\t\t mailSender.send(mimeMessageHelper.getMimeMessage());\n\t\t\t } catch (MessagingException e) {\n\t\t\t e.printStackTrace();\n\t\t\t }\n\t\t\t\t\n\t\t\t}",
"public void handleMessage(Message msg) {\n int what = msg.what;\n if (what == 0x01) { //update\n int i = 1;\n text_dialog = (TextView) mAlertDialog.findViewById(R.id.display_dialog);\n text_Title = (TextView) mAlertDialog.findViewById(R.id.display_title);\n btn_ok = (Button) mAlertDialog.findViewById(R.id.btn_ok);\n btn_dele = (Button) mAlertDialog.findViewById(R.id.btn_dele);\n List<String> mdata = new ArrayList<String>();\n text_Title.setGravity(Gravity.CENTER);\n text_dialog.setMovementMethod(new ScrollingMovementMethod());\n // text_dialog.setText();\n\n if(cursor.moveToFirst()){\n do{\n if(cursor.getString(cursor.getColumnIndex(\"title\")).equals(data.get(Position))){\n text_Title.setText(cursor.getString(cursor.getColumnIndex(\"title\")));\n\n String context = cursor.getString(cursor.getColumnIndex(\"context\"));\n String path = cursor.getString(cursor.getColumnIndex(\"path\"));\n\n Log.d(TAG, \"主文的内容是: \"+ context);\n Log.d(TAG, \"图片的路径是: \" + path);\n String[] sourceStrArray = context.split(\"test\");\n String[] sourcePath = path.split(\"####\");\n\n text_dialog.append(sourceStrArray[0]);\n Pattern p = Pattern.compile(\"test\");\n Matcher m = p.matcher(context);\n while (m.find()) {\n\n\n ContentResolver cr = getActivity().getContentResolver();\n Bitmap bitmap = null;\n //将对象存入Bitmap中\n // bitmap = BitmapFactory.decodeStream(cr.openInputStream(uri));\n //bitmap = getLoacalBitmap(\"/storage/emulated/0/DCIM/Camera/IMG20170512173710.jpg\");\n bitmap = getLoacalBitmap(sourcePath[i]);\n int imgWidth = bitmap.getWidth();\n int imgHeight = bitmap.getHeight();\n double partion = imgWidth*1.0/imgHeight;\n double sqrtLength = Math.sqrt(partion*partion + 1);\n //新的缩略图大小\n double newImgW = 320*(partion / sqrtLength);\n double newImgH = 320*(1 / sqrtLength);\n float scaleW = (float) (newImgW/imgWidth);\n float scaleH = (float) (newImgH/imgHeight);\n Log.d(TAG, \"imgHeight: \"+newImgH);\n Matrix mx = new Matrix();\n //对原图片进行缩放\n mx.postScale(scaleW, scaleH);\n bitmap = Bitmap.createBitmap(bitmap, 0, 0, imgWidth, imgHeight, mx, true);\n ImageSpan imageSpan = new ImageSpan(getActivity(),bitmap);\n SpannableString spannableString = new SpannableString(\"test\");\n spannableString.setSpan(imageSpan, 0, spannableString.length(), SpannableString.SPAN_MARK_MARK);\n text_dialog.append(\"\\n\");\n text_dialog.append(spannableString);\n text_dialog.append(\"\\n\");\n text_dialog.append(sourceStrArray[i]);\n i++;\n\n }\n// int contexttimes = appearNumber(context,\"test\");\n// int pathtimes = appearNumber(path,\"####\");\n// pathtimes = pathtimes - 1;\n\n//\n// for (int i = 0; i < sourceStrArray.length; i ++){\n//\n// Log.d(TAG, \"sourceStrArray: \" +sourceStrArray[i]);\n// }\n// for (int i = 0; i < sourcePath.length; i ++){\n//\n// Log.d(TAG, \"sourcePath: \" +sourcePath[i]);\n// }\n// Log.d(TAG, \"主文的test出现的次数: \"+contexttimes);\n// Log.d(TAG, \"图片的路径出现的次数: \"+pathtimes);\n\n }\n\n\n\n }while(cursor.moveToNext());\n\n\n }\n\n\n btn_ok.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n text_dialog.setText(\"\");\n mAlertDialog.cancel();\n }\n });\n btn_dele.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n text_dialog.append(\"\");\n mAlertDialog.cancel();\n\n\n\n }\n });\n\n if(mAlertDialog.isShowing()){\n MyHandler.sendEmptyMessageDelayed(0,1000);\n }\n }else {\n // mAlertDialog.cancel();\n }\n }",
"private void showNotificationMessageWithBigImage (Context context, String title, String message, String timeStamp, Intent intent, String imageUrl) {\n notificationUtils = new com.actiknow.plothr.gcm.NotificationUtils(context);\n intent.setFlags (Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n notificationUtils.showNotificationMessage (title, message, timeStamp, intent, imageUrl);\n }",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tString reslutInfo = (String) msg.obj;\n\t\t\tLog.d(App.LOG_TAG, reslutInfo);\n\t\t\tswitch (msg.what) {\n\t\t\tcase 200:\n\t\t\t\tpb.setProgress(7);\n\t\t\t\ttextState.append(\"\\n\");\n\t\t\t\ttextState.append(reslutInfo);\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tclearSign();\n\t\t\t\tsaveRecodes();\n\t\t\t\tbreak;\n\t\t\tcase 201:\n\t\t\t\ttextState.append(\"\\n\");\n\t\t\t\ttextState.append(reslutInfo);\n\t\t\t\tbreak;\n\t\t\tcase 501:\n\t\t\t\tpb.setProgress(7);\n\t\t\t\ttextState.append(\"\\n\");\n\t\t\t\ttextState.append(reslutInfo);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\ttextState.append(\"\\n\");\n\t\t\t\ttextState.append(reslutInfo);\n\t\t\t\tpb.setProgress(msg.what);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"private void showMessageLeft(CustomMessageViewHolder customMessageViewHolder, @NonNull FriendlyMessage friendlyMessage) {\n customMessageViewHolder.chat_left_msg_layout.setVisibility(View.VISIBLE);\n customMessageViewHolder.chat_right_msg_layout.setVisibility(View.GONE);\n if (friendlyMessage.hasText()) {\n customMessageViewHolder.leftMessageTextView.setText(friendlyMessage.getText());\n customMessageViewHolder.leftMessageTextView.setVisibility(TextView.VISIBLE);\n customMessageViewHolder.leftMessageImageView.setVisibility(ImageView.GONE);\n } else if (friendlyMessage.hasImage()) {\n String imageUrl = friendlyMessage.getImageUrl();\n if (imageUrl.startsWith(\"gs://\")) {\n StorageReference storageReference = FirebaseStorage.getInstance()\n .getReferenceFromUrl(imageUrl);\n storageReference.getDownloadUrl().addOnCompleteListener(\n new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if (task.isSuccessful()) {\n String downloadUrl = task.getResult().toString();\n Glide.with(customMessageViewHolder.leftMessageImageView.getContext())\n .load(downloadUrl)\n .into(customMessageViewHolder.leftMessageImageView);\n } else {\n Timber.d(task.getException());\n }\n }\n });\n } else {\n Glide.with(customMessageViewHolder.leftMessageImageView.getContext())\n .load(friendlyMessage.getImageUrl())\n .into(customMessageViewHolder.leftMessageImageView);\n }\n customMessageViewHolder.leftMessageImageView.setVisibility(ImageView.VISIBLE);\n customMessageViewHolder.leftMessageTextView.setVisibility(TextView.GONE);\n customMessageViewHolder.leftMessageImageView.setOnClickListener(v -> {\n if (onMessageImageCallback != null) {\n onMessageImageCallback.onMessageImageClicked(imageUrl);\n }\n });\n } else if (friendlyMessage.hasFile()) {\n customMessageViewHolder.leftMessengerImageView.setImageDrawable(ContextCompat.getDrawable(mContext,\n R.mipmap.ic_pdf));\n\n String fileUrl = friendlyMessage.getFileUrl();\n if (fileUrl.startsWith(\"gs://\")) {\n StorageReference storageReference = FirebaseStorage.getInstance()\n .getReferenceFromUrl(fileUrl);\n storageReference.getDownloadUrl().addOnCompleteListener(\n new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if (task.isSuccessful()) {\n String downloadUrl = task.getResult().toString();\n Glide.with(customMessageViewHolder.leftMessageImageView.getContext())\n .load(downloadUrl)\n .into(customMessageViewHolder.leftMessageImageView);\n } else {\n Timber.d(task.getException());\n }\n }\n });\n }\n\n }\n\n customMessageViewHolder.leftMessengerTextView.setText(friendlyMessage.getName());\n if (friendlyMessage.getPhotoUrl() == null) {\n customMessageViewHolder.leftMessengerImageView.setImageDrawable(ContextCompat.getDrawable(mContext,\n R.drawable.ic_account_circle_black_36dp));\n } else {\n Glide.with(mContext)\n .load(friendlyMessage.getPhotoUrl())\n .into(customMessageViewHolder.leftMessengerImageView);\n }\n }",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\t\n\t int number = (int)(Math.random()*3);\n\t if(number == 1) {\n\t \ttxt.setText(\"你出布,電腦出剪刀,你輸了\");\n\t \tj++;\n\t \tai.setText(\"剪刀\");\n\t \tplayer.setText(\"布\");\n\t \tscore.setText(i+\"勝\"+j+\"負\"+k+\"和\");\n\t \timg1.setImageResource(R.drawable.scissor);\n\t \timg2.setImageResource(R.drawable.paper);\n\t }\n\t else if(number == 2) {\n\t \ttxt.setText(\"你出布 ,電腦出石頭,你贏了\");\n\t \ti++;\n\t \tai.setText(\"石頭\");\n\t \tplayer.setText(\"布\");\n\t \tscore.setText(i+\"勝\"+j+\"負\"+k+\"和\");\n\t \timg1.setImageResource(R.drawable.rock);\n\t \timg2.setImageResource(R.drawable.paper);\n\t }\n\t else {\n\t \ttxt.setText(\"都出布,平手\");\n\t \tk++;\n\t \tai.setText(\"布\");\n\t \tplayer.setText(\"布\");\n\t \tscore.setText(i+\"勝\"+j+\"負\"+k+\"和\");\n\t \timg1.setImageResource(R.drawable.paper);\n\t \timg2.setImageResource(R.drawable.paper);\n\t }\n\t\t}",
"private void sendMessageFirebase(String name, String content, String image, String uid, String url){\n FirebaseDatabase firebaseDatabase; //Firebase Database 관리 객체참조변수\n DatabaseReference roodIdReference;\n Calendar calendar = Calendar.getInstance(); //현재 시간을 가지고 있는 객체\n String time = calendar.get(Calendar.HOUR_OF_DAY) + \":\" + calendar.get(Calendar.MINUTE);\n\n ChatMessageItem messageItem = new ChatMessageItem(name, content, time, image, uid, url);\n\n firebaseDatabase = FirebaseDatabase.getInstance();\n roodIdReference = firebaseDatabase.getReference(roomID);\n roodIdReference.push().setValue(messageItem);\n }",
"void prosegui(String messaggio);",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if(resultCode == RESULT_OK){\n if(requestCode == REQUEST_CODE && data.getExtras().get(\"data\")!=null){\n Bitmap bp = (Bitmap) data.getExtras().get(\"data\");\n prescription.setVisibility(View.VISIBLE);\n userNameQO.setVisibility(View.GONE);\n phoneNo.setVisibility(View.GONE);\n captureButton.setText(getResources().getString(R.string.send_prescription));\n prescription.setImageBitmap(bp);\n }\n }\n }",
"private void showMessageRight(CustomMessageViewHolder customMessageViewHolder, @NonNull FriendlyMessage friendlyMessage) {\n customMessageViewHolder.chat_left_msg_layout.setVisibility(View.GONE);\n customMessageViewHolder.chat_right_msg_layout.setVisibility(View.VISIBLE);\n if (friendlyMessage.hasText()) {\n customMessageViewHolder.rightMessageTextView.setText(friendlyMessage.getText());\n customMessageViewHolder.rightMessageTextView.setVisibility(TextView.VISIBLE);\n customMessageViewHolder.rightMessageImageView.setVisibility(ImageView.GONE);\n } else if (friendlyMessage.hasImage()) {\n String imageUrl = friendlyMessage.getImageUrl();\n if (imageUrl.startsWith(\"gs://\")) {\n StorageReference storageReference = FirebaseStorage.getInstance()\n .getReferenceFromUrl(imageUrl);\n storageReference.getDownloadUrl().addOnCompleteListener(\n task -> {\n if (task.isSuccessful()) {\n String downloadUrl = task.getResult().toString();\n Glide.with(customMessageViewHolder.rightMessageImageView.getContext())\n .load(downloadUrl)\n .into(customMessageViewHolder.rightMessageImageView);\n } else {\n Timber.d(task.getException());\n }\n });\n } else {\n Glide.with(customMessageViewHolder.rightMessageImageView.getContext())\n .load(friendlyMessage.getImageUrl())\n .into(customMessageViewHolder.rightMessageImageView);\n }\n\n customMessageViewHolder.rightMessageImageView.setOnClickListener(v -> {\n if (onMessageImageCallback != null) {\n onMessageImageCallback.onMessageImageClicked(imageUrl);\n }\n });\n customMessageViewHolder.rightMessageImageView.setVisibility(ImageView.VISIBLE);\n customMessageViewHolder.rightMessageTextView.setVisibility(TextView.GONE);\n } else if (friendlyMessage.hasFile()) {\n customMessageViewHolder.rightMessageImageView.setImageDrawable(ContextCompat.getDrawable(mContext,\n R.mipmap.ic_pdf));\n\n String fileUrl = friendlyMessage.getFileUrl();\n if (fileUrl.startsWith(\"gs://\")) {\n StorageReference storageReference = FirebaseStorage.getInstance()\n .getReferenceFromUrl(fileUrl);\n storageReference.getDownloadUrl().addOnCompleteListener(\n new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if (task.isSuccessful()) {\n String downloadUrl = task.getResult().toString();\n Glide.with(customMessageViewHolder.rightMessageImageView.getContext())\n .load(downloadUrl)\n .into(customMessageViewHolder.rightMessageImageView);\n } else {\n Timber.d(task.getException());\n }\n }\n });\n }\n }\n\n customMessageViewHolder.rightMessengerTextView.setText(friendlyMessage.getName());\n if (friendlyMessage.getPhotoUrl() == null) {\n customMessageViewHolder.rightMessengerImageView.setImageDrawable(ContextCompat.getDrawable(mContext,\n R.drawable.ic_account_circle_black_36dp));\n } else {\n Glide.with(mContext)\n .load(friendlyMessage.getPhotoUrl())\n .into(customMessageViewHolder.rightMessengerImageView);\n }\n }",
"private void KirimImage(){\n try {\n DatagramSocket clientsocket=new DatagramSocket(portimage);\n byte[] receivedata = new byte[92024];\n DatagramPacket kirim = new DatagramPacket(receivedata, receivedata.length);\n clientsocket.receive(kirim); \n byte[] buff = kirim.getData();\n \n String pesan = new String(buff, 0, buff.length);\n pesan=pesan.trim();\n// System.out.println(\"pesan = \" + pesan);\n \n if (pesan.equalsIgnoreCase(\"stop\")) {\n clientsocket.close();\n System.exit(0);\n } else {\n InputStream in = new ByteArrayInputStream(buff);\n BufferedImage img = ImageIO.read(in);\n ImageIO.write(img, \"jpg\", new File(\"D:\\\\NikokMenerima.jpg\"));\n ImageIcon set = new ImageIcon(img);\n Images.setIcon(set);\n clientsocket.close(); }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public static void sendToTelegram(String caption, byte[] picture) {\n SendPhoto sendPhoto = new SendPhoto(chatId, picture);\n sendPhoto.caption(caption);\n new Thread(new Runnable() {\n @Override\n public void run() {\n bot.execute(sendPhoto);\n }\n }).start();\n }",
"public void tratarMensagemRecebida(String msg){\n String comando = msg.substring(0, 8); //Extrai o comando \n String payLoad = msg.replaceFirst(comando, \"\");\n String campo[];\n\n // Trata a mensagem conforme o protocolo\n switch (comando){\n\n case Protocolo.CHAT_MSG:\n String data;\n data = usuarioBySocket(usuarioVector, cliente).getNome() + \" enviou: \" + payLoad;\n enviarMensagemParaTodosChat(Protocolo.CHAT_MSG, data);\n break;\n\n case Protocolo.CHAT_SAI: \n enviarMensagemParaUmUsuario(Protocolo.CHAT_SAI, \"\");\n String notificacao = usuarioBySocket(usuarioVector, cliente).getNome() + \" acabou de sair.\";\n enviarMensagemParaTodosChat(Protocolo.CHAT_NOT, notificacao);\n enviarMensagemParaTodosChat(Protocolo.CHAT_REM, usuarioBySocket(usuarioVector, cliente).getNome());\n removeUsuario(usuarioVector, cliente);\n System.out.println(\"Removeu Usuario \"); \n break; \n \n case Protocolo.IMG_CQUA:\n enviarMensagemParaTodosEdicao(Protocolo.IMG_CQUA, \"\"+idImg+\":10\"+\":10\"); \n Imagem quadrado = new Imagem(idImg++, TipoFigura.QUADRADO, 10, 10);\n imagemVector.add(quadrado);\n System.out.println(\"Criar Quadrado\"); \n break;\n\n case Protocolo.IMG_CCIR:\n enviarMensagemParaTodosEdicao(Protocolo.IMG_CCIR, \"\"+idImg+\":10\"+\":10\"); \n Imagem circulo = new Imagem(idImg++, TipoFigura.CIRCULO, 10, 10);\n imagemVector.add(circulo);\n System.out.println(\"Removeu Circulo \"); \n break;\n \n case Protocolo.IMG_CTRI:\n enviarMensagemParaTodosEdicao(Protocolo.IMG_CTRI, \"\"+idImg+\":10\"+\":10\"); \n Imagem triangulo = new Imagem(idImg++, TipoFigura.TRIANGULO, 10, 10);\n imagemVector.add(triangulo);\n System.out.println(\"Criar Triangulo \"); \n break;\n \n case Protocolo.IMG_REMO:\n enviarMensagemParaTodosEdicao(Protocolo.IMG_REMO, \"\"+payLoad);\n removeImagem(imagemVector, Integer.parseInt(payLoad));\n System.out.println(\"Removeu Figura id= \" + payLoad); \n break;\n \n case Protocolo.IMG_MOVE:\n campo = payLoad.split(\":\"); //pega id, posX e posY da figura\n atualizaPosicaoImagem(Integer.parseInt(campo[0]), Integer.parseInt(campo[1]), Integer.parseInt(campo[2]));\n enviarMensagemParaTodosEdicao(Protocolo.IMG_MOVE, payLoad); \n System.out.println(\"Mover figura\");\n break;\n \n case Protocolo.PNL_MOVP:\n campo = payLoad.split(\":\");\n payLoad = usuarioBySocket(usuarioVector, cliente).getNome()+\":\"+campo[0]+\":\"+campo[1];\n enviarMensagemParaTodosEdicao(Protocolo.PNL_MOVP, payLoad);\n System.out.println(\"Movendo Mouse\");\n break;\n \n case Protocolo.PNL_MOVF:\n campo = payLoad.split(\":\");\n payLoad = usuarioBySocket(usuarioVector, cliente).getNome()+\":\"+campo[0]+\":\"+campo[1];\n enviarMensagemParaTodosEdicao(Protocolo.PNL_MOVF, payLoad);\n System.out.println(\"Movendo Mouse na figura\");\n break;\n\n case Protocolo.PNL_DRGF:\n campo = payLoad.split(\":\");\n payLoad = usuarioBySocket(usuarioVector, cliente).getNome()+\":\"+campo[0]+\":\"+campo[1];\n enviarMensagemParaTodosEdicao(Protocolo.PNL_DRGF, payLoad);\n System.out.println(\"Movendo Mouse na figura Drag\");\n break;\n \n default:\n System.out.println(\"Case Default - MSG Recebida: \" + comando);\n }\n }",
"private void initialisationChampMessage() {\n messageArea = new JTextArea();\n messageArea.setLineWrap(true);\n messageArea.setWrapStyleWord(true);\n messageArea.setOpaque(false);\n messageArea.setBackground(COULEUR_VIDE);\n messageArea.setFont(FONT_TEXTE);\n messageArea.setBorder(BorderFactory.createEmptyBorder(GRANDEUR_BORDURE_VIDE, GRANDEUR_BORDURE_VIDE,\n GRANDEUR_BORDURE_VIDE, GRANDEUR_BORDURE_VIDE));\n dimTotal = calculerDimensionTotalMessage(this.message);\n messageArea.setSize((int) dimTotal.getWidth() + GRANDEUR_BORDURE_VIDE * 2,\n (int) dimTotal.getHeight() + GRANDEUR_BORDURE_VIDE * 2);\n messageArea.append(this.message);\n }",
"private void ErreurImage() \n {\n JOptionPane.showMessageDialog(rootPane, \"Cette image n'est plus disponible\");\n }",
"public ImMessage() {\r\n }",
"private void sendSkecthTochat(String imgSaved) {\n\n GroupDataShareImage mDataShareImage = new GroupDataShareImage();\n mDataShareImage.setImgUrl(imgSaved);\n mDataShareImage.setSketchType(true);\n\n ArrayList<GroupDataShareImage> mListString = new ArrayList<GroupDataShareImage>();\n mListString.add(mDataShareImage);\n\n Intent mIntent = new Intent();\n Bundle mBundle = new Bundle();\n mBundle.putSerializable(ConstantGroupChat.B_RESULT, mListString);\n mIntent.putExtras(mBundle);\n setResult(ConstantGroupChat.SketchSelect, mIntent);\n finish();\n\n }",
"@Override\r\n public void onClick(View view) {\r\n\r\n\r\n final Dialog dialog = new Dialog(holder.context, android.R.style.Theme_Black_NoTitleBar_Fullscreen);\r\n\r\n dialog.setContentView(R.layout.full_screenimage_bottomsheeed);\r\n\r\n PhotoView photoView = dialog.findViewById(R.id.PhotoView);\r\n Picasso.with(holder.context).load(MessageModalList.getMessage()).into(photoView);\r\n dialog.show();\r\n\r\n }",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\t\n\t int number = (int)(Math.random()*3);\n\t if(number == 1) {\n\t \ttxt.setText(\"都出剪刀,平手\"); \n\t \tk++;\n\t \tai.setText(\"剪刀\");\n\t \tplayer.setText(\"剪刀\");\n\t \tscore.setText(i+\"勝\"+j+\"負\"+k+\"和\");\n\t \timg1.setImageResource(R.drawable.scissor);\n\t \timg2.setImageResource(R.drawable.scissor);\n\t }\n\t else if(number == 2) {\n\t \ttxt.setText(\"你出剪刀 ,電腦出石頭,你輸了\");\n\t \tj++;\n\t \tai.setText(\"石頭\");\n\t \tplayer.setText(\"剪刀\");\n\t \tscore.setText(i+\"勝\"+j+\"負\"+k+\"和\");\n\t \timg1.setImageResource(R.drawable.rock);\n\t \timg2.setImageResource(R.drawable.scissor);\n\t }\n\t else {\n\t \ttxt.setText(\"你出剪刀,電腦出布,你贏了\");\n\t \ti++;\n\t \tai.setText(\"布\");\n\t \tplayer.setText(\"剪刀\");\n\t \tscore.setText(i+\"勝\"+j+\"負\"+k+\"和\");\n\t \timg1.setImageResource(R.drawable.paper);\n\t \timg2.setImageResource(R.drawable.scissor);\n\t }\n\t\t}",
"public abstract void groupChatPhotoDeleteMessage(Message m);",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\t\n\t int number = (int)(Math.random()*3);\n\t if(number == 1) {\n\t \ttxt.setText(\"你出石頭,電腦出剪刀,你贏了\");\n\t \ti++;\n\t \tai.setText(\"剪刀\");\n\t \tplayer.setText(\"石頭\");\n\t \tscore.setText(i+\"勝\"+j+\"負\"+k+\"和\");\n\t \timg1.setImageResource(R.drawable.scissor);\n\t \timg2.setImageResource(R.drawable.rock);\n\t }\n\t else if(number == 2) {\n\t \ttxt.setText(\"都出石頭,平手\");\n\t \tk++;\n\t \tai.setText(\"石頭\");\n\t \tplayer.setText(\"石頭\");\n\t \tscore.setText(i+\"勝\"+j+\"負\"+k+\"和\");\n\t \timg1.setImageResource(R.drawable.rock);\n\t \timg2.setImageResource(R.drawable.rock);\n\t }\n\t else {\n\t \ttxt.setText(\"你出石頭,電腦出布,你輸了\");\n\t \tj++;\n\t \tai.setText(\"布\");\n\t \tplayer.setText(\"石頭\");\n\t \tscore.setText(i+\"勝\"+j+\"負\"+k+\"和\");\n\t \timg1.setImageResource(R.drawable.paper);\n\t \timg2.setImageResource(R.drawable.rock);\n\t }\n\t\t}",
"private void send_image_notfaction(final String username) {\r\n FirebaseDatabase.getInstance().getReference().child(\"Token\")\r\n .addValueEventListener(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(DataSnapshot dataSnapshot) {\r\n if (dataSnapshot.exists()) {\r\n\r\n for (DataSnapshot ds : dataSnapshot.getChildren()) {\r\n\r\n Token token = ds.getValue(Token.class);\r\n String sendermessage = username;\r\n String title = messagetext;\r\n\r\n Notifaction notifaction = new Notifaction(\"Send a image\", sendermessage);\r\n Sender sender = new Sender(token.getToken(), notifaction);\r\n\r\n mservices.sendNotification(sender).enqueue(new Callback<Myresponse>() {\r\n @Override\r\n public void onResponse(Call<Myresponse> call, Response<Myresponse> response) {\r\n\r\n }\r\n\r\n @Override\r\n public void onFailure(Call<Myresponse> call, Throwable t) {\r\n Log.i(\"ERROR\", \"MESSAGE\");\r\n\r\n }\r\n });\r\n }\r\n\r\n\r\n }\r\n }\r\n\r\n @Override\r\n public void onCancelled(DatabaseError databaseError) {\r\n\r\n }\r\n });\r\n\r\n\r\n }",
"public String getMessage(JSONObject json) throws JSONException {\n String message = json.getString(\"image\");\n return message;\n }",
"public boolean addMessage(VicinityMessage message) throws SQLException\n {\n boolean isAdded=false;\n try\n {\n database = dbH.getReadableDatabase();\n dbH.openDataBase();\n ContentValues values = new ContentValues();\n values.put(\"messageBody\", message.getMessageBody());\n values.put(\"isMyMsg\", message.isMyMsg());\n values.put(\"sentBy\", message.getFriendName());\n values.put(\"msgTimestamp\", message.getDate());\n values.put(\"fromIP\", message.getFrom());\n values.put(\"image\" , message.getImageString());\n\n\n isAdded=database.insert(\"Message\", null, values)>0;\n Log.i(TAG, \"ADD SUCCESSFUL\");\n\n dbH.close();\n }\n catch(SQLException e)\n {\n e.printStackTrace();\n }\n return isAdded;}",
"@Override\r\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\r\n\t\t\tclear();\r\n\t\t\tmessage.setText(null);\r\n\t\t\tphotoIv.setImageBitmap(null);\r\n\t\t}",
"private void showNotificationMessageWithBigImage(Context context, String title, String message, String timeStamp, Intent intent, String imageUrl) {\n notificationUtils = new NotificationUtils(context,channelId);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n notificationUtils.showNotificationMessage(title, message, timeStamp, intent, imageUrl);\n }",
"public void updateMessage(Message message){\n Tag Tag = null;\n db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(databaseValues.STORY_COLUMN_NAME2, message.getMessage());\n values.put(databaseValues.STORY_COLUMN_NAME3, message.getMessageType());\n values.put(databaseValues.STORY_COLUMN_NAME4, message.getPicture());\n db.update(databaseValues.TABLE_NAME3,values,\"Username=?\",new String[]{message.username});\n }",
"void bindImage(final Messages c){\n\n Picasso.get().load(c.getMessage()).placeholder(R.drawable.placeholder).into(messageImage);\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\n\t\tif (20 == resultCode) {\n\t\t\tString msg = data.getExtras().getString(\"msg\");\n\t\t\tString action = data.getExtras().getString(\"action\");\n\n\t\t\tif (action.equals(\"1056\")) {// 姓名\n\t\t\t\t// messageItem.get(0).setContent(msg);\n\t\t\t} else if (action.equals(\"1042\")) {// 球龄\n\t\t\t\t// messageItem.get(4).setContent(msg);\n\n\t\t\t} else if (action.equals(\"1008\")) {// 场上位置\n\t\t\t\tmessageItem.get(3).setContent(msg);\n\t\t\t} else if (action.equals(\"1044\")) {// 个人标签\n\t\t\t\tmessageItem.get(5).setContent(msg);\n\t\t\t} else if (action.equals(\"1057\")) {// 性别\n\t\t\t\t// String sex = \"\";\n\t\t\t\t// if (msg.equals(\"1\"))\n\t\t\t\t// sex = \"男\";\n\t\t\t\t// else if (msg.equals(\"2\"))\n\t\t\t\t// sex = \"女\";\n\t\t\t\t// messageItem.get(7).setContent(sex);\n\t\t\t} else if (action.equals(\"1012\")) {// 生日\n\t\t\t\tmessageItem.get(2).setContent(msg);\n\t\t\t} else if (action.equals(\"1047\")) {// 个人签名\n\t\t\t\tmessageItem.get(6).setContent(msg);\n\n\t\t\t} else if (action.equals(\"1046\")) {// 工作行业\n\t\t\t\tmessageItem.get(4).setContent(msg);\n\n\t\t\t} else if (action.equals(\"1013\")) {// 居住地 籍贯\n\t\t\t\tint type = data.getExtras().getInt(\"type\");\n\t\t\t\tif (type == 0) {// 籍贯\n\t\t\t\t\tmessageItem.get(1).setContent(msg);\n\t\t\t\t} else if (type == 1) {// 居住地\n\t\t\t\t\tmessageItem.get(0).setContent(msg);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// adapter.setItem(messageItem);\n\t\t}\n\n\t\tswitch (requestCode) {\n\t\tcase TAKE_PICTURE:\n\t\t\tif (Bimp.tempSelectBitmap.size() < 9 && resultCode == RESULT_OK) {\n\n\t\t\t\tString fileName = String.valueOf(System.currentTimeMillis());\n\t\t\t\tbm = (Bitmap) data.getExtras().get(\"data\");\n\t\t\t\tFileUtils.saveBitmap(bm, fileName);\n\n\t\t\t\tpicPath = Environment.getExternalStorageDirectory()\n\t\t\t\t\t\t+ \"/Photo_She/\" + fileName + \".JPEG\";\n\t\t\t\t// f = new File(Environment.getExternalStorageDirectory()\n\t\t\t\t// + \"/Photo_She/\", fileName + \".JPEG\");\n\t\t\t\tfName = fileName + \".JPEG\";\n\n\t\t\t\tbmpUpload(fName, picPath);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase REQUEST_CODE_LOCAL:\n\t\t\tif (data != null) {\n\t\t\t\tUri selectedImage = data.getData();\n\t\t\t\tif (selectedImage != null) {\n\t\t\t\t\tsendPicByUri(selectedImage);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}",
"private void onPhotoError() {\n ToastModifications.createToast(this, getString(R.string.error_saving_photo), Toast.LENGTH_LONG);\n }",
"public void insertMessage(Message message){\n Tag Tag=null;\n db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(databaseValues.STORY_COLUMN_NAME1, message.getUsername());\n values.put(databaseValues.STORY_COLUMN_NAME2, message.getMessage());\n values.put(databaseValues.STORY_COLUMN_NAME3, message.getMessageType());\n values.put(databaseValues.STORY_COLUMN_NAME4, message.getPicture());\n Log.e(String.valueOf(Tag), message.getUsername());\n Log.e(String.valueOf(Tag), message.getMessage());\n Log.e(String.valueOf(Tag), message.getMessageType());\n db.insert(databaseValues.TABLE_NAME2, null, values);\n db.close();\n }",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n fotoReferencia.getDownloadUrl()\n .addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n Mensaje mensajeFoto = new Mensaje\n (nombreUsuario,\n \"Ha enviado una foto\",\n FirebaseAuth.getInstance().getCurrentUser()\n .getPhotoUrl().toString(),\n \"2\",\n DateFormat.getTimeInstance().format\n (Timestamp.now().toDate()),\n uri.toString(),\n idUsuario,\n idVeterinario);\n db.collection(\"chat\")\n .document(idChat)\n .collection(\"mensajes\")\n .add(mensajeFoto);\n }\n });\n }",
"private String ConvertImagenTexto(Bitmap imagenpro) {\n ByteArrayOutputStream espacio = new ByteArrayOutputStream();\n imagenpro.compress(Bitmap.CompressFormat.JPEG,100,espacio);\n byte[] imagen = espacio.toByteArray();\n String imagenAstring = Base64.encodeToString(imagen,Base64.DEFAULT);\n return imagenAstring;\n }",
"@Override\n protected Object doInBackground() throws Exception {\n InputStream is = null;\n\n MESSAGE responseConn = MessageManger.createCommand(Command.CONNECT, null);\n MessageManger.addParameter(responseConn, \"response\", Command.OK);\n MessageManger.directWriteMessage(responseConn, ccv.getOutputStream());\n\n// ccv.getHelper().sendRequest(\"~OK\\n\");\n is = so.getInputStream();\n\n BufferedReader in = new BufferedReader(new InputStreamReader(is, Util.DEFAULTENCODING));\n String line = \"\";\n\n while ((line = in.readLine()) != null) {\n\n try {\n if (line.startsWith(\"<\")) {\n\n MESSAGE message = MessageManger.parseXML(line);\n\n //non loggo gli xml di dati perchè so troppo lunghi\n if (!message.getName().equals(Request.FILETRANSFER)) {\n log.debug(ccv.getNick() + \" \" + type + \" reder receive MESSAGE : \" + MessageManger.messageToStringFormatted(message));\n } else {\n log.debug(ccv.getNick() + \" \" + type + \" FILETRANSFER RECEIVED\");\n }\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" MESSAGE \">\n if (message.getType().equals(MESSAGE)) {\n\n String messageSt = message.getParameters().getParameter().get(0).getValue();\n Font font = Font.decode(message.getParameters().getParameter().get(1).getValue());\n Color color = Color.decode(message.getParameters().getParameter().get(2).getValue());\n\n //prendo le emoticons dai contents \n List<Emoticon> emoticons = new LinkedList<Emoticon>();\n\n try {\n if (message.getContents() != null) {\n List<MESSAGE.Contents.Content> contents = message.getContents().getContent();\n\n for (MESSAGE.Contents.Content content : contents) {\n\n log.debug(\"received emoticon : \" + content.getName());\n byte[] bs = content.getValue();\n //decomprimo l'immagine\n byte[] imageBytes = chatclient.commons.Util.decompress(bs);\n log.trace(\"data[] : \" + bs);\n// ByteArrayInputStream bais = new ByteArrayInputStream(bs);\n\n// BufferedImage bufferedImage = ImageIO.read(bais);\n// log.trace(\"BufferedImage : \" + bufferedImage);\n Emoticon emotion = new Emoticon();\n emotion.setShortcut(content.getName());\n emotion.setName(content.getName());\n emotion.setImageIcon(new ImageIcon(imageBytes, \"\"));\n emotion.setData(imageBytes);\n log.trace(\"emoticon ImageIcon : \" + emotion.getImageIcon());\n emoticons.add(emotion);\n\n }\n }\n } catch (Exception e) {\n log.warn(e);\n\n }\n\n\n\n if (message.getName().equals(Message.SINGLE)) {\n String sender = message.getSender();\n\n ChatWindow cv = ccv.getHelper().getChatWith(sender);\n cv.getReceivedEmoticons().addAll(emoticons);\n cv.writeMessage(sender, messageSt, font, color, emoticons);\n\n } else if (message.getName().equals(Message.CONFERENCE)) {\n String sender = message.getSender();\n\n //dalla lista di partecipanti alla conferenza\n //rcavo l'arrey di quelli che servono in questo client\n List<String> componentsOfConferenz = new LinkedList<String>();\n for (String string : message.getReceivers().getReceiver()) {\n if (!string.equals(ccv.getNick())) {\n componentsOfConferenz.add(string);\n }\n }\n componentsOfConferenz.add(sender);\n log.debug(componentsOfConferenz);\n\n ChatWindow cv = ccv.getHelper().getConferenceWith(componentsOfConferenz.toArray(new String[componentsOfConferenz.size()]));\n cv.getReceivedEmoticons().addAll(emoticons);\n cv.writeMessage(sender, messageSt, font, color, emoticons);\n\n }\n\n// </editor-fold>\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" REQUEST \">\n } else if (message.getType().equals(REQUEST)) {\n\n if (message.getName().equals(Request.FILETRANSFER)) {\n\n try {\n String fileName = message.getParameters().getParameter().get(0).getValue();\n String fileurl = Util.readProperties().getProperty(\"downloadFolder\") + \"/\" + fileName;\n int packNum = Integer.parseInt(message.getParameters().getParameter().get(3).getValue());\n\n File outputFile = new File(fileurl);\n\n FileOutputStream fos = new FileOutputStream(outputFile, true);\n byte[] bArr = message.getData();\n\n int readed = Integer.parseInt(message.getParameters().getParameter().get(1).getValue());\n log.debug(ccv.getNick() + \"reader readed bytes : \" + readed);\n log.debug(\"write bytes to file : \" + fileurl);\n fos.write(bArr, 0, readed);\n\n fos.close();\n\n ReceiveFileDialog receiveFileDialog = ccv.getHelper().getReceiveFileDialog(fileName, message.getSender());\n receiveFileDialog.setPackReceived(packNum);\n\n } catch (Exception e) {\n log.error(e);\n }\n\n } else if (message.getName().equals(Request.FILEACCEPTREQUEST)) {\n\n try {\n //richiesta di ricezione file\n String sender = message.getSender();\n String fileName = message.getParameters().getParameter().get(0).getValue();\n long fileSize = Long.parseLong(message.getParameters().getParameter().get(1).getValue());\n\n ReceiveFileDialog receiveFileDialog = new ReceiveFileDialog(ccv);\n receiveFileDialog.setSender(sender);\n receiveFileDialog.setFile(fileName);\n receiveFileDialog.setFileSize(fileSize);\n\n //grafica\n String infoText = \"<html>File : \" + fileName + \" <br>\" + \"Da :     <b>\" + sender + \"</b>\" + \"      Dimensione : \" + (fileSize / 1024) + \"k </html>\";\n receiveFileDialog.getInfoLabel().setText(infoText);\n receiveFileDialog.setTitle(\"Ricezione - \" + fileName);\n receiveFileDialog.getStatusLabel().setText(\"\");\n\n receiveFileDialog.setLocationRelativeTo(ccv.getFrame());\n receiveFileDialog.setVisible(true);\n receiveFileDialog.toFront();\n\n } catch (Exception e) {\n log.error(e);\n }\n\n } else if (message.getName().equals(Request.FILEACCEPTRESPONSE)) {\n\n try {\n //richiesta di ricezione file\n String sender = message.getSender();\n log.debug(\"sender : \" + sender);\n String fileName = message.getParameters().getParameter().get(0).getValue();\n log.debug(\"fileName : \" + fileName);\n long fileSize = Long.parseLong(message.getParameters().getParameter().get(1).getValue());\n log.debug(\"fileSize : \" + fileSize);\n String response = message.getParameters().getParameter().get(2).getValue();\n log.debug(\"response : \" + response);\n SendFileDialog sendFileDialog = ccv.getHelper().getSendFileDialog(fileName, sender);\n\n if (response.equals(Command.OK)) {\n sendFileDialog.getFileSender().setAccepted(true);\n } else {\n if (sendFileDialog.getFileSender().isAccepted() && sendFileDialog.getFileSender().isActive()) {\n sendFileDialog.transferStoppedFromReceiver();\n } else if (!sendFileDialog.getFileSender().isAccepted()) {\n sendFileDialog.transferRefusedFromReceiver();\n }\n }\n\n } catch (Exception e) {\n log.error(e);\n }\n\n } else if (message.getName().equals(Request.ADDTOCONFERENCE)) {\n\n try {\n //il priomo elemento è il nick da aggiungere gli alri i membri della conferenza\n String nickToAdd = message.getParameters().getParameter().get(0).getValue();\n\n //dalla lista di partecipanti alla conferenza\n //rcavo l'arrey di quelli che servono in questo client\n List<String> componentsOfConferenz = new LinkedList<String>();\n for (String string : message.getReceivers().getReceiver()) {\n\n if (!string.equals(ccv.getNick())) {\n componentsOfConferenz.add(string);\n }\n }\n componentsOfConferenz.add(message.getSender());\n\n ChatWindow cw = ccv.getHelper().getConferenceWith(componentsOfConferenz.toArray(new String[componentsOfConferenz.size()]));\n cw.addClientToChat(nickToAdd);\n\n } catch (Exception e) {\n log.error(e);\n }\n\n } else if (message.getName().equals(Request.STARTGAME)) {\n log.debug(\"start dama game\");\n try {\n\n GameHome home = new GameHome(ccv);\n home.setLocationRelativeTo(ccv.getFrame());\n home.setVisible(true);\n home.startDamaClient(message.getSender());\n\n } catch (Exception e) {\n log.error(e);\n }\n\n } else if (message.getName().equals(Request.DAMAPOSITION)) {\n try {\n log.debug(\"position for dama\");\n\n int posX = (int) Double.parseDouble(message.getParameters().getParameter().get(0).getValue());\n log.debug(\"posX = \" + posX);\n int posY = (int) Double.parseDouble(message.getParameters().getParameter().get(1).getValue());\n log.debug(\"posY = \" + posY);\n\n DamaCanvas canvas = (DamaCanvas) ccv.getHelper().getGameWith(message.getSender(), DamaCanvas.class);\n log.debug(canvas);\n canvas.setClick(new Point(posX, posY));\n canvas.setMyClick(false);\n canvas.repaint();\n\n } catch (Exception e) {\n //potrebbe da nullpointer\n log.error(e);\n }\n }\n\n// </editor-fold>\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" COMMAND \">\n } else if (message.getType().equals(COMMAND)) {\n\n if (message.getName().equals(Command.REMOVEUSER)) {\n\n String clientToRemove = message.getParameters().getParameter().get(0).getValue();\n\n ArrayList<Client> clients = ccv.getClients();\n ListIterator<Client> li = clients.listIterator();\n boolean continua = true;\n while (li.hasNext() && continua) {\n Client elem = li.next();\n if (elem.getNick().equals(clientToRemove)) {\n log.info(\"remove element : \" + elem);\n clients.remove(elem);\n DefaultListModel listModel = (DefaultListModel) ccv.getClientsList().getModel();\n synchronized (listModel) {\n listModel.removeElement(elem.getNick());\n ccv.getClientsList().validate();\n ccv.getFrame().pack();\n continua = false;\n }\n }\n }\n\n /*aggiungo un nuovo utente che si è connesso*/\n } else if (message.getName().equals(Command.ADDUSER)) {\n String clientToAdd = message.getParameters().getParameter().get(0).getValue();\n\n ccv.getClients().add(new Client(null, clientToAdd));\n// JList list = ccv.getClientsList();\n int position = ccv.getClientsList().getModel().getSize() - 1;\n DefaultListModel listModel = (DefaultListModel) ccv.getClientsList().getModel();\n synchronized (listModel) {\n// listModel.add(position, clientToAdd);\n\n// listModel.remove(listModel.size() - 1);\n listModel.addElement(clientToAdd);\n// listModel.addElement(null);\n\n ccv.getClientsList().validate();\n ccv.getFrame().validate();\n\n log.debug(\"utenti connessi : \");\n for (Object elem : listModel.toArray()) {\n\n try {\n log.debug(\"utente : \" + elem.toString());\n } catch (Exception e) {\n log.debug(\"elemento NULLO\");\n }\n }\n }\n }\n\n }\n // </editor-fold>\n\n\n }\n } catch (Exception e) {\n log.error(e);\n }\n }\n\n\n try {\n is.close();\n } catch (IOException ex) {\n log.error(ex);\n }\n return null;\n\n\n }",
"public void handleMessage(Message msg){\n fishImageView.setScaleX((float) (.3 * fish.getFacingDirection()));\n\n fishImageView.setX((float) fish.x);\n fishImageView.setY((float) fish.y);\n }",
"private void showNotificationMessageWithBigImage(Context context, String title, String message, long timeStamp, Intent intent, String imageUrl) {\n notificationUtils = new NotificationUtils(context);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n notificationUtils.showNotificationMessage(title, message, timeStamp, intent, imageUrl);\n }",
"@Override\n\tpublic void addWaybillPictureSendMessage(WaybillPictureSendSmsEntity entity) {\n\t\t\n\t}",
"public void oncapture(CaptureEvent captureEvent) {\n\t\tFacesMessage msg = new FacesMessage();\n\n\t\t// recharger les parametres de la photo\n\t\ttry {\n\t\t\tloadParamPhoto();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tbyte[] data = captureEvent.getData();\n\n\t\tFile targetFolder = new File(folder_temp);\n\n\t\t// generer un nom de fichier unique\n\t\tString fileUrl = FileUtility.getUidFileName(\"photo-cam.png\");\n\n\t\t// ServletContext servletContext = (ServletContext)\n\t\t// FacesContext.getCurrentInstance().getExternalContext().getContext();\n\t\t// String arquivoFoto = servletContext.getRealPath(File.separator +\n\t\t// \"temp\" +File.separator + fileUrl);\n\n\t\t// System.err.println(\"handle: url----------\" + arquivoFoto);\n\n\t\tFileImageOutputStream imageOutput;\n\t\ttry {\n\t\t\timageOutput = new FileImageOutputStream(new File(targetFolder, fileUrl));\n\n\t\t\t// imageOutput = new FileImageOutputStream(new File(arquivoFoto));\n\n\t\t\timageOutput.write(data, 0, data.length);\n\t\t\timageOutput.close();\n\n\t\t\t//\n\t\t\tsetUrl(fileUrl);\n\t\t\tdossierEtudiantDto.setPhoto(fileUrl);\n\t\t\tthis.photo_attache_capture = true;\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_INFO);\n\t\t\tmsg.setSummary(bundleDocument.getString(\"document_success_upload_file\"));\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t} catch (IOException e) {\n\t\t\tthis.photo_attache_capture = false;\n\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_ERROR);\n\t\t\tmsg.setSummary(bundleDocument.getString(\"document_error_in_writing_captured_image\"));\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void sendCustomMessage(String message, String alli) {\n String frontA = \"V\" + alli;\n String gobbleDeGuck = \"<ID 0><CLR><WIN 0 0 287 31><POS 0 0><SL><S S><BL N><CS 3><GRN><T>\";\n String mid = message;\n String ender = \"</T>\";\n String sendableMsgString = frontA + gobbleDeGuck + mid + ender;\n //\n sendRawMessage(sendableMsgString);\n }",
"@Override\n protected SimpleMessage prepareMessage() {\n SimpleMessage message = super.prepareMessage();\n message.setContent(onFailure());\n return message;\n }",
"@Override\n protected Map<String, DataPart> getByteData()\n {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(Keys.message, new DataPart(imagename + \".png\", getFileDataFromDrawable(bitmap)));\n return params;\n }",
"@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tImageLoaderManager.getInstance().initialize(true, true, Bitmap.Config.RGB_565);\n\t\toptions = ImageLoaderManager.getInstance().getDisplayImageOptions();\n\n\t\tdialog = new MessageDialogFragment();\n\t\tdialog.setOnSimpleMessageListener(new SimpleMessageListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onMessageRead() {\n\t\t\t\tmData.isRead = 1;\n\t\t\t\tdescView.setText(mData.text);\t\t\t\t\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onMessageReadFail(int statusCode) {\n\t\t\t\tmData.isRead = 0;\n\t\t\t\tgetActivity().getSupportFragmentManager().popBackStack();\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tBundle bundle = getArguments();\n\t\tif (bundle != null) {\n\t\t\tdialog.setArguments(bundle);\n\t\t\tmData = bundle.getParcelable(MessageInboxFragment.MESSAGE_OBJECT_KEY);\t\n\t\t\tisRecevie = bundle.getBoolean(MESSAGE_RECEVIE_MODE);\n\t\t\tboolean isRead = mData.isRead == 1 ? true : false;\n\t\t\tif (!isRead) {\n\t\t\t\tdialog.show(getChildFragmentManager(), MessageDialogFragment.MESSAGE_READ);\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t\n\t}",
"public static String renombrarTempMessageKeyFile(String tempMessageKey, String messageKeyServidor, String type, Context miContext){\n String tipo = \"jpeg_base64\";\n String extension = \"\";\n String pathArchivo = \"\";\n String filePath = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/\" + miContext.getResources().getString(R.string.app_name) + \"/\";\n if(tipo.equalsIgnoreCase(type)){\n extension = \".jpg\";\n File photo = new File(filePath, tempMessageKey + extension);\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inPreferredConfig = Bitmap.Config.ARGB_8888;\n Bitmap miImagen = BitmapFactory.decodeFile(photo.getAbsolutePath(), options);\n File file = new File(filePath, messageKeyServidor + extension );\n try {\n OutputStream output = new FileOutputStream(file);\n\n // Compress into png format image from 0% - 100%\n miImagen.compress(Bitmap.CompressFormat.JPEG, 100, output);\n output.flush();\n output.close();\n addImageToGallery(file.getAbsolutePath(), miContext);\n pathArchivo = file.getAbsolutePath();\n miContext.getContentResolver().delete(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, MediaStore.Images.ImageColumns.DATA + \"=?\" , new String[]{ photo.getAbsolutePath() });\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n return pathArchivo;\n }",
"public boolean ponerMsg(String texto)\n\t{\n\t\tif (texto.length() == 0){\n\t\t\tthreadLabel.setBackground(new Color(display, 255,255,255));\n\t\t\treturn true; //salir\n\t\t}else{\n\t\t\tthreadLabel.setBackground(new Color(display, 255,222,173));\n\t\t}\n\n\t\tagregarAHistMsgs(texto);\n\t\t//obtener un lÃmite de 100 cars\n\t\tString msgAct = new String (texto + \" >> \" + threadLabel.getText());\n\t\tif (msgAct.length() > 120){\n\t\t\tmsgAct = new String(msgAct.substring(0, 119));\n\t\t\tmsgAct = msgAct + \"...\";\n\t\t}else{\n\t\t\t// ¿?\n\t\t}\n\t\tthreadLabel.setText(msgAct);\n\t\t//threadLabel.setText(texto);\n\t\treturn true;\n\t}",
"@Override\n\t\t\tpublic void handleMessage(Message inputMessage) {\n\t\t\t\tPhotoTask photoTask = (PhotoTask) inputMessage.obj;\n\t\t\t\t// Gets the ImageView for this task\n\t\t\t\t// PhotoView localView = photoTask.getPhotoView();\n\t\t\t\t// ...\n\t\t\t\tswitch (inputMessage.what) {\n\t\t\t\t// ...\n\t\t\t\t// The decoding is done\n\t\t\t\tcase TASK_COMPLETE:\n\t\t\t\t\t/*\n\t\t\t\t\t * Moves the Bitmap from the task to the View\n\t\t\t\t\t */\n\t\t\t\t\t// localView.setImageBitmap(photoTask.getImage());\n\t\t\t\t\tbreak;\n\t\t\t\t// ...\n\t\t\t\tdefault:\n\t\t\t\t\t/*\n\t\t\t\t\t * Pass along other messages from the UI\n\t\t\t\t\t */\n\t\t\t\t\tsuper.handleMessage(inputMessage);\n\t\t\t\t}\n\t\t\t\t// ...\n\t\t\t}",
"private void showNotificationMessageWithBigImage(Context context, String title, String message, String timeStamp, Intent intent, String imageUrl) {\n notificationUtils = new NotificationUtils(context);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n notificationUtils.showNotificationMessage(title, message, timeStamp, intent, imageUrl);\n }",
"private void showNotificationMessageWithBigImage(Context context, String title, String message, String timeStamp, Intent intent, String imageUrl) {\n notificationUtils = new NotificationUtils(context);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n notificationUtils.showNotificationMessage(title, message, timeStamp, intent, imageUrl);\n }",
"private void showNotificationMessageWithBigImage(Context context, String title, String message, String timeStamp, Intent intent, String imageUrl) {\n notificationUtils = new NotificationUtils(context);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n notificationUtils.showNotificationMessage(title, message, timeStamp, intent, imageUrl);\n }",
"private void sendNotification(RemoteMessage remoteMessage) {\n// Intent intent = new Intent(this, MainActivity.class);\n// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n// PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, intent,\n// PendingIntent.FLAG_ONE_SHOT);\n//\n// Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n// NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)\n// .setSmallIcon(R.drawable.ic_stat_ic_notification)\n// .setContentTitle(\"FCM Message\")\n// .setContentText(messageBody)\n// .setAutoCancel(true)\n// .setSound(defaultSoundUri)\n// .setContentIntent(pendingIntent);\n//\n// NotificationManager notificationManager =\n// (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n//\n// notificationManager.notify(0 /* ID of notification */, notificationBuilder.build());\n //String title = remoteMessage.getNotification().getTitle();\n //String message = remoteMessage.getNotification().getBody();\n String title = remoteMessage.getData().get(\"title\");\n String message = remoteMessage.getData().get(\"text\");\n\n String imageURL = remoteMessage.getData().get(\"imageUrl\");\n long timestamp = remoteMessage.getSentTime();\n String articleID = remoteMessage.getData().get(\"articleID\");\n\n Intent intent = new Intent(this, SplashActivity.class);\n intent.putExtra(\"articleID\", articleID);\n //intent.setAction(\"rs.masinealati.PROCESS_NOTIFICATION\");\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n// PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, intent,\n// PendingIntent.FLAG_ONE_SHOT);\n\n\n showNotificationMessage(getApplicationContext(), title, message, timestamp, intent);\n\n// if (TextUtils.isEmpty(imageURL)) {\n// showNotificationMessage(getApplicationContext(), title, message, timestamp, intent);\n// }else{\n// // Show notification with image\n// Log.e(TAG, \"Notification with image...\");\n// showNotificationMessageWithBigImage(getApplicationContext(), title, message, timestamp, intent, imageURL);\n// }\n\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n fenetre.getClient().envoyerMessage(getMessage(), optionEnvoi); // Envoie du message\n saisieMessage.setText(\"\"); // On supprime le texte de la saisie message\n }",
"private void gestionDefaultLMessage(){\n\n TextView TV_MessageDefaut = (TextView) findViewById(R.id.id_messagebalise);\n ListView LV_ListAmis = (ListView) findViewById(R.id.LV_listeMessages);\n if (listeDiscussion!=null){\n if (listeDiscussion.isEmpty()){\n // Affiche le message par defaut\n TV_MessageDefaut.setText(R.string.MesDiscussions_noResutat);\n TV_MessageDefaut.setVisibility(View.VISIBLE);\n LV_ListAmis.setVisibility(View.GONE);\n\n }\n else{\n // Affiche la liste de discussion\n TV_MessageDefaut.setText(\"\");\n TV_MessageDefaut.setVisibility(View.GONE);\n LV_ListAmis.setVisibility(View.VISIBLE);\n\n }\n }\n\n }",
"void stampaMessaggio(String messaggio);",
"public void showMessage(){\n\t jsfMessageHelper.addInfo(\"Mesaj:\", (messageTxt==null?\"?\":messageTxt));\r\n\t}",
"@Override\r\n public void onClick(View view) {\n\r\n\r\n\r\n final Dialog dialog = new Dialog(holder.context, android.R.style.Theme_Black_NoTitleBar_Fullscreen);\r\n\r\n dialog.setContentView(R.layout.full_screenimage_bottomsheeed);\r\n\r\n PhotoView photoView = dialog.findViewById(R.id.PhotoView);\r\n Picasso.with(holder.context).load(MessageModalList.getMessage()).into(photoView);\r\n dialog.show();\r\n }",
"@Override\r\n public void onClick(View view) {\n\r\n\r\n\r\n final Dialog dialog = new Dialog(holder.context, android.R.style.Theme_Black_NoTitleBar_Fullscreen);\r\n\r\n dialog.setContentView(R.layout.full_screenimage_bottomsheeed);\r\n\r\n PhotoView photoView = dialog.findViewById(R.id.PhotoView);\r\n Picasso.with(holder.context).load(MessageModalList.getMessage()).into(photoView);\r\n dialog.show();\r\n }",
"void onPhotoError();",
"public void add(Message message){\n if (message.getContent().length() <= 280) {\n this.messages.add(message);\n }\n //this.messages.add(message);\n }",
"private void setContent(final Message message, final MimeMultipart alternative, final MimeMultipart attachment,\n final String body)\n throws MessagingException {\n if (0 != attachment.getCount()) {\n // Contenu mixte: Pieces jointes + texte\n if (0 != alternative.getCount() || null != body) {\n // Texte alternatif = texte + texte html\n final MimeBodyPart tmp = new MimeBodyPart();\n tmp.setContent(alternative);\n attachment.addBodyPart(tmp, 0);\n } else {\n // Juste du texte\n final BodyPart plainText = new MimeBodyPart();\n plainText.setContent(body, \"text/plain; \" + CHARSET);\n attachment.addBodyPart(plainText, 0);\n }\n message.setContent(attachment);\n } else {\n // Juste un message texte\n if (0 != alternative.getCount()) {\n // Texte alternatif = texte + texte html\n message.setContent(alternative);\n } else {\n // Texte\n message.setText(body);\n }\n }\n }",
"public ParsedMessage parseMessageContents(Message message, boolean openImages) {\n\n\tString messageContents = \"\";\n\tList<OpenImageWorker> imageWorkers = new LinkedList<>();\n\t\n\ttry {\n\t if (message.getContentType().contains(\"TEXT/PLAIN\")) {\n\t\tmessageContents = (message.getContent().toString());\n\t } else {\n\t\t//Message type is multipart\n\t\tMultipart multipart = (Multipart) message.getContent();\n\t\t\n\t\t\n\t\tfor (int i = 0; i < multipart.getCount(); i++) {\n\t\t //For each part of the message if it's plain text then add that to the text area otherwise log an unrecongized part.\n\t\t BodyPart bodyPart = multipart.getBodyPart(i);\n\t\t if (bodyPart.getContentType().contains(\"TEXT/PLAIN\")) {\n\t\t\tmessageContents += bodyPart.getContent().toString();\n\t\t } else if(bodyPart.getContentType().contains(\"IMAGE/JPEG\")){\n\t\t\t\n\t\t\tif(openImages){\n\t\t\t OpenImageWorker openImageWorker = new OpenImageWorker(bodyPart.getContent());\n\t\t\t imageWorkers.add(openImageWorker);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t }\n\t\t else {\n\t\t\tSystem.out.println(\"Unrecognised content type \" + bodyPart.getContentType());\n\t\t }\n\t\t}\n\t }\n\t} catch (MessagingException | IOException e) {\n\t messageContents = (e.toString());\n\t}\n\t\n\treturn new ParsedMessage(messageContents, imageWorkers);\n }",
"public String getMessage() {\n\t\tString result = message;\n\t\tresult = result.replaceAll(\"\\\\{(.+?)\\\\}\", Matcher.quoteReplacement(\"<img class='imgHelp' title='\" + caption + \":\") + \"$1\" + Matcher.quoteReplacement(\"' src='images/help/\" + key + \"/\") + \"$1\" + Matcher.quoteReplacement(\"'>\"));\n\t\treturn result;\n\t}",
"public void onClickSendMessage(View v) {\n\n String error = \"\";\n\n if (isEmpty(messageTittle)) {\n error = \"entra un titulo valido\";\n } else if (isEmpty(messageText)) {\n error = \"entra un mensaje valido\";\n } else {\n msgtittle = messageTittle.getText().toString();\n msgtext = messageText.getText().toString();\n\n }\n\n if (!error.equals(\"\")) {\n Toast.makeText(this, error, Toast.LENGTH_SHORT).show();\n } else {\n try {\n JMessage jmsg;\n jmsg = new JMessage(msgtext, msgtittle, gson.fromJson(MainActivity.juser, JUser.class), 1, jgroup.getGroupId());\n jmsg.setIdParent(1);\n\n\n Log.d(TAG, \"este es el jmessage a crear =\" + jmsg);\n NewMessage nm = new NewMessage(gson.toJson(jmsg));\n nm.execute();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }",
"public void sendImageToAll(){\n JFileChooser fileChooser = new JFileChooser();\n fileChooser.setCurrentDirectory(new File(System.getProperty(\"user.dir\")));\n int result = fileChooser.showOpenDialog(null);\n if (result == JFileChooser.APPROVE_OPTION) {\n String imagepath = fileChooser.getSelectedFile().getAbsolutePath();\n File image = new File(imagepath);\n long imgsize = image.length();\n try {\n BufferedImage img = ImageIO.read(image);\n String base64Img = null;\n if (imagepath.endsWith(\".png\")) {\n base64Img = base64helper.encodeImageToBase64String(img, \"png\");\n } else {\n base64Img = base64helper.encodeImageToBase64String(img, \"jpg\");\n }\n if (base64Img == null){\n JOptionPane.showMessageDialog(null, \"Error sending image to all because image didnt get loaded correctly.\", Env.ChatClientMessageBoxTitle, JOptionPane.ERROR_MESSAGE);\n return;\n }\n try {\n if (socket == null){\n JOptionPane.showMessageDialog(null, \"SSLSocket is not connected to server. Connect before sending image.\",Env.ChatClientMessageBoxTitle, JOptionPane.ERROR_MESSAGE);\n return;\n }\n PrintWriter writer = new PrintWriter(new OutputStreamWriter(socket.getOutputStream(), \"UTF-8\"), true);\n writer.println(passUtil.toHexString(\"image|split|\" + user.getUsername() + \"|split|\" + base64Img));\n writer.flush();\n chatClientController.appendToPane(new Date(System.currentTimeMillis()) + \": You (\" + user.getUsername() + \"): \" , \"BLUE\", imagepath);\n } catch (Exception ex){\n ex.printStackTrace();\n if (ex.toString().toLowerCase().contains(\"socket output is already shutdown\")){\n disconnectFromServer(false);\n }\n JOptionPane.showMessageDialog(null, \"Error sending image to all: \" + ex.toString(),Env.ChatClientMessageBoxTitle, JOptionPane.ERROR_MESSAGE);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }\n\n }",
"private void ChatNachricht() {\n\t\t//Kein leerer Text\n\t\tif (this.chatSendenArea.getText() != null) {\n\t\t\ttry {\n\t\t\t\tserver.sendChatMessage(\"Spieler \" + this.spielerNummer + \":\"\n\t\t\t\t\t\t+ this.chatSendenArea.getText());\n\t\t\t\tthis.chatSendenArea.setText(\"\");\n\t\t\t} catch (RemoteException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"private void sendImage() {\n try{\n BufferedImage img = ImageIO.read(new File(\"D:\\\\Faiz.jpg\"));\n ByteArrayOutputStream images = new ByteArrayOutputStream();\n ImageIO.write(img, \"jpg\", images);\n// ImageIcon set = new ImageIcon(img);\n// serverLabel.setIcon(set);\n// images.flush();\n //memastikan paket dikirim\n byte[] buffer = images.toByteArray();\n \n DatagramSocket serverS = new DatagramSocket(); \n InetAddress IpAddress = InetAddress.getByName(add_server);\n System.out.println(buffer.length);\n\n DatagramPacket packet = new DatagramPacket(buffer, buffer.length, IpAddress, port_sever);\n\n serverS.send(packet);\n serverS.close();\n }\n catch(Exception e){\n System.out.println(e);\n }\n }",
"@Override\n public void addMessage(byte[] message) throws RemoteException {\n Logger.getGlobal().log(Level.INFO,\"Ajout d'un message dans le composant post de nom : \" + this.getName());\n if(SerializationUtils.deserialize(message) instanceof _DefaultMessage){\n try {\n _DbConnectionManager.serializeJavaObjectToDB(this.dbConnection, message, this.getName(), _Component.postTableName);\n } catch (SQLException e1) {\n Logger.getGlobal().log(Level.SEVERE,\"Error save default message to bd in component : \" + this.getName());\n e1.printStackTrace();\n }\n }else{\n Logger.getGlobal().log(Level.INFO,\"Impossible de sauvegarder ce message, n'est pas un _DefaultMessage dans le component : \" + this.getName());\n }\n }",
"@Override\r\n\tpublic void completed(HttpResponse message) {\n\t\tsuper.completed(message);\r\n\t\tif (message.getEntity().getContentType().getValue().equals(\"image/jpeg\")) {\r\n\t\t\ttry {\r\n\t\t\t\tByteArrayOutputStream output = new ByteArrayOutputStream();\r\n\t\t\t\tImageIO.write(ImageIO.read(message.getEntity().getContent()), \"jpeg\", output);\r\n\t\t\t\tTreeMap<String, byte[]> map = new TreeMap<String, byte[]>();\r\n\t\t\t\tmap.put(bundle.getHeaders().get(\"Video-Stream\").toString(), output.toByteArray());\r\n\t\t\t\tpublisher.addToReadQueue(ProtocolHelper.unmarshel(map));\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tlogger.error(e.getMessage());\r\n\t\t\t}\r\n\t\t} \r\n\t}",
"private void uploadRequest(String msg){\n String path = \"\";\r\n try {\r\n path = getPath(imageUri);\r\n }\r\n catch (URISyntaxException e){\r\n showMsg(\"wrong uri\");\r\n }\r\n String number = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).getString(\"number\",\"12345\");\r\n\r\n AndroidNetworking.upload(Endpoints.upload_request)\r\n .addMultipartFile(\"file\",new File(path))\r\n .addQueryParameter(\"message\",msg)\r\n .addQueryParameter(\"number\",number)\r\n .setPriority(Priority.HIGH)\r\n .build()\r\n .setUploadProgressListener(new UploadProgressListener() {\r\n @Override\r\n public void onProgress(long bytesUploaded, long totalBytes) {\r\n // do anything with progress\r\n long progress = (bytesUploaded/totalBytes*100);\r\n chooseImageText.setText(String.valueOf(progress));\r\n chooseImageText.setOnClickListener(null);\r\n }\r\n })\r\n .getAsJSONObject(new JSONObjectRequestListener() {\r\n @Override\r\n public void onResponse(JSONObject response) {\r\n try {\r\n if(response.getBoolean(\"success\")){\r\n showMsg(\"Succes\");\r\n MakeRequestActivity.this.finish();\r\n }\r\n else {\r\n showMsg(response.getString(\"message\"));\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n\r\n @Override\r\n public void onError(ANError anError) {\r\n\r\n }\r\n });\r\n\r\n }",
"public void clearMessage()\n\t{\n\t\tGraphics g;\n\t\ttry\n\t\t{\n\t\t\tg = messageCanvas.getGraphics();\n\t\t\tg.setColor(new Color(0, 0, 0, 0));\n\t\t\tg.clear();\n\t\t\tg.flush();\n\t\t}\n\t\tcatch (SlickException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\t\n\t}",
"@Override\r\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tsuper.handleMessage(msg);\r\n\t\t\t\tswitch (msg.what) {\r\n\t\t\t\tcase 0: {\r\n\t\t\t\t\t// 实现渐变\r\n\t\t\t\t\timageview.setAlpha(alpha);\r\n\t\t\t\t\timageview.invalidate();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 1: {\r\n\t\t\t\t\tPublicMethod.myOutput(\"-----new image\");\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * imageview.setImageResource(R.drawable.cp1); alpha = 255;\r\n\t\t\t\t\t * imageview.setAlpha(alpha); imageview.invalidate();\r\n\t\t\t\t\t */\r\n\t\t\t\t\t// setContentView(new MyAnimateView(HomePage.this));\r\n\t\t\t\t\tsetContentView(iAnimateView);\r\n\t\t\t\t\tiAnimateView.invalidate();\r\n\t\t\t\t\tiShowStatus = 3;\r\n\r\n\t\t\t\t\tcheckWirelessNetwork();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 2: {\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t showalert();\r\n\t\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\t\te.printStackTrace();// 显示提示框(没有网络,用户是否继续 ) 2010/7/2 陈晨\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Intent in = new Intent(HomePage.this,\r\n\t\t\t\t\t// RuyicaiAndroid.class);\r\n\t\t\t\t\t// startActivity(in);\r\n\t\t\t\t\t// HomePage.this.finish();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 3: {\r\n\t\t\t\t\tPublicMethod.myOutput(\"----comeback\");\r\n\t\t\t\t\t// setContentView(iAnimateView);\r\n\t\t\t\t\tiAnimateView.invalidate();\r\n\t\t\t\t\tMessage mg = Message.obtain();\r\n\t\t\t\t\tmg.what = 5;\r\n\t\t\t\t\tmHandler.sendMessage(mg);\r\n\t\t\t\t\t// saveInformation();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 4: {\r\n\t\t\t\t\tIntent in = new Intent(HomePage.this, RuyicaiAndroid.class);\r\n\t\t\t\t\tstartActivity(in);\r\n\t\t\t\t\tHomePage.this.finish();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 5: {\r\n\t\t\t\t\tsaveInformation();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}",
"public String creerMessage(){\n return profile.getMessage();\n }",
"public void sendMessage() {\n String userMessage = textMessage.getText();\n if (!userMessage.isBlank()) {//проверяю а есть ли что то в текстовом поле\n textMessage.clear();//очищаю текстовое поле на форме\n\n //пока оставлю\n //sb.append(userMessage).append(\"\\n\");\n\n //в общее поле добавляю сообщение\n areaMessage.appendText(userMessage+\"\\n\");\n }\n\n }",
"@Override\n\tpublic void insertMessage(String ToUserName, String FromUserName,\n\t\t\tString CreateTime, String MsgType, String Content, String MsgId,\n\t\t\tString PicUrl, String MediaId, String Format, String ThumbMediaId,\n\t\t\tString Location_X, String Location_Y, String Scale, String Label,\n\t\t\tString Title, String Description, String Url, String Event,\n\t\t\tString EventKey, String Ticket, String Latitude, String Longitude,\n\t\t\tString Precision, String Recognition, int sessionid) {\n\t\t\n\t}",
"@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tsuper.run();\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tWeibo weibo = new Weibo();\r\n\t\t\t\t\t\t\tSharedPreferences setting = ReferenceManager.getInstance(\r\n\t\t\t\t\t\t\t\t\tSendBroadcastMessage.this).getSetting();\r\n\t\t\t\t\t\t\tweibo.setToken(setting.getString(\r\n\t\t\t\t\t\t\t\t\tConstants.ACCESS_TOKEN_KEY, \"\"), setting.getString(\r\n\t\t\t\t\t\t\t\t\tConstants.ACCESS_TOKEN_SECRET, \"\"));\r\n\t\t\t\t\t\t\tif( bm != null ){\r\n\t\t\t\t\t\t\t\tFile f = new File(photopath);\r\n\t\t\t\t\t\t\t\tweibo.uploadStatus(mEdit.getText().toString()+\" http://shengbo.sinaapp.com/voice.php?file=\"+filename, f);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tweibo.updateStatus(mEdit.getText().toString()+\" http://shengbo.sinaapp.com/voice.php?file=\"+filename);//FIXME 这里要加上地址\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tMessage msg = new Message();\r\n\t\t\t\t\t\t\tmsg.what = 2;\r\n\t\t\t\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\tMessage msg = new Message();\r\n\t\t\t\t\t\t\tmsg.what = 3;\r\n\t\t\t\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}",
"public void handleFileUpload(FileUploadEvent event) {\n\n\t\tFacesMessage msg = new FacesMessage();\n\n\t\ttry {\n\t\t\t// recharger les parametres de la photo\n\t\t\ttry {\n\t\t\t\tloadParamPhoto();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\t// this.setUrl( (String) event.getComponent().getAttributes()\n\t\t\t// .get(\"url\") );\n\t\t\t//\n\t\t\t// this.setDossierEtudiantId ( (String)\n\t\t\t// event.getComponent().getAttributes()\n\t\t\t// .get(\"dossierEtudiantId\") );\n\n\t\t\t// FacesContext facesContext = FacesContext.getCurrentInstance();\n\t\t\t// ServletContext scontext = (ServletContext)\n\t\t\t// facesContext.getExternalContext().getContext();\n\t\t\t// String arquivo = scontext.getRealPath(\"/upload/\");\n\t\t\t// System.err.println(\"---------->\" + arquivo + \" ----\" +\n\t\t\t// folder_temp);\n\n\t\t\tFile targetFolder = new File(folder_temp);\n\t\t\t// File targetFolder = new File(arquivo + \"\\\\\");\n\n\t\t\tInputStream inputStream = event.getFile().getInputstream();\n\n\t\t\t// generer un nom de fichier unique\n\t\t\tString fileUrl = FileUtility.getUidFileName(event.getFile().getFileName());\n\n\t\t\tOutputStream out = new FileOutputStream(new File(targetFolder, fileUrl));\n\n\t\t\tint read = 0;\n\t\t\tbyte[] bytes = new byte[4096];\n\n\t\t\twhile ((read = inputStream.read(bytes)) != -1) {\n\t\t\t\tout.write(bytes, 0, read);\n\t\t\t}\n\n\t\t\tinputStream.close();\n\t\t\tout.flush();\n\t\t\tout.close();\n\n\t\t\tsetUrl(fileUrl);\n\n\t\t\tdossierEtudiantDto.setPhoto(fileUrl);\n\t\t\tthis.photo_attache_capture = true;\n\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_INFO);\n\t\t\tmsg.setSummary(bundleDocument.getString(\"document_success_upload_file\"));\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t} catch (IOException e) {\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_ERROR);\n\t\t\tmsg.setSummary(bundleDocument.getString(\"document_error_upload_file\"));\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"private void displayMessage14(String message) {\n TextView ologaReadMore = (TextView) findViewById(R.id.read_more14);\n ologaReadMore.setTextColor(Color.BLACK);\n ologaReadMore.setText(message);\n ologaReadMore.setGravity(Gravity.CENTER);\n }",
"@EventMapping\n\tpublic void handleImageMessageEvent(MessageEvent<ImageMessageContent> event) throws IOException {\n\t\tfinal MessageContentResponse response;\n\t\tString replyToken = event.getReplyToken();\n\t\tString messageId = event.getMessage().getId();\n\t\ttry {\n\t\t\tresponse = lineMessagingClient.getMessageContent(messageId).get();\n\t\t} catch (InterruptedException | ExecutionException e) {\n\t\t\treply(replyToken, new TextMessage(\"Cannot get image: \" + e.getMessage()));\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\t\n//\t\tint index = -1;\n//\t\tfor(int i=0;i<userList.size();i++) {\n//\t\t\tif(userList.get(i).equals(event.getSource().getUserId())) {\n//\t\t\t\tindex = i;\n//\t\t\t\tbreak;\n//\t\t\t}\n//\t\t}\n//\t\tif(index == -1) {\n//\t\t\tcategories = null;\n//\t\t\tprofile = null;\n//\t\t\tmenu = null;\n//\t\t\tindex = userList.size();\n//\t\t\tuserList.add(event.getSource().getUserId());\n//\t\t\tcatList.add(categories);\n//\t\t\tprofList.add(profile);\n//\t\t\tmenuList.add(menu);\n//\t\t}\n//\t\telse {\n//\t\t\tcategories = catList.get(index);\n//\t\t\tprofile = profList.get(index);\n//\t\t\tmenu = menuList.get(index);\n//\t\t}\n\t\tListSingleton singleton = ListSingleton.getInstance();\n\t\tindex = singleton.initiate(event.getSource().getUserId());\n\t\tcategories = singleton.getCategories();\n\t\tprofile = singleton.getProfile();\n\t\tmenu = singleton.getMenu();\n\t\t\n\t\tif (categories == Categories.CAMPAIGN) {\n\t\t\tInputStream initialStream = response.getStream();\n\t\t\tuser.uploadCouponCampaign(initialStream);\n\t\t\tcategories = Categories.MAIN_MENU;\n\t\t\tList<Message> messages = new ArrayList<Message>();\n\t\t\tTextMessage reply = new TextMessage(\"Uploaded successful\");\n\t\t\tmessages.add(reply);\n\t\t\tmessages.add(getMenuTemplate());\n\t\t\tthis.reply(replyToken, messages);\n\t\t}\n\t\t\n\t\telse if (categories == Categories.MENU && menu == Menu.JPEG) {\n\t\t\tDownloadedContent jpg = saveContent(\"jpg\", response);\n\t\t\tString menuStr = inputToFood.readFromJPEG(jpg); // Use this menu string for features\n\t\t\tmenuStr = inputToFood.readFromText(\"\"+event.getSource().getUserId(), menuStr);\n\t\t\tcategories = Categories.MAIN_MENU;\n\t\t\tmenu = null;\n\t\t\treply(((MessageEvent) event).getReplyToken(), new TextMessage(menuStr));\n\t\t}\n\t\telse {\n\t\t\tString message = \"What is this image for?\";\n\t\t\treply(((MessageEvent) event).getReplyToken(), new TextMessage(message));\n\t\t}\n\t\t\t\t\n\t\tsingleton.setValues(index, categories, profile, menu);\n\n\t}",
"@Override\n public void start(MessageReceivedEvent event) {\n boolean isHeads = new Random().nextBoolean();\n ClassLoader loader = getClass().getClassLoader();\n MessageAction message = event.getChannel().sendMessage(isHeads ? \"Heads!\" : \"Tails!\");\n\n try {\n BufferedImage image = ImageIO.read(Objects.requireNonNull(loader.getResourceAsStream(\n isHeads ? \"loonie_heads.png\" : \"loonie_tails.png\")));\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n ImageIO.write(image, \"png\", os);\n message.addFile(os.toByteArray(), \"coin.png\");\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n message.queue();\n }\n }",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\tString [] str=(String [])msg.obj;\n\t\t\tfor(int i=0;i<6;i++)\n\t\t\t{System.out.println(str[i]);}\n\t\t\t if(mDialog.isShowing()==true){\n\t\t\t\t mDialog.dismiss(); \n\t\t\t }\n\t\t\t if(str[0].toString().equals(\"anyType{}\")==true){\n//\t\t\t \tSystem.out.println(str[0]);\n\t\t\t\t title.setText(str[1]);\n\t\t\t\t time.setText(str[2]);\n\t\t\t\t type.setText(str[3]);\n\t\t\t\t content.setText(str[4]);\n\t\t\t\t name.setText(str[5]);\n//\t\t\t Toast.makeText(getApplicationContext(),\"发布成功\",Toast.LENGTH_SHORT).show();\n\t\t\t }\n\t\t\t else{\n\t\t\t \tToast.makeText(getApplicationContext(),str[0],Toast.LENGTH_SHORT).show();\n\t\t\t }\n\t\t}",
"@Override\n public void onMessage(String channel, String message) {\n String result[] = new String[3];\n result = jsonToString.recorrer(message, result);\n System.out.println(result[0]);\n System.out.println(result[1]);\n System.out.println(result[2]);\n nn = new NanozNotificacion(result[1], result[0]);\n nn.setVisible(true);\n //estado = JOptionPane.showConfirmDialog(null, result[0]);\n //notificacionCiclada(result, estado);\n }",
"@Override\n\tpublic void onClick(ClickEvent event) {\n\t\tImage image=(Image)event.getSource();\n\t\tif (image.getAltText().equals(\"nonotice\")) {\n\t\t\timage.setUrl(\"images/notice.jpg\");\n\t\t\timage.setAltText(\"notice\");\n\t\t} else {\n\t\t\timage.setUrl(\"images/nonotice.jpg\");\n\t\t\timage.setAltText(\"nonotice\");\n\t\t}\n\t\treadFeed();\n\t}"
] |
[
"0.73329455",
"0.69256896",
"0.65507853",
"0.6202077",
"0.6168196",
"0.61207014",
"0.60960853",
"0.60588264",
"0.6056171",
"0.60552865",
"0.59987766",
"0.5989685",
"0.5982037",
"0.59736645",
"0.59396714",
"0.59294695",
"0.5903766",
"0.5835344",
"0.58012575",
"0.5795889",
"0.579005",
"0.5743557",
"0.572504",
"0.5723015",
"0.5705735",
"0.5704022",
"0.57017696",
"0.5681222",
"0.5679391",
"0.5676312",
"0.5659249",
"0.5647477",
"0.56262124",
"0.5621075",
"0.56102204",
"0.56049633",
"0.5596049",
"0.5590289",
"0.5580622",
"0.55762494",
"0.5574566",
"0.5573485",
"0.55493855",
"0.55487263",
"0.5547116",
"0.55377436",
"0.5535874",
"0.5532844",
"0.5532013",
"0.5520928",
"0.5518809",
"0.55157995",
"0.55124307",
"0.55122066",
"0.5511965",
"0.5503187",
"0.5493228",
"0.5492625",
"0.54850453",
"0.5483181",
"0.54735315",
"0.54701495",
"0.5468358",
"0.54666394",
"0.54639626",
"0.5462904",
"0.5462904",
"0.5462904",
"0.5462325",
"0.54511744",
"0.5448023",
"0.5440186",
"0.54380256",
"0.54195136",
"0.54195136",
"0.5410093",
"0.5407549",
"0.54058653",
"0.54033154",
"0.53912693",
"0.5389823",
"0.5387462",
"0.53812265",
"0.5379769",
"0.5379016",
"0.5375854",
"0.5365424",
"0.53565216",
"0.5346962",
"0.5339315",
"0.53329426",
"0.532834",
"0.5322483",
"0.53199095",
"0.53138983",
"0.53054476",
"0.53030515",
"0.5301028",
"0.52905065",
"0.52843314"
] |
0.55642426
|
42
|
should modify find by lesson > admin or student view
|
@Override
public List<GameResponseDTO> findAllByLessonId(long lessonId) {
List<GameResponseDTO> gameResponseDTOList = new ArrayList<>();
try {
List<Game> gameList = iGameRepository.findByLessonIdAndStatusNot(lessonId, DELETED_STATUS);
if (!gameList.isEmpty()) {
for (Game game : gameList) {
GameResponseDTO gameResponseDTO = modelMapper.map(game, GameResponseDTO.class);
gameResponseDTOList.add(gameResponseDTO);
}
}
} catch (Exception e) {
logger.error("Find all games by lessonId = " + lessonId + "! " + e.getMessage());
return null;
}
return gameResponseDTOList;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Lesson saveInternal(final Lesson lesson) {\n\t\tAssert.notNull(lesson);\n\n\t\t//Assertion that the user modifying this lesson has the correct privilege.\n\t\tfinal Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n\t\tAssert.isTrue(authentication.getAuthorities().toArray()[0].toString().equals(\"AUDITOR\"));\n\n\t\tfinal Lesson saved = this.lessonRepository.save(lesson);\n\t\treturn saved;\n\t}",
"@Test\n public void adminShouldSeeStudentDetailsTest() throws Exception {\n StudyPlan studyPlan1 = studyPlanRepository.save(new StudyPlan(\"SE\", new EctsDistribution(new BigDecimal(60), new BigDecimal(30), new BigDecimal(30))));\n StudyPlan studyPlan2 = studyPlanRepository.save(new StudyPlan(\"VC\", new EctsDistribution(new BigDecimal(60), new BigDecimal(30), new BigDecimal(30))));\n studyPlanRepository.save(new StudyPlan(\"CI\", new EctsDistribution(new BigDecimal(60), new BigDecimal(30), new BigDecimal(30))));\n\n // given a student, registered to studyplan1 and studyplan2\n Semester semester = semesterRepository.save(new Semester(2016, SemesterType.WinterSemester));\n Student student = uisUserRepository.save(new Student(\"s12345\", \"student\", \"[email protected]\"));\n StudyPlanRegistration studyPlanRegistration1 = new StudyPlanRegistration(studyPlan1, semester);\n StudyPlanRegistration studyPlanRegistration2 = new StudyPlanRegistration(studyPlan2, semester);\n student.addStudyplans(studyPlanRegistration1, studyPlanRegistration2);\n\n mockMvc.perform(\n get(\"/admin/users/\" + student.getId())\n .with(user(\"admin\").roles(Role.ADMIN.name()))\n ).andExpect(\n model().attribute(\"user\", student)\n ).andExpect(\n model().attribute(\"studyplans\", asList(studyPlanRegistration1, studyPlanRegistration2))\n );\n\n }",
"@Transactional\n\t@Override\n\tpublic boolean editLesson(VInputLesson vil) throws Exception {\n\t\tLesson lesson = vil.getLesson();\n\t\tList<Integer> branches = vil.getBranches();\n\t\tif (lessonDao.updateLesson(lesson)) {\n\t\t\tlessonbranchDao.deleteBranchesByLid(lesson.getLid());\n\t\t\tfor (Integer branchid : branches) {\n\t\t\t\tLessonbranch lessonbranch = new Lessonbranch();\n\t\t\t\tlessonbranch.setBranchid(branchid);\n\t\t\t\tlessonbranch.setLid(lesson.getLid());\n\t\t\t\tif(lessonbranchDao.insert(lessonbranch) == false) return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"Lesson loadLesson(int id) throws DataAccessException;",
"Collection<Lesson> getActiveLessons() throws DataAccessException;",
"@Test\n public void adminShouldSeeLecturerDetailsTest() throws Exception {\n Lecturer lecturer = uisUserRepository.save(new Lecturer(\"l12345\", \"lecturer\", \"[email protected]\"));\n Subject maths = new Subject(\"maths\", new BigDecimal(6.0));\n Subject df = new Subject(\"digital forensics\", new BigDecimal(6.0));\n maths.addLecturers(lecturer);\n df.addLecturers(lecturer);\n subjectRepository.save(maths);\n subjectRepository.save(df);\n\n mockMvc.perform(\n get(\"/admin/users/\" + lecturer.getId())\n .with(user(\"admin\").roles(Role.ADMIN.name()))\n ).andExpect(\n model().attribute(\"user\", lecturer)\n ).andExpect(\n model().attribute(\"subjects\", asList(maths, df))\n );\n\n }",
"List<Admin> selectByExample(AdminExample example);",
"void viewStudents(Professor professor);",
"public Student findById(int theStudent_id);",
"Collection<Lesson> getLessons() throws DataAccessException;",
"public String modifyStu() {\n\t\tSystem.out.println(\"====================>>>>>\");\r\n\t\tSystem.out.println(stu.getStu_class());\r\n\t\tSystem.out.println(stu.getStu_name());\r\n\t\tSystem.out.println(de_id);\r\n\t\tDepartment de = departmentService.findDepartById(de_id);\r\n\t\tstu.setStu_department(de);\r\n\t\tSystem.out.println(\"====================>>>>>\");\r\n\t\tstuser.updateStudent(stu);\r\n\t\treturn \"modifyStuSuccess\";\r\n\t}",
"@Test\n public void getManyCoursesOfCurrentSemesterForSubjectTest() throws Exception {\n Lehrveranstaltung course1 = courseRepository.save(new Lehrveranstaltung(subject, ws2016));\n Lehrveranstaltung course2 = courseRepository.save(new Lehrveranstaltung(subject, ws2016));\n\n // the user should see a list of courses of this subject\n mockMvc.perform(\n get(\"/student/lehrveranstaltungen/semester/subject\")\n .with(user(\"student\").roles(\"STUDENT\"))\n .param(\"subjectId\", subject.getId().toString())\n ).andExpect(\n view().name(\"/student/courses-for-subject\")\n ).andExpect(\n model().attribute(\"coursesForSemesterAndSubject\", asList(course1, course2))\n );\n }",
"public List<Lesson> findByCourseId(String courseId);",
"void storeLesson(Lesson lesson) throws DataAccessException;",
"@Override\r\n\tpublic int editReportByStudent(ReportAndSummary reportAndSummary) {\n\t\tStudent s = studentDao.findById(reportAndSummary.getStudent().getId());\r\n\t\tList<ClassTeacherRelationship> c = allocateClassDao.findByClassId(s.getClassId().getId());\r\n\t\treportAndSummary.setTrainningTeacher(c.get(0).getTrainningTeacher());\r\n\t\tint result = reportAndSummaryDao.editReportByStudent(reportAndSummary);\r\n\t\treturn result;\r\n\t}",
"public Vector findAllEdit(\n Integer supregid/*not used!?*/,\n String login,\n Boolean isAdmin,\n String planstate)\n throws Exception {\n Query query = null;\n\n if (!isAdmin.booleanValue()) {\n\n if (planstate.equals(Checks.POSITION_PLANSTATE_Fact)) {\n query = new Query(QUERY_SELECT_EditFact, RESULT_JdbcObjectVector);\n\n } else\n if (planstate.equals(Checks.POSITION_PLANSTATE_Plan)) {\n query = new Query(QUERY_SELECT_EditPlan, RESULT_JdbcObjectVector);\n }else{\n\t query = new Query(QUERY_SELECT_Edit, RESULT_JdbcObjectVector);\n\t }\n query.append(\"AND o.loiginid=?\", login);\n } else {\n query = new Query(QUERY_SELECT_Admin, DataUtil.RESULT_JdbcObjectVector);\n }\n \n query.append(\"ORDER BY regname\");\n\n return findVector(query);\n}",
"public void modifyStudents(String id) {\r\n System.out.println(\"conectado con model ---> metodo modifyStudents\");\r\n //TODO\r\n }",
"void addLessonToModule(Module module, Lesson lesson);",
"public Student findStudent(int id);",
"@Transactional\n\t@Override\n\tpublic List<Lesson> showLesson(int qid) throws Exception {\n\t\treturn lessonDao.findAllByQid(qid);\n\t}",
"int updateByExampleSelective(@Param(\"record\") Admin record, @Param(\"example\") AdminExample example);",
"int updateByPrimaryKeySelective(StudentGuardian record);",
"@Test\n public void getTheOnlyCourseOfCurrentSemesterForSubjectTest() throws Exception {\n Lehrveranstaltung course = courseRepository.save(new Lehrveranstaltung(subject, ws2016));\n\n // the user should be redirected directly to the course page\n mockMvc.perform(\n get(\"/student/lehrveranstaltungen/semester/subject\")\n .with(user(\"student\").roles(\"STUDENT\"))\n .param(\"subjectId\", subject.getId().toString())\n ).andExpect(\n redirectedUrl(\"/student/lehrveranstaltungen/\" + course.getId())\n );\n }",
"@Override\r\n\tpublic void editTea(Teacher teacher) {\n\r\n\t}",
"public void modifyStudent(Student student) {\n\t\t\r\n\t}",
"boolean makeAdmin(User user);",
"void setData(OrderedRealmCollection<LessonData> lessons)\n {\n if (filteredLessons == lessons)\n return;\n this.filteredLessons = lessons;\n notifyDataSetChanged();\n }",
"int updateByExampleSelective(@Param(\"record\") AdminUser record, @Param(\"example\") AdminUserCriteria example);",
"int updateByPrimaryKeySelective(Admin record);",
"@Override\n\tpublic boolean modify(Administrateur admin) {\n\t\ttry\n\t\t{\n\t\t\topenCurrentSessionWithTransaction();\n\t\t\tgetCurrentSession().update(admin);\n\t\t\tcloseCurrentSessionWithTransaction();\n\t\t\treturn true;\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}",
"private void viewTeacher() {\n //Lesen wir die ID\n Scanner sc = new Scanner(System.in);\n System.out.print(\"ID of the teacher to be viewed: \");\n long ID = sc.nextLong();\n\n Teacher t = ctrl.getTeacherRepo().findOne(ID);\n if (t != null)\n System.out.println(t.toString());\n else\n System.out.println(\"Teacher with this ID doesn't exist!\");\n }",
"int updateByExampleSelective(@Param(\"record\") AdminTab record, @Param(\"example\") AdminTabExample example);",
"List<AdminTab> selectByExample(AdminTabExample example);",
"public List<StudentVM> getAllStudentDetailsAdmin(String userUuid);",
"private void viewAllStudents() {\n Iterable<Student> students = ctrl.getStudentRepo().findAll();\n students.forEach(System.out::println);\n }",
"public Vector findEditBySuperRegion(\n Integer supregid,\n String login,\n Boolean isAdmin,\n String planstate)\n throws Exception {\n Query query = null;\n\n if (!isAdmin.booleanValue()) {\n\n if (planstate.equals(Checks.POSITION_PLANSTATE_Fact)) {\n query = new Query(QUERY_SELECT_EditFact, RESULT_JdbcObjectVector);\n\n } else\n if (planstate.equals(Checks.POSITION_PLANSTATE_Plan)) {\n query = new Query(QUERY_SELECT_EditPlan, RESULT_JdbcObjectVector);\n }else{\n\t query = new Query(QUERY_SELECT_Edit, RESULT_JdbcObjectVector);\n\t }\n query.append(\"AND o.loiginid=?\", login);\n } else {\n query = new Query(QUERY_SELECT_Admin, DataUtil.RESULT_JdbcObjectVector);\n }\n query.append(\"AND r.supregid=?\", supregid);\n query.append(\"ORDER BY regname\");\n\n return findVector(query);\n}",
"@Override\n\tpublic List<Lease> queryLeasebyStudentId(int sid) {\n\t\treturn leaseDAO.findLeasebyStudentId(sid);\n\t}",
"public interface StudentRepository extends JpaRepository<Student,Integer> {\n\n Student findAdminByNum(Long num);\n\n Student findAdminByName(String name);\n\n\n}",
"int updateByPrimaryKeySelective(TrainingCourse record);",
"int updateByExampleSelective(@Param(\"record\") GroupRightDAO record, @Param(\"example\") GroupRightDAOExample example);",
"public Vector findEditBySuperRegion(\n Integer supregid,\n String login,\n Boolean isAdmin)\n throws Exception {\n return findEditBySuperRegion(\n supregid,\n login,\n isAdmin,\n SearchConstants.SEARCH_ALL);\n}",
"@Override\n\tpublic List<UsuariosEntity> findAdmin(){\n\t\treturn (List<UsuariosEntity>) iUsuarios.findAdmin();\n\t}",
"@Transactional\n\t@Override\n\tpublic VOutputLesson getLessonById(int id) throws Exception {\n\t\treturn lessonDao.findById(id);\n\t}",
"int updateByPrimaryKeySelective(courses record);",
"int updateByPrimaryKeySelective(WordSchool record);",
"@Override\n public Lesson findByLessonID(Long lessonID) {\n System.out.println(\"test to see if findByLessonId is called =============================================\");\n Lesson lesson = lessonRepository.findByLessonID(lessonID);\n System.out.println(\"test to see if this prints below lessonRepository\");\n return lesson;\n }",
"boolean moduleHasLesson(Module module, Lesson lesson);",
"public void upd2(Connection con, loginProfile prof) throws qdbException, qdbErrMessage, SQLException {\n res_id = mod_res_id;\n res_type = RES_TYPE_MOD;\n res_upd_user = prof.usr_id;\n\n super.checkTimeStamp(con);\n\n if (res_status.equalsIgnoreCase(RES_STATUS_ON) || res_status.equalsIgnoreCase(RES_STATUS_DATE)) {\n // Check if the question is ordered in 1,2,3....\n if (!checkQorder(con)) {\n //Questions are not in the correct order.\n throw new qdbErrMessage(\"MOD001\");\n }\n }\n\n //if the module is standard test or dynamic test\n //make sure that you can only turn the module online\n //if the test has question/criteria defined in it\n if (res_status.equalsIgnoreCase(RES_STATUS_ON)) {\n if (mod_type.equalsIgnoreCase(MOD_TYPE_TST)) {\n if (dbResourceContent.getResourceContentCount(con, mod_res_id) == 0) {\n res_status = RES_STATUS_OFF;\n }\n } else if (mod_type.equalsIgnoreCase(MOD_TYPE_DXT)) {\n if (dbModuleSpec.getModuleSpecCount(con, mod_res_id) == 0) {\n res_status = RES_STATUS_OFF;\n }\n }\n }\n\n super.updateStatus(con);\n\n // permission records have to be cleared no matter mod_instructor is specified or not\n dbResourcePermission.delUserRoleIsNull(con, mod_res_id);\n if (mod_instructor_ent_id_lst != null) {\n for (int i = 0; i < mod_instructor_ent_id_lst.length; i++) {\n dbResourcePermission.save(con, mod_res_id, mod_instructor_ent_id_lst[i], null, true, true, false);\n }\n }\n\n //Dennis, 2000-12-13, impl release control\n //If the new status == DATE, update the eff_start/end_datetime in Module\n //if(res_status.equalsIgnoreCase(RES_STATUS_DATE))\n //2001-01-05, all status will have eff datetime\n updateEffDatetime(con);\n }",
"NominatedStudentDto edit(NominatedStudentDto nominatedStudent, int userId, String userRole);",
"int updateByPrimaryKeySelective(TrainCourse record);",
"@Test\n public void testSelectByLessonId() {\n disciplineTest = disciplineDao.selectByLessonId(1);\n boolean result = disciplineTest != null;\n assertTrue(result);\n }",
"public Admin queryOneAdmin(Admin admin);",
"private void studenti(reusablemenu.sample.Student curent) {\n\t\t\r\n\t}",
"int updateByExampleSelective(@Param(\"record\") Student record, @Param(\"example\") StudentCriteria example);",
"private static void LessonDAOUpdate() {\n PersonDAO personDAO = new PersonDAOImpl();\n\n Person person = personDAO.getPersonById(7);\n person.setFirstName(\"Teddy\");\n\n if(personDAO.updatePerson(person)) {\n System.out.println(\"Person Update Success!\");\n } else {\n System.out.println(\"Person Update Fail!\");\n }\n }",
"@Update(\"UPDATE student SET name = #{name}, gpa = #{gpa} WHERE npm = #{npm}\")\n\tvoid updateStudent(StudentModel student);",
"int updateByPrimaryKeySelective(Student record);",
"int updateByPrimaryKeySelective(Student record);",
"int updateByPrimaryKeySelective(Student record);",
"private CommandResult updateLesson() throws KolinuxException {\n timetable.executeUpdate(parsedArguments);\n logger.log(Level.INFO, \"User has updated the timetable.\");\n return new CommandResult(parsedArguments[0].toUpperCase() + \" \"\n +\n parsedArguments[1].toUpperCase() + \" has been updated\");\n }",
"@Override\n\tpublic ResultVo update(Student student) {\n\t\treturn null;\n\t}",
"@Test\n public void setTutor() {\n Employee em = employeeService.findById(5);\n System.out.println(\"=======\" + em.getName());\n Student student1 = studentService.findById(22);\n System.out.println(\"*********\" + student1.getName());\n student1.setTutor(em);\n studentService.update(student1);\n studentService.saveOrUpdate(student1);\n }",
"int updateByPrimaryKeySelective(AdminUser record);",
"int updateByPrimaryKeySelective(AdminUser record);",
"int updateByExampleSelective(TResearchTeach record, TResearchTeachExample example);",
"public boolean isUpdateRight() {\r\n if (getUser() != null) {\r\n return getUser().hasPermission(\"/vocabularies\", \"u\");\r\n }\r\n return false;\r\n }",
"void update(int id, int teacherid, int noteid );",
"List<Student> findAllByStatus(Student.Status status);",
"@RequestMapping(value = \"/edit/{id}\", method = RequestMethod.GET)\n public String editStudent(ModelMap view, @PathVariable int id) {\n Student student = studentService.findById(id);\n view.addAttribute(\"student\", student);\n view.addAttribute(\"updateurl\", updateurl);\n return(\"editstudent\");\n }",
"@Override\r\n\tpublic int editReportByTeacher(ReportAndSummary reportAndSummary) {\n\t\tint result = reportAndSummaryDao.editReportByTeacher(reportAndSummary);\r\n\t\treturn result;\r\n\t}",
"private static void editStudent () {\n System.out.println(\"Here is a list of Students..\");\n showStudentDB();\n System.out.println(\"Enter Id of student you want to edit: \");\n int studentId = input.nextInt();\n input.nextLine();\n Student student = null;\n\n for(Student s: studentDB) {\n if(s.getID() == studentId) {\n student = s;\n }\n }\n\n if(student != null) {\n System.out.println(\"Enter New Name\");\n String str = input.nextLine();\n student.setName(str);\n System.out.println(\"Name is changed!\");\n System.out.println(\"Id: \" + student.getID() + \"\\n\" + \"Name: \" + student.getName() );\n } else {\n System.out.println(\"Invalid Person!\");\n }\n }",
"@Test\n public void modifierArticleKO(){\n String nomArticle = \"short\";\n Article articleBD = daoArticle.findByNom(nomArticle); //peut renvoyer null si l'article \"Chaussons\" n'existe pas en BD \n \n Double prixHT = 6.55;\n Integer delaisAppros = 4;\n Integer delaisDeLivraisonArt =6; \n Integer quantiteStock = 25;\n Article articleAvecModifications = new Article(nomArticle, prixHT, delaisAppros, delaisDeLivraisonArt, quantiteStock); //attributs d'instance ayant @Column(nullable = false)\n articleAvecModifications.setDescription(\"très bonne qualitée\");\n articleS.modifierArticle(articleBD, articleAvecModifications);\n \n if(articleBD == null){\n System.out.println();System.out.println();System.out.println();System.out.println(\"=============================================================\");\n System.out.println(\"ARTICLE \" + nomArticle + \" N'EXISTE PAS EN BD : \" + articleBD);\n System.out.println();System.out.println();System.out.println();System.out.println(\"=============================================================\"); \n }\n }",
"int updateByPrimaryKeySelective(Course record);",
"void deleteLesson(int id) throws DataAccessException;",
"public Vector findAllEdit(String login, Boolean isAdmin, String planstate)\n throws Exception {\n Query query = null;\n\n if (!isAdmin.booleanValue()) {\n\n if (planstate.equals(Checks.POSITION_PLANSTATE_Fact)) {\n query = new Query(QUERY_SELECT_EditFact, RESULT_JdbcObjectVector);\n\n } else if (planstate.equals(Checks.POSITION_PLANSTATE_Plan)) {\n query = new Query(QUERY_SELECT_EditPlan, RESULT_JdbcObjectVector);\n } else {\n query = new Query(QUERY_SELECT_Edit, RESULT_JdbcObjectVector);\n }\n query.append(\"AND o.loiginid=?\", login);\n } else {\n query = new Query(QUERY_SELECT_Admin, DataUtil.RESULT_JdbcObjectVector);\n }\n\n query.append(\"ORDER BY regname\");\n\n return findVector(query);\n}",
"int updateByExampleSelective(@Param(\"record\") Student record, @Param(\"example\") StudentExample example);",
"List<AdminUser> selectByExample(AdminUserCriteria example);",
"List<AdminUser> selectByExample(AdminUserCriteria example);",
"public String updatePrivilege() {\r\n\r\n String elementID = this.getParam(\"idElement\");\r\n // If need to add to update list.\r\n boolean needToAdd = false;\r\n\r\n String optin = this.getParam(\"optin\");\r\n String optout = this.getParam(\"optout\");\r\n String view = this.getParam(\"view\");\r\n String read = this.getParam(\"read\");\r\n String update = this.getParam(\"update\");\r\n String administrate = this.getParam(\"administrate\");\r\n\r\n Subject updateSubject = (Subject) this.getAddedItem(elementID);\r\n\r\n if (updateSubject == null) {\r\n updateSubject = (Subject) this.updatedGroups.get(elementID);\r\n if (updateSubject == null) {\r\n Subject aux = (Subject) this.getItem(elementID);\r\n if (aux.getValueFormCol(\"canOptin\") == null) {\r\n aux.addMappingFieldCol(\"canOptin\", ESCOConstantes.FALSE);\r\n }\r\n if (aux.getValueFormCol(\"canOptout\") == null) {\r\n aux.addMappingFieldCol(\"canOptout\", ESCOConstantes.FALSE);\r\n }\r\n updateSubject = (Subject) aux.clone();\r\n this.originalGroups.put(elementID, aux);\r\n needToAdd = true;\r\n }\r\n }\r\n\r\n GroupPrivilegeEnum theRight = updateSubject.getSubjectRight();\r\n\r\n if (theRight == null) {\r\n theRight = GroupPrivilegeEnum.NONE;\r\n }\r\n\r\n if (optin != null) {\r\n // OptIn is true\r\n if (optin.equals(ESCOConstantes.TRUE)) {\r\n // Adding the VIEW privilege\r\n if (theRight.eq(GroupPrivilegeEnum.NONE)) {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.VIEW);\r\n }\r\n }\r\n // Adding the OptIn\r\n updateSubject.addMappingFieldCol(\"canOptin\", Boolean.valueOf(optin.equals(ESCOConstantes.TRUE))\r\n .toString());\r\n }\r\n\r\n if (optout != null) {\r\n // OptOut is true\r\n if (optout.equals(ESCOConstantes.TRUE)) {\r\n // Adding the VIEW privilege\r\n if (theRight.eq(GroupPrivilegeEnum.NONE)) {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.VIEW);\r\n }\r\n }\r\n updateSubject.addMappingFieldCol(\"canOptout\", Boolean.valueOf(optout.equals(ESCOConstantes.TRUE))\r\n .toString());\r\n }\r\n\r\n if (view != null) {\r\n if (view.equals(ESCOConstantes.TRUE)) {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.VIEW);\r\n } else {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.NONE);\r\n updateSubject.setOptin(false);\r\n updateSubject.setOptout(false);\r\n }\r\n }\r\n if (read != null) {\r\n if (read.equals(ESCOConstantes.TRUE)) {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.READ);\r\n } else {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.VIEW);\r\n }\r\n }\r\n if (update != null) {\r\n if (update.equals(ESCOConstantes.TRUE)) {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.UPDATE);\r\n } else {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.READ);\r\n }\r\n }\r\n if (administrate != null) {\r\n if (administrate.equals(ESCOConstantes.TRUE)) {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.ADMIN);\r\n } else {\r\n updateSubject.setSubjectRight(GroupPrivilegeEnum.UPDATE);\r\n }\r\n }\r\n\r\n // Only one group in the list of group of the members class because\r\n // we add it to convert group to subject.\r\n if (needToAdd) {\r\n this.updatedGroups.put(elementID, updateSubject);\r\n } else {\r\n Sortable theOrignGroup = this.originalGroups.get(elementID);\r\n if (theOrignGroup != null) {\r\n if (theOrignGroup.getValueFormCol(ESCOConstantes.USER_RIGHT_VALUE).toUpperCase().equals(\r\n updateSubject.getValueFormCol(ESCOConstantes.USER_RIGHT_VALUE).toUpperCase())) {\r\n if (theOrignGroup.getValueFormCol(\"canOptin\").toUpperCase().equals(\r\n updateSubject.getValueFormCol(\"canOptin\").toUpperCase())) {\r\n if (theOrignGroup.getValueFormCol(\"canOptout\").toUpperCase().equals(\r\n updateSubject.getValueFormCol(\"canOptout\").toUpperCase())) {\r\n // The updateGroup and origin is same.\r\n this.updatedGroups.remove(elementID);\r\n this.originalGroups.remove(elementID);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Create and return the XML status.\r\n XmlProducer producer = new XmlProducer();\r\n producer.setTarget(new Status(Boolean.TRUE));\r\n producer.setTypesOfTarget(Status.class);\r\n\r\n return this.xmlProducerWrapper.wrap(producer);\r\n }",
"int updateByPrimaryKeySelective(RepStuLearning record);",
"int updateByExampleSelective(@Param(\"record\") TUserPermission record, @Param(\"example\") TUserPermissionExample example);",
"int updateByExampleSelective(@Param(\"record\") AdminUser record,\n @Param(\"example\") AdminUserCriteria example);",
"int insertSelective(Admin record);",
"int insertSelective(Admin record);",
"Collection<Section> findByStudentNo(int studentNumber);",
"int updateByPrimaryKeySelective(AdminTab record);",
"int updateByPrimaryKeySelective(StudentEntity record);",
"void userChangeByAdmin(AdminUserDTO adminUserDTO) throws RecordExistException;",
"@Override\n public boolean studentEditClass(Token token, int courseID, String grading, String courseTerm) {\n // TODO Auto-generated method stub\n Student student = new Student();\n return student.studentEditClass(token, courseID, grading, courseTerm);\n }",
"public abstract boolean onUserBelongHere(StudentRecord record);",
"public void makeItPublic(int exam_ID){\n StringBuffer sql1=new StringBuffer();\n sql1.append(\"UPDATE Exam \");\n sql1.append(\"SET isPublic=1\");\n sql1.append(\" where Exam_ID='\");\n sql1.append(exam_ID+\"';\");\n StringBuffer sql2=new StringBuffer();\n sql2.append(\"UPDATE Exam \");\n sql2.append(\"SET isPublic=0\");\n sql2.append(\" where isPublic=1;\");\n\n \n SQLHelper sQLHelper = new SQLHelper();\n sQLHelper.sqlConnect();\n \n sQLHelper.runUpdate(sql2.toString());\n sQLHelper.runUpdate(sql1.toString());\n \n }",
"Admin selectByName(String adminName);",
"Student findById(String id);",
"public student getstudent(Integer id);",
"@Test(groups ={Slingshot,Regression})\n\tpublic void EditViewLessthan15Accts() {\n\t\tReport.createTestLogHeader(\"MuMv\",\"Verify whether user is able to edit the existing view successfully and it gets reflected in the list\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvTestdataforFAA\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ManageViews()\n\t\t.VerifyEditviewname(userProfile) \t\t\t\t\t\t \t \t\t\n\t\t.EditViewNameforLessthan15Accts(userProfile)\n\t\t.ClickAddUserRHNLink()\n\t\t.StandardUser_Creation()\t\t\t\t\t\t \t \t\t\n\t\t.verifyEditedview(userProfile)\n\t\t.enterValidData_StandardUserforEditview(userProfile);\n\t\tnew BgbRegistrationAction()\n\t\t.AddNewStdUserdata(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTable(userProfile);\t\n\t}",
"@RequestMapping(\"/upgrade/{id}\") public String upgradeToTeacher(@PathVariable(\"id\") long id, Model model){\n Student student = students.findById(id).get();\n model.addAttribute(\"newTeacher\", adminService.studentToTeacher(student));\n model.addAttribute(\"dpmnts\", dpmnts.findAll());\n students.delete(student);\n return \"admin/addteacher\";\n }",
"int updateByExample(@Param(\"record\") Admin record, @Param(\"example\") AdminExample example);",
"int updateByExample(@Param(\"record\") AdminUser record, @Param(\"example\") AdminUserCriteria example);",
"public interface HomeworkService extends CRUDService<Homework>{\n\n List<Homework> findByTitle(String title);\n List<Homework> findByLesson(Lesson lesson);\n List<Homework> findByLesson_Subject_User(User user);\n}",
"int updateByPrimaryKeySelective(StudentInfo record);",
"boolean adminUpdate(int userId, int statusId, int reimbId);"
] |
[
"0.54632586",
"0.5449013",
"0.5385144",
"0.5360059",
"0.53407335",
"0.5244606",
"0.5217035",
"0.5163222",
"0.51377195",
"0.5100997",
"0.510063",
"0.5095397",
"0.5084886",
"0.5084342",
"0.5081917",
"0.50665855",
"0.50617725",
"0.5051416",
"0.5023278",
"0.5012062",
"0.50066304",
"0.49388927",
"0.49295977",
"0.49294123",
"0.4915055",
"0.48765978",
"0.48731878",
"0.48654664",
"0.4860106",
"0.48483235",
"0.48470286",
"0.48413417",
"0.48395625",
"0.483624",
"0.48349857",
"0.48277882",
"0.48248848",
"0.48242313",
"0.4823018",
"0.48155144",
"0.4807395",
"0.48052776",
"0.48026043",
"0.48010722",
"0.47989127",
"0.47977778",
"0.4793392",
"0.47918284",
"0.4791613",
"0.47902593",
"0.47858104",
"0.47836262",
"0.4780265",
"0.47661006",
"0.47582343",
"0.4756465",
"0.47519338",
"0.47519338",
"0.47519338",
"0.4746977",
"0.47463882",
"0.47448236",
"0.47335988",
"0.47335988",
"0.47296286",
"0.47263756",
"0.4723314",
"0.47230655",
"0.47145325",
"0.47091976",
"0.470263",
"0.46992195",
"0.4689852",
"0.46867314",
"0.46840927",
"0.46770704",
"0.46747887",
"0.46747887",
"0.4670322",
"0.4665062",
"0.4662291",
"0.46593565",
"0.46585467",
"0.46585467",
"0.46580753",
"0.46561408",
"0.46549374",
"0.46536973",
"0.4650875",
"0.46482065",
"0.46445844",
"0.4644478",
"0.46355507",
"0.4626974",
"0.4625172",
"0.46159643",
"0.4613726",
"0.46115935",
"0.46077228",
"0.46056104",
"0.46046203"
] |
0.0
|
-1
|
POST /fornecedors > Create a new fornecedor.
|
@RequestMapping(value = "/fornecedors",
method = RequestMethod.POST,
produces = MediaType.APPLICATION_JSON_VALUE)
@Timed
public ResponseEntity<FornecedorDTO> createFornecedor(@Valid @RequestBody FornecedorDTO fornecedorDTO) throws URISyntaxException {
log.debug("REST request to save Fornecedor : {}", fornecedorDTO);
if (fornecedorDTO.getId() != null) {
return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert("fornecedor", "idexists", "A new fornecedor cannot already have an ID")).body(null);
}
FornecedorDTO result = fornecedorService.save(fornecedorDTO);
return ResponseEntity.created(new URI("/api/fornecedors/" + result.getId()))
.headers(HeaderUtil.createEntityCreationAlert("fornecedor", result.getId().toString()))
.body(result);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setFornecedor(String fornecedor) { this.fornecedor = fornecedor; }",
"@PostMapping(\"/addFormation/{eid}\")\n\t\tpublic Formation createFormation(@PathVariable(value = \"eid\") Long Id, @Valid @RequestBody Formation formationDetails) {\n\n\t\t \n\t\t Formation me=new Formation();\n\t\t\t Domaine domaine = Domainev.findById(Id).orElseThrow(null);\n\t\t\t \n\t\t\t \n\t\t\t\t me.setDom(domaine);\n\t\t\t me.setTitre(formationDetails.getTitre());\n\t\t\t me.setAnnee(formationDetails.getAnnee());\n\t\t\t me.setNb_session(formationDetails.getNb_session());\n\t\t\t me.setDuree(formationDetails.getDuree());\n\t\t\t me.setBudget(formationDetails.getBudget());\n\t\t\t me.setTypeF(formationDetails.getTypeF());\n\t\t\t \n\t\t\t \n\n\t\t\t //User affecterUser= \n\t\t\t return Formationv.save(me);\n\t\t\t//return affecterUser;\n\t\t\n\n\t\t}",
"@POST\n public Response create(EvenementDto evenementDto) {\n DataAccess dataAccess = DataAccess.begin();\n EvenementEntity evenementEntity = EvenementEntity.convertFromEvenementDto(evenementDto);\n\n System.out.println(evenementDto.toString());\n System.out.println(evenementEntity.toString());\n\n if (evenementDto.getNom() == null) {\n return Response.status(Response.Status.NOT_ACCEPTABLE).entity(\"name not specified\\n\").build();\n }\n else if(evenementDto.getDate() == null){\n return Response.status(Response.Status.NOT_ACCEPTABLE).entity(\"date not specified\\n\").build();\n }\n else if(evenementDto.getHeure() == null){\n return Response.status(Response.Status.NOT_ACCEPTABLE).entity(\"heure not specified\\n\").build();\n }\n\n long id = dataAccess.createEvent(evenementEntity);\n URI instanceURI = uriInfo.getAbsolutePathBuilder().path(\"\" + id).build();\n dataAccess.closeConnection(true);\n return Response.created(instanceURI).status(201).entity(evenementDto).location(instanceURI).build(); // .created(instanceURI).build();\n\n }",
"OperacionColeccion createOperacionColeccion();",
"@POST\r\n public ProveedorDTO crearProveedor(ProveedorDTO proveedor) throws BusinessLogicException {\r\n ProveedorDTO proveedorDTO = new ProveedorDTO(proveedorLogic.createProveedor(proveedor.toEntity()));\r\n return proveedorDTO;\r\n }",
"CounselorBiographyTemp create(CounselorBiographyTemp entity);",
"@PutMapping(\"/anuncios/crear/{idAutor}\")\n public void createAnuncio(@PathVariable Long idAutor, @RequestBody Anuncio nuevoAnuncio) throws DataConsistencyException {\n anuncioService.crearAnuncio(idAutor, nuevoAnuncio);\n }",
"@PostMapping(\"/detalle-ordens\")\n @Timed\n public ResponseEntity<DetalleOrdenDTO> createDetalleOrden(@RequestBody DetalleOrdenDTO detalleOrdenDTO) throws URISyntaxException {\n log.debug(\"REST request to save DetalleOrden : {}\", detalleOrdenDTO);\n if (detalleOrdenDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new detalleOrden cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n Procedimiento procedimiento = procedimientoRepository.findById(detalleOrdenDTO.getProcedimientoId()).get();\n Orden orden = ordenRepository.findById(detalleOrdenDTO.getOrdenId()).get();\n\n Double totalDetalle = (procedimiento.getPrecioUnitario() * detalleOrdenDTO.getCantidad());\n Double descuento = (totalDetalle * (detalleOrdenDTO.getDescuento() / 100.0));\n\n detalleOrdenDTO.setTotal(totalDetalle - descuento);\n\n DetalleOrdenDTO result = detalleOrdenService.save(detalleOrdenDTO);\n\n ordenService.recalculateOrdenTotal(orden);\n\n return ResponseEntity.created(new URI(\"/api/detalle-ordens/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"@PostMapping(\"/familles\")\n public ResponseEntity<FamilleDTO> createFamille(@RequestBody FamilleDTO familleDTO) throws URISyntaxException {\n log.debug(\"REST request to save Famille : {}\", familleDTO);\n if (familleDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new famille cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n FamilleDTO result = familleService.save(familleDTO);\n return ResponseEntity.created(new URI(\"/api/familles/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"void create(E entity);",
"@PostMapping(\"/nominees\")\n @Timed\n public ResponseEntity<NomineeDTO> createNominee(@Valid @RequestBody NomineeDTO nomineeDTO) throws URISyntaxException {\n log.debug(\"REST request to save Nominee : {}\", nomineeDTO);\n if (nomineeDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new nominee cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n NomineeDTO result = nomineeService.save(nomineeDTO);\n return ResponseEntity.created(new URI(\"/api/nominees/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"@PostMapping(\"/act-kodus\")\n @Timed\n public ResponseEntity<ActKodu> createActKodu(@Valid @RequestBody ActKodu actKodu) throws URISyntaxException {\n log.debug(\"REST request to save ActKodu : {}\", actKodu);\n if (actKodu.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new actKodu cannot already have an ID\")).body(null);\n }\n ActKodu result = actKoduRepository.save(actKodu);\n return ResponseEntity.created(new URI(\"/api/act-kodus/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"void create(Authority authority) throws ExTrackDAOException;",
"@PostMapping(\"/citizens\")\n @Timed\n public ResponseEntity<Citizen> createCitizen(@RequestBody Citizen citizen) throws URISyntaxException {\n log.debug(\"REST request to save Citizen : {}\", citizen);\n if (citizen.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"citizen\", \"idexists\", \"A new citizen cannot already have an ID\")).body(null);\n }\n Citizen result = citizenService.save(citizen);\n return ResponseEntity.created(new URI(\"/api/citizens/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"citizen\", result.getId().toString()))\n .body(result);\n }",
"@Override\n void create(Cliente cliente);",
"public void crearPersonaje(ActionEvent event) {\r\n\r\n\t\tthis.personaje.setAspecto(url);\r\n\r\n\t\tDatabaseOperaciones.guardarPersonaje(stats, personaje);\r\n\r\n\t\tvisualizaPersonajes();\r\n\t}",
"@Override\n @POST\n @Path(\"/networks\")\n public Response createNetwork() throws Exception {\n URI resourceUri = new URI(\"/1\");\n return Response.created(resourceUri).build();\n }",
"@PostMapping(\"/users\")\n public Transportador createUser(@Valid @RequestBody Transportador user) {\n return transportadorRepository.save(user);\n }",
"com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();",
"@RequestMapping(value = \"/estados\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public void create(@RequestBody Estado estado) {\n log.debug(\"REST request to save Estado : {}\", estado);\n estadoRepository.save(estado);\n }",
"@PostMapping(\"/familles\")\n @Timed\n public ResponseEntity<Famille> createFamille(@RequestBody Famille famille) throws URISyntaxException {\n log.debug(\"REST request to save Famille : {}\", famille);\n if (famille.getId() != null) {\n return ResponseEntity.badRequest()\n .headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new famille cannot already have an ID\"))\n .body(null);\n }\n Famille result = familleService.save(famille);\n return ResponseEntity.created(new URI(\"/api/familles/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"Documento createDocumento();",
"@PostMapping(\"/cuentas\")\n @Timed\n public ResponseEntity<Cuenta> createCuenta(@RequestBody Cuenta cuenta) throws URISyntaxException {\n log.debug(\"REST request to save Cuenta : {}\", cuenta);\n if (cuenta.getId() != null) {\n throw new BadRequestAlertException(\"A new cuenta cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n Cuenta result = cuentaRepository.save(cuenta);\n return ResponseEntity.created(new URI(\"/api/cuentas/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"public Team create(TeamDTO teamForm);",
"Klassenstufe createKlassenstufe();",
"public static Fornecedor createEntity(EntityManager em) {\n Fornecedor fornecedor = new Fornecedor()\n .tipo(DEFAULT_TIPO)\n .cpf(DEFAULT_CPF)\n .cnpj(DEFAULT_CNPJ)\n .primeiroNome(DEFAULT_PRIMEIRO_NOME)\n .nomeMeio(DEFAULT_NOME_MEIO)\n .sobreNome(DEFAULT_SOBRE_NOME)\n .saudacao(DEFAULT_SAUDACAO)\n .titulo(DEFAULT_TITULO)\n .cep(DEFAULT_CEP)\n .tipoLogradouro(DEFAULT_TIPO_LOGRADOURO)\n .nomeLogradouro(DEFAULT_NOME_LOGRADOURO)\n .complemento(DEFAULT_COMPLEMENTO);\n return fornecedor;\n }",
"E create(E entity);",
"E create(E entity);",
"@Override\r\n\tpublic void createFournisseur(Fournisseur fournisseur) {\n\t\tthis.sessionFactory.getCurrentSession().save(fournisseur);\r\n\t}",
"public ViajeroEntity create (ViajeroEntity viajeroEntity){\n LOGGER.log(Level.INFO, \"Creando un review nuevo\");\n em.persist(viajeroEntity);\n return viajeroEntity;\n }",
"@RequestMapping(value = \"/charitys\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public void create(@RequestBody Charity charity) {\n log.debug(\"REST request to save Charity : {}\", charity);\n charityRepository.save(charity);\n }",
"Operacion createOperacion();",
"@PostMapping(\"/etape-examen\")\n public ResponseEntity<EtapeExamenDTO> createEtapeExamen(@Valid @RequestBody EtapeExamenDTO etapeExamenDTO) throws URISyntaxException {\n log.debug(\"REST request to save EtapeExamen : {}\", etapeExamenDTO);\n if (etapeExamenDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new etapeExamen cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n EtapeExamenDTO result = etapeExamenService.save(etapeExamenDTO);\n return ResponseEntity.created(new URI(\"/api/etape-examen/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"public void crearAsistente(AsistenteDTO dto) throws SQLException {\n artFacade.crear(dto);\n }",
"@PostMapping(\"/transport-methods\")\n @Timed\n public ResponseEntity<TransportMethod> createTransportMethod(@Valid @RequestBody TransportMethod transportMethod) throws URISyntaxException {\n log.debug(\"REST request to save TransportMethod : {}\", transportMethod);\n if (transportMethod.getId() != null) {\n throw new BadRequestAlertException(\"A new transportMethod cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n TransportMethod result = transportMethodService.save(transportMethod);\n return ResponseEntity.created(new URI(\"/api/transport-methods/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"@PostMapping(\"/record-25-herfinancieerings\")\n @Timed\n public ResponseEntity<Record25Herfinancieering> createRecord25Herfinancieering(@RequestBody Record25Herfinancieering record25Herfinancieering) throws URISyntaxException {\n log.debug(\"REST request to save Record25Herfinancieering : {}\", record25Herfinancieering);\n if (record25Herfinancieering.getId() != null) {\n throw new BadRequestAlertException(\"A new record25Herfinancieering cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n Record25Herfinancieering result = record25HerfinancieeringRepository.save(record25Herfinancieering);\n return ResponseEntity.created(new URI(\"/api/record-25-herfinancieerings/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"void create(Trubriques trubriques);",
"public void create(Querellante quere) throws IOException, SQLException {\n con = getConnection();\n cs = con.prepareCall(\"Call create_persona(?,?,?,?,?,?)\");\n cs.setEscapeProcessing(true);\n cs.setString(1, quere.getNombre());\n cs.setString(2, quere.getApellido());\n cs.setInt(3, quere.getCedula());\n cs.setInt(4, quere.getTelefono());\n cs.setString(5, quere.getDireccion());\n cs.setInt(6, 3);\n cs.execute();\n\n con.close();\n\n }",
"@PostMapping(\"/jpa/users/{username}/suppliers\")\n public ResponseEntity<Void> createSupplier(@PathVariable String username,\n @RequestBody Supplier supplier){\n supplier.setUsername(username);\n Supplier createdSupplier = supplierJpaRepo.save(supplier);\n\n URI uri = ServletUriComponentsBuilder.fromCurrentRequest().path(\"/{id}\")\n .buildAndExpand(createdSupplier.getId()).toUri();\n\n\n return ResponseEntity.created(uri).build();\n\n }",
"public void create() {\r\n for(int i=0; i< 50; i++){\r\n long id = (new Date()).getTime();\r\n Benefit newBeneficio = new Benefit();\r\n newBeneficio.setId(\"\"+id); \r\n newBeneficio.setCategory(\"almacenes \"+id);\r\n newBeneficio.setDescription(\"description \"+id);\r\n newBeneficio.setDiscount(i);\r\n newBeneficio.setStart_date(\"start_date \"+id);\r\n newBeneficio.setEnd_date(\"end_date \"+id);\r\n newBeneficio.setReview(\"review \"+id);\r\n newBeneficio.setTitle(\"title \"+id);\r\n newBeneficio.setLogo(\"logo \"+id);\r\n newBeneficio.setTwitter(\"twitter \"+id);\r\n newBeneficio.setFacebook(\"facebook \"+id);\r\n newBeneficio.setUrl(\"url \"+ id);\r\n \r\n Address address = new Address();\r\n address.setCity(\"Santiago \"+ id);\r\n address.setCountry(\"Santiago \"+ id);\r\n address.setLine_1(\"Linea 1 \"+ id);\r\n address.setLine_2(\"Linea 2 \"+ id);\r\n address.setLine_3(\"Linea 3 \"+ id);\r\n address.setPostcode(\"\" + id);\r\n address.setState(\"Region Metropolitana \"+ id);\r\n \r\n Location location = new Location();\r\n double[] cordenadas = {-77.99283,-33.9980};\r\n location.setCoordinates(cordenadas);\r\n location.setDistance(5.445);\r\n location.setType(\"Point\");\r\n \r\n Lobby lobby = new Lobby();\r\n lobby.setHours(\"HORA \"+ + id);\r\n \r\n newBeneficio = service.persist(newBeneficio);\r\n LOGGER.info(newBeneficio.toString());\r\n }\r\n }",
"public void create(CostEngineering costEngineering) {\n cost_engineering_dao.create(costEngineering);\n }",
"public void create(){}",
"public Participacao createParticipacao(Participacao model) {\n return participacaoRepository.save(model);\n}",
"@PostMapping(\"/firmas\")\n @Timed\n public ResponseEntity<Firma> createFirma(@Valid @RequestBody Firma firma) throws URISyntaxException {\n log.debug(\"REST request to save Firma : {}\", firma);\n if (firma.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new firma cannot already have an ID\")).body(null);\n }\n Firma result = firmaRepository.save(firma);\n return ResponseEntity.created(new URI(\"/api/firmas/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"void create(Feedback entity);",
"@PostMapping(\"/terrenos\")\n @Timed\n public ResponseEntity<Terreno> createTerreno(@RequestBody Terreno terreno) throws URISyntaxException {\n log.debug(\"REST request to save Terreno : {}\", terreno);\n if (terreno.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new terreno cannot already have an ID\")).body(null);\n }\n Terreno result = terrenoRepository.save(terreno);\n return ResponseEntity.created(new URI(\"/api/terrenos/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"@Override\n\tpublic void createForm(ERForm form) {\n\t\t\tString sql = \"insert into project1.reimbursementInfo (userName, fullName, thedate, eventstartdate, thelocation, description, thecost, gradingformat, passingpercentage, eventtype, filename,status,reason) values (?,?,?,?,?,?,?,?,?,?,?,?,?);\";\n\t\t\ttry {PreparedStatement stmt = conn.prepareCall(sql);\n\t\t\t//RID should auto increment, so this isnt necessary\n\t\t\t\n\t\t\tstmt.setString(1, form.getUserName());\n\t\t\tstmt.setString(2, form.getFullName());\n\t\t\tstmt.setDate(3, Date.valueOf(form.getTheDate()));\n\t\t\tstmt.setDate(4, Date.valueOf(form.getEventStartDate()));\n\t\t\tstmt.setString(5, form.getTheLocation());\n\t\t\tstmt.setString(6, form.getDescription());\n\t\t\tstmt.setDouble(7, form.getTheCost());\n\t\t\tstmt.setString(8, form.getGradingFormat());\n\t\t\tstmt.setString(9, form.getPassingPercentage());\n\t\t\tstmt.setString(10, form.getEventType());\n\t\t\tstmt.setString(11, form.getFileName());\n\t\t\tstmt.setString(12, \"pending\");\n\t\t\tstmt.setString(13, \"\");\n\t\t\tstmt.executeUpdate();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@PostMapping(\"/creargrupo\")\n public String create(@ModelAttribute (\"grupo\") Grupo grupo) throws Exception {\n try {\n grupoService.create(grupo);\n return \"redirect:/pertenezco\";\n }catch (Exception e){\n LOG.log(Level.WARNING,\"grupos/creargrupo\" + e.getMessage());\n return \"redirect:/error\";\n }\n }",
"@PostMapping(\"/filiere/{libelle}\")\r\n public int creer(@RequestBody EtudiantVo etudiantVo,@PathVariable String libelle) {\r\n EtudiantConverter etudiantConverter = new EtudiantConverter();\r\n Etudiant myEtudiant = etudiantConverter.toItem(etudiantVo);\r\n return etudiantService.creer(myEtudiant, libelle);\r\n }",
"public Performer create(Performer p) throws EVDBRuntimeException, EVDBAPIException {\n\t\tif (p.getSpid() != null) {\n\t\t\tthrow new EVDBRuntimeException(\"Create called on an performer with an existing SPID\");\n\t\t}\n\t\t\n\t\treturn createOrModify(p);\n\t}",
"@Override\n\tpublic int create(Proveedor r) {\n\t\treturn 0;\n\t}",
"@Test\n public void createHouseholdUsingPostTest() throws ApiException {\n Household household = null;\n Household response = api.createHouseholdUsingPost(household);\n\n // TODO: test validations\n }",
"public Perfil create(Perfil perfil);",
"@Override\n\tpublic void create(CreateCoinForm form) throws Exception {\n\t}",
"Secuencia createSecuencia();",
"@PostMapping(\"/docentes\")\n public ResponseEntity<DocenteDTO> createDocente(@Valid @RequestBody DocenteDTO docenteDTO) throws URISyntaxException {\n log.debug(\"REST request to save Docente : {}\", docenteDTO);\n if (docenteDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new docente cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n DocenteDTO result = docenteService.save(docenteDTO);\n return ResponseEntity.created(new URI(\"/api/docentes/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"public static void create(Formulario form){\n daoFormulario.create(form);\n }",
"@PostMapping(\"/costo-servicios\")\n @Timed\n public ResponseEntity<CostoServicioDTO> createCostoServicio(@RequestBody CostoServicioDTO costoServicioDTO) throws URISyntaxException {\n log.debug(\"REST request to save CostoServicio : {}\", costoServicioDTO);\n if (costoServicioDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new costoServicio cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n CostoServicioDTO result = costoServicioService.save(costoServicioDTO);\n return ResponseEntity.created(new URI(\"/api/costo-servicios/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"Authorizor createAuthorizor();",
"@PostMapping(\"/authority\")\n @Timed\n @PreAuthorize(\"hasRole(\\\"\" + AuthoritiesConstants.ADMIN + \"\\\")\")\n public ResponseEntity<Authority> createAuthority(@Valid @RequestBody Authority authority) throws URISyntaxException {\n log.debug(\"REST request to save Authority : {}\", authority);\n\n Authority newAuthority = userService.createAuthority(authority);\n return ResponseEntity.created(new URI(\"/api/authority/\" + newAuthority.getName()))\n .headers(HeaderUtil.createAlert( \"userManagement.created\", newAuthority.getName()))\n .body(newAuthority);\n }",
"private void createSerie(ws.Serie entity) {\n ws.DrawdedeWebService port = service.getDrawdedeWebServicePort();\n port.createSerie(entity);\n }",
"public void create(Person p) {\n\t\t\n\t}",
"public PlanoSaude create(long plano_id);",
"@PostMapping(\"/predavanjePredava\")\n public Predavanje_Predavac createPredavanje_Predavac(@Valid @RequestBody Predavanje_Predavac pp) {\n return predavanje_PredavacDAO.save(pp);\n }",
"@PostMapping(value=\"/employes\")\n\tpublic void createEmployeeDeatils(@RequestBody Employee employee){\n\t\t\t\n\t\temployeeService.saveEmployeeDetails(employee);\n\t\t\n\t}",
"@Override\n\t@Transactional\n\tpublic DetalleCarrito create(DetalleCarrito entity) throws Exception {\n\t\treturn detalleCarritoRepository.save(entity);\n\t}",
"@RequestMapping(\"/post/{urn}\")\n @ResponseBody\n public Client post(@PathVariable(\"urn\") String urn) {\n\n return new Client(urn, counter++);\n }",
"FogNode createFogNode();",
"public org.oep.usermgt.model.Citizen create(long citizenId);",
"Foco createFoco();",
"@PostMapping(\"/uoms\")\n @Timed\n public ResponseEntity<UomDTO> createUom(@RequestBody UomDTO uomDTO) throws URISyntaxException {\n log.debug(\"REST request to save Uom : {}\", uomDTO);\n if (uomDTO.getIdUom() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new uom cannot already have an ID\")).body(null);\n }\n UomDTO result = uomService.save(uomDTO);\n return ResponseEntity.created(new URI(\"/api/uoms/\" + result.getIdUom()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getIdUom().toString()))\n .body(result);\n }",
"@RequestMapping(value = \"/fornecedors\",\n method = RequestMethod.PUT,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<FornecedorDTO> updateFornecedor(@Valid @RequestBody FornecedorDTO fornecedorDTO) throws URISyntaxException {\n log.debug(\"REST request to update Fornecedor : {}\", fornecedorDTO);\n if (fornecedorDTO.getId() == null) {\n return createFornecedor(fornecedorDTO);\n }\n FornecedorDTO result = fornecedorService.save(fornecedorDTO);\n return ResponseEntity.ok()\n .headers(HeaderUtil.createEntityUpdateAlert(\"fornecedor\", fornecedorDTO.getId().toString()))\n .body(result);\n }",
"FuelingStation createFuelingStation();",
"@RequestMapping(value = \"/oeuvres\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Oeuvre> createOeuvre(@Valid @RequestBody Oeuvre oeuvre) throws URISyntaxException {\n log.debug(\"REST request to save Oeuvre : {}\", oeuvre);\n if (oeuvre.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"oeuvre\", \"idexists\", \"A new oeuvre cannot already have an ID\")).body(null);\n }\n Oeuvre result = oeuvreRepository.save(oeuvre);\n return ResponseEntity.created(new URI(\"/api/oeuvres/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"oeuvre\", result.getId().toString()))\n .body(result);\n }",
"@PostMapping(\"/produtos\")\n @Timed\n public ResponseEntity<Produto> createProduto(@RequestBody Produto produto) throws URISyntaxException {\n log.debug(\"REST request to save Produto : {}\", produto);\n\n produto = DoubleUtil.handleProduto(produto);\n\n//////////////////////////////////REQUER PRIVILEGIOS\n if (!PrivilegioService.podeCriar(cargoRepository, ENTITY_NAME)) {\n log.error(\"TENTATIVA DE CRIAR SEM PERMISSÃO BLOQUEADA! \" + ENTITY_NAME + \" : {}\", produto);\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"privilegios insuficientes.\", \"Este usuario não possui privilegios sufuentes para criar esta entidade.\")).body(null);\n }\n//////////////////////////////////REQUER PRIVILEGIOS\n if (produto.getId() != null) {\n throw new BadRequestAlertException(\"A new produto cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n Produto result = produtoRepository.save(produto);\n return ResponseEntity.created(new URI(\"/api/produtos/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"@PostMapping(\"/procesadors\")\n @Timed\n public ResponseEntity<Procesador> createProcesador(@RequestBody Procesador procesador) throws URISyntaxException {\n log.debug(\"REST request to save Procesador : {}\", procesador);\n if (procesador.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new procesador cannot already have an ID\")).body(null);\n }\n Procesador result = procesadorRepository.save(procesador);\n return ResponseEntity.created(new URI(\"/api/procesadors/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"@PostMapping(\"/new\")\n public ResponseEntity create(@RequestBody CityInfo cityInfo){\n service.create(cityInfo);\n return new ResponseEntity(HttpStatus.CREATED);\n }",
"@PostMapping(\"/affinites\")\n @Timed\n public ResponseEntity<Affinite> createAffinite(@RequestBody Affinite affinite) throws URISyntaxException {\n log.debug(\"REST request to save Affinite : {}\", affinite);\n if (affinite.getId() != null) {\n throw new BadRequestAlertException(\"A new affinite cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n Affinite result = affiniteRepository.save(affinite);\n affiniteSearchRepository.save(result);\n return ResponseEntity.created(new URI(\"/api/affinites/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"@PostMapping(\"\")\n public Donut createDonut(@RequestBody Donut donut){\n\n return this.donutRepository.save(donut);\n\n }",
"@PostMapping(\"/c-p-expense-tranfers\")\n @Timed\n public ResponseEntity<CPExpenseTranferSaveDTO> createCPExpenseTranfer(@RequestBody CPExpenseTranfer cPExpenseTranfer) throws URISyntaxException {\n log.debug(\"REST request to save MBDeposit : {}\", cPExpenseTranfer);\n if (cPExpenseTranfer.getId() != null) {\n throw new BadRequestAlertException(\"A new mBDeposit cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n CPExpenseTranferSaveDTO result = new CPExpenseTranferSaveDTO();\n result = cPExpenseTranferService.saveDTO(cPExpenseTranfer);\n if (result.getCpExpenseTranfer() != null) {\n if (result.getCpExpenseTranfer().getId() == null) {\n return new ResponseEntity<>(result, HttpStatus.OK);\n } else {\n return ResponseEntity.created(new URI(\"/api/g-other-voucher/\" + result.getCpExpenseTranfer().getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getCpExpenseTranfer().getId().toString()))\n .body(result);\n }\n } else {\n return null;\n }\n }",
"@PostMapping(\"/godowns\")\n @Timed\n public ResponseEntity<GodownDTO> createGodown(@Valid @RequestBody GodownDTO godownDTO) throws URISyntaxException {\n log.debug(\"REST request to save Godown : {}\", godownDTO);\n if (godownDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new godown cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n GodownDTO result = godownService.save(godownDTO);\n return ResponseEntity.created(new URI(\"/api/godowns/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"public CompradorEntity create(CompradorEntity compradorEntity) {\r\n em.persist(compradorEntity);\r\n return compradorEntity;\r\n }",
"public void create() {\n String salt = PasswordUtils.getSalt(30);\n\n // Protect user's password. The generated value can be stored in DB.\n String mySecurePassword = PasswordUtils.generateSecurePassword(password, salt);\n\n // Print out protected password\n System.out.println(\"My secure password = \" + mySecurePassword);\n System.out.println(\"Salt value = \" + salt);\n Operator op = new Operator();\n op.setUsername(username);\n op.setDescription(description);\n op.setSalt(salt);\n op.setPassword(mySecurePassword);\n op.setRol(rol);\n operatorService.create(op);\n message = \"Se creo al usuario \" + username;\n username = \"\";\n description = \"\";\n password = \"\";\n rol = null;\n }",
"@PostMapping(\"/tbc-analises-componentes\")\n @Timed\n public ResponseEntity<Tbc_analises_componente> createTbc_analises_componente(@Valid @RequestBody Tbc_analises_componente tbc_analises_componente) throws URISyntaxException {\n log.debug(\"REST request to save Tbc_analises_componente : {}\", tbc_analises_componente);\n if (tbc_analises_componente.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"tbc_analises_componente\", \"idexists\", \"A new tbc_analises_componente cannot already have an ID\")).body(null);\n }\n Tbc_analises_componente result = tbc_analises_componenteService.save(tbc_analises_componente);\n return ResponseEntity.created(new URI(\"/api/tbc-analises-componentes/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"tbc_analises_componente\", result.getId().toString()))\n .body(result);\n }",
"@PostMapping(value = \"/registrar\")\n public ResponseEntity registrar(@RequestBody EmpleadoDTO empleado){\n return empleadoService.registrar(empleado);\n }",
"public com.Hotel.model.Hotel create(long hotelId);",
"Motivo create(Motivo motivo);",
"com.soa.SolicitarCreditoDocument.SolicitarCredito addNewSolicitarCredito();",
"@PostMapping(\"/cargos\")\n @Timed\n public ResponseEntity<Cargo> createCargo(@RequestBody Cargo cargo) throws URISyntaxException {\n log.debug(\"REST request to save Cargo : {}\", cargo);\n if (cargo.getId() != null) {\n throw new BadRequestAlertException(\"A new cargo cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n Cargo result = cargoRepository.save(cargo);\n return ResponseEntity.created(new URI(\"/api/cargos/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"@RequestMapping(method = RequestMethod.POST)\n public Bin create() {\n throw new NotImplementedException(\"To be implemented\");\n }",
"@PostMapping(consumes=MediaType.APPLICATION_JSON_VALUE)\n @ResponseStatus(HttpStatus.CREATED)\n public Taco postTaco(@RequestBody Taco taco) {\n return tacoRepo.save(taco);\n }",
"@PostMapping(\"/contabancarias\")\n @Timed\n public ResponseEntity<ContabancariaDTO> createContabancaria(@RequestBody ContabancariaDTO contabancariaDTO) throws URISyntaxException {\n log.debug(\"REST request to save Contabancaria : {}\", contabancariaDTO);\n if (contabancariaDTO.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new contabancaria cannot already have an ID\")).body(null);\n }\n Contabancaria contabancaria = contabancariaMapper.toEntity(contabancariaDTO);\n contabancaria = contabancariaRepository.save(contabancaria);\n ContabancariaDTO result = contabancariaMapper.toDto(contabancaria);\n return ResponseEntity.created(new URI(\"/api/contabancarias/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"@PostMapping ( BASE_PATH + \"/pharmacies\" )\n @PreAuthorize ( \"hasRole('ROLE_ADMIN') \" )\n public ResponseEntity createPharmacy ( @RequestBody final PharmacyForm pharmacyF ) {\n final Pharmacy pharmacy = new Pharmacy( pharmacyF );\n if ( null != Pharmacy.getByLocation( pharmacy.getAddress(), pharmacy.getZip() ) ) {\n return new ResponseEntity( errorResponse( \"A Pharmacy already exists at the given address\" ),\n HttpStatus.CONFLICT );\n }\n try {\n pharmacy.save();\n LoggerUtil.log( TransactionType.CREATE_PHARMACY, LoggerUtil.currentUser() );\n return new ResponseEntity( pharmacy, HttpStatus.OK );\n }\n catch ( final Exception e ) {\n return new ResponseEntity( errorResponse( \"Error occured while validating or saving \" + pharmacy.toString()\n + \" because of \" + e.getMessage() ), HttpStatus.BAD_REQUEST );\n }\n\n }",
"public void create() {\n\t\t\n\t}",
"@PostMapping(value=\"/create\")\n\tpublic Ticket creatTicket(@RequestBody Ticket ticket){\n\t\treturn ticketBookingService.createTicket(ticket);\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String nombre = request.getParameter(\"nombre\");\n String descripcion = request.getParameter(\"descripcion\");\n String cantidad = request.getParameter(\"cantidad\");\n String precio = request.getParameter(\"precio\");\n String pago = request.getParameter(\"pago\");\n \n //creando objeto del costructor\n modelo.ventas venta = new modelo.ventas();\n //almacenando datos en las variables con el constructor \n venta.setNombre(nombre);\n venta.setDescripcion(descripcion);\n venta.setCantidad(Integer.parseInt(cantidad));\n venta.setPrecio(Double.parseDouble(precio));\n venta.setPago(Integer.parseInt(pago));\n \n //creando objeto para guardar cliente\n modelo.addVenta addventa = new modelo.addVenta();\n try {\n addventa.agrega(venta);\n } catch (SQLException ex) {\n Logger.getLogger(formVenta.class.getName()).log(Level.SEVERE, null, ex);\n }\n response.sendRedirect(\"ventas\");//si se guarda exitosamente se redirecciona a membresia\n }",
"public static void createResident(Resident resident) {\n // initialize\n URL url = null;\n HttpURLConnection connection = null;\n final String methodPath = \"/entities.resident/\";\n try {\n Gson gson = new Gson();\n String stringResidentJson = gson.toJson(resident);\n url = new URL(BASE_URI + methodPath);\n // open connection\n connection = (HttpURLConnection) url.openConnection();\n // set time out\n connection.setReadTimeout(10000);\n connection.setConnectTimeout(15000);\n // set connection method to POST\n connection.setRequestMethod(\"POST\");\n // set the output to true\n connection.setDoOutput(true);\n // set length of the data you want to send\n connection.setFixedLengthStreamingMode(stringResidentJson.getBytes().length);\n // add HTTP headers\n connection.setRequestProperty(\"Content-Type\", \"application/json\");\n\n // send the POST out\n PrintWriter out = new PrintWriter(connection.getOutputStream());\n out.print(stringResidentJson);\n out.close();\n Log.i(\"error\", new Integer(connection.getResponseCode()).toString());\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n connection.disconnect();\n }\n }",
"@PostMapping(\"/band-pruebas\")\n @Timed\n public ResponseEntity<BandPrueba> createBandPrueba(@RequestBody BandPrueba bandPrueba) throws URISyntaxException {\n log.debug(\"REST request to save BandPrueba : {}\", bandPrueba);\n if (bandPrueba.getId() != null) {\n throw new BadRequestAlertException(\"A new bandPrueba cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n BandPrueba result = bandPruebaService.save(bandPrueba);\n return ResponseEntity.created(new URI(\"/api/band-pruebas/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }",
"@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}",
"public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }"
] |
[
"0.5926764",
"0.57991433",
"0.5743517",
"0.57102627",
"0.567294",
"0.55573153",
"0.5519587",
"0.5512492",
"0.54837275",
"0.547903",
"0.5418258",
"0.5402489",
"0.5398873",
"0.53610355",
"0.53303164",
"0.53170943",
"0.53124624",
"0.5311206",
"0.53055805",
"0.5300204",
"0.52762604",
"0.5270068",
"0.52683496",
"0.52676183",
"0.5255845",
"0.5255133",
"0.5252818",
"0.5252818",
"0.52463907",
"0.5240861",
"0.523828",
"0.52237433",
"0.52111614",
"0.5200838",
"0.5195525",
"0.5188119",
"0.5187798",
"0.5183844",
"0.5178618",
"0.5171604",
"0.5170427",
"0.5165362",
"0.5155779",
"0.5144439",
"0.51392883",
"0.51382375",
"0.51359624",
"0.51344",
"0.5132218",
"0.5131369",
"0.5129932",
"0.5123102",
"0.51152736",
"0.511368",
"0.51126224",
"0.51086193",
"0.5108192",
"0.5099767",
"0.5099455",
"0.509779",
"0.50954956",
"0.5093618",
"0.5093127",
"0.5085343",
"0.5081756",
"0.50809205",
"0.5080125",
"0.5070146",
"0.50668716",
"0.5064261",
"0.5062717",
"0.5060889",
"0.5052031",
"0.50501615",
"0.50394803",
"0.50363046",
"0.50263333",
"0.502327",
"0.50184286",
"0.5015435",
"0.50073504",
"0.5005867",
"0.49983364",
"0.49961194",
"0.49907023",
"0.49852473",
"0.4984565",
"0.49838358",
"0.49800235",
"0.49729204",
"0.49700508",
"0.49697652",
"0.496586",
"0.49590003",
"0.49553534",
"0.49534267",
"0.4948503",
"0.4947298",
"0.49459133",
"0.49432823"
] |
0.7365952
|
0
|
PUT /fornecedors > Updates an existing fornecedor.
|
@RequestMapping(value = "/fornecedors",
method = RequestMethod.PUT,
produces = MediaType.APPLICATION_JSON_VALUE)
@Timed
public ResponseEntity<FornecedorDTO> updateFornecedor(@Valid @RequestBody FornecedorDTO fornecedorDTO) throws URISyntaxException {
log.debug("REST request to update Fornecedor : {}", fornecedorDTO);
if (fornecedorDTO.getId() == null) {
return createFornecedor(fornecedorDTO);
}
FornecedorDTO result = fornecedorService.save(fornecedorDTO);
return ResponseEntity.ok()
.headers(HeaderUtil.createEntityUpdateAlert("fornecedor", fornecedorDTO.getId().toString()))
.body(result);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void Atualizar(Fornecedor fornecedor) throws SQLException {\r\n\t\ttry {\r\n\t\t\tString update = \"update fornecedor set nm_fornecedor=?, vl_fornecedor=?, nm_local=?, qt_peso=?, ds_descricao=?\"\r\n\t\t\t\t\t+ \"where cd_fornecedor=?\";\r\n\t\t\tPreparedStatement preparedStatement = this.connection.prepareStatement(update);\r\n\t\t\tpreparedStatement.setString(1, fornecedor.getNomeFornecedor());\r\n\t\t\tpreparedStatement.setDouble(2, fornecedor.getValorFornecedor());\r\n\t\t\tpreparedStatement.setString(3, fornecedor.getNomeLocal());\r\n\t\t\tpreparedStatement.setInt(4, fornecedor.getQuantidadePeso());\r\n\t\t\tpreparedStatement.setString(5, fornecedor.getDescricao());\r\n\t\t\tpreparedStatement.setInt(6, fornecedor.getCodigoFornecedor());\r\n\t\t\tpreparedStatement.execute();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow e;\r\n\t\t} finally {\r\n\t\t\tthis.connection.close();\r\n\t\t}\r\n\t}",
"public void setFornecedor(String fornecedor) { this.fornecedor = fornecedor; }",
"public static String alterarFornecedor(Fornecedor fornecedor) {\r\n DateFormat dc = new SimpleDateFormat(\"yyyy-MM-dd\");//Formata data para o formato Mysql\r\n String sql = \"UPDATE fornecedor SET nome_fornecedor='\" + fornecedor.getNome().toUpperCase()\r\n + \"',data_cadastro_fornecedor='\" + dc.format(Date.parse((fornecedor.getData_cadastro())))\r\n + \"',cnpj_fornecedor='\" + fornecedor.getN_documento()\r\n + \"',email_fornecedor='\" + fornecedor.getEmail().toUpperCase()\r\n + \"',endereco_fornecedor='\" + fornecedor.getEndereço().toUpperCase() + \"',numero_fornecedor=\" + fornecedor.getNumero()\r\n + \",bairro_fornecedor='\" + fornecedor.getBairro().toUpperCase() + \"',cep_fornecedor='\" + fornecedor.getCep()\r\n + \"',telefone_fornecedor='\" + fornecedor.getTelefone() + \"',estado_fornecedor='\" + fornecedor.getEstado()\r\n + \"',cidade_fornecedor='\" + fornecedor.getCidade().toUpperCase() + \"' WHERE cod_fornecedor=\" + fornecedor.getCódigo() + \";\";\r\n //.toUpperCase() para salvar os dados em maiusculo no BD\r\n try {\r\n BD.comando.executeUpdate(sql);\r\n return null;\r\n } catch (SQLException e) {\r\n return \"Erro na alteração do Fornecedor no Banco de Dados\\n\" + e.getMessage();\r\n }\r\n }",
"public static void updateVendedor(Vendedor vendedor) {\n\t\tSessionFactory sf = HibernateUtil.getSessionFactory();\n\t\tSession sesion = sf.openSession();\n\t\tsesion.beginTransaction();\n\n\t\ttry {\n\t\t\tsesion.update(vendedor);\n\t\t\tsesion.getTransaction().commit();\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tsesion.getTransaction().rollback();\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tsesion.close();\n\t\t}\n\t}",
"void update(CE entity);",
"CounselorBiographyTemp update(CounselorBiographyTemp entity);",
"public Team update(TeamDTO teamForm) throws TeamNotFoundException;",
"E update(E entiry);",
"public void updateByEntity(Paciente paciente) {\n\t\n}",
"public void updateProveedor(Proveedor proveedor) {\n\t\tupdate(proveedor);\n\t}",
"@Override\n\tpublic Result update(CurriculumVitae entity) {\n\t\treturn null;\n\t}",
"E update(E entity);",
"E update(E entity);",
"@RequestMapping(value = \"/fornecedors\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<FornecedorDTO> createFornecedor(@Valid @RequestBody FornecedorDTO fornecedorDTO) throws URISyntaxException {\n log.debug(\"REST request to save Fornecedor : {}\", fornecedorDTO);\n if (fornecedorDTO.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"fornecedor\", \"idexists\", \"A new fornecedor cannot already have an ID\")).body(null);\n }\n FornecedorDTO result = fornecedorService.save(fornecedorDTO);\n return ResponseEntity.created(new URI(\"/api/fornecedors/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"fornecedor\", result.getId().toString()))\n .body(result);\n }",
"public PtJJdwcy update(PtJJdwcy entity);",
"@Override\n\tpublic Fournisseur update(Fournisseur entity) {\n\t\treturn null;\n\t}",
"@PUT\n @JWTTokenNeeded\n @Consumes({MediaType.APPLICATION_JSON})\n @Produces({MediaType.APPLICATION_JSON})\n public Response update(EscenarioDTO entidad) {\n logger.log(Level.INFO, \"entidad:{0}\", entidad);\n \n try {\n \tConciliacion entidadPadreJPA = null;\n if (entidad.getIdConciliacion() != null) {\n entidadPadreJPA = padreDAO.find(entidad.getIdConciliacion());\n if (entidadPadreJPA == null) {\n throw new DataNotFoundException(Response.Status.NOT_FOUND.getReasonPhrase() + entidad.getIdConciliacion());\n }\n }\n //Hallar La entidad actual para actualizarla\n Escenario entidadJPA = managerDAO.find(entidad.getId());\n if (entidadJPA != null) {\n entidadJPA.setFechaActualizacion(Date.from(Instant.now()));\n entidadJPA.setNombre(entidad.getNombre() != null ? entidad.getNombre() : entidadJPA.getNombre());\n entidadJPA.setImpacto(entidad.getImpacto() != null ? entidad.getImpacto() : entidadJPA.getImpacto());\n entidadJPA.setDescripcion(entidad.getDescripcion() != null ? entidad.getDescripcion() : entidadJPA.getDescripcion());\n \n Boolean actualizarConciliacion = false;\n entidadJPA.setConciliacion(entidad.getIdConciliacion() != null ? (entidadPadreJPA != null ? entidadPadreJPA : null) : entidadJPA.getConciliacion());\n \n Conciliacion conciliacionpadreactual = null;\n \n \n if (entidadJPA.getConciliacion() != null && !Objects.equals(entidadJPA.getConciliacion().getId(), entidad.getIdConciliacion())){\n actualizarConciliacion = true;\n conciliacionpadreactual = padreDAO.find(entidadJPA.getConciliacion().getId());\n }\n //entidadJPA.setConciliacion(entidad.getIdConciliacion() != null ? (entidadPadreJPA != null ? entidadPadreJPA : null) : entidadJPA.getConciliacion());\n managerDAO.edit(entidadJPA);\n if (actualizarConciliacion){\n if ((entidadPadreJPA != null)) {\n entidadPadreJPA.addEscenario(entidadJPA);\n padreDAO.edit(entidadPadreJPA);\n conciliacionpadreactual.removeEscenario(entidadJPA);\n padreDAO.edit(conciliacionpadreactual);\n }\n }\n LogAuditoria logAud = new LogAuditoria(this.modulo, Constantes.Acciones.EDITAR.name(), Date.from(Instant.now()), entidad.getUsername(), entidadJPA.toString());\n logAuditoriaDAO.create(logAud);\n \n ResponseWrapper wraper = new ResponseWrapper(true,I18N.getMessage(\"escenario.update\", entidad.getNombre()) ,entidadJPA.toDTO());\n \treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n }\n \n ResponseWrapper wraper = new ResponseWrapper(false,I18N.getMessage(\"escenario.notfound\", entidad.getNombre()));\n \treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n }catch (Exception e) {\n \tif(e.getCause() != null && (e.getCause() instanceof DataAlreadyExistException || e.getCause() instanceof DataNotFoundException)) {\n \t\tlogger.log(Level.SEVERE, e.getMessage(), e);\n \t\tResponseWrapper wraper = new ResponseWrapper(false, e.getCause().getMessage(), 500);\n \t\treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n \t}else {\n \t\tlogger.log(Level.SEVERE, e.getMessage(), e);\n \t\tResponseWrapper wraper = new ResponseWrapper(false, I18N.getMessage(\"general.readerror\"), 500);\n \t\treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n \t}\n }\n }",
"public void editaFornecedor(String nome, String atributo, String novoValor) {\n\t\tUtil.testaNull(nome, \"Erro na edicao do fornecedor: nome nao pode ser vazio ou nulo.\");\n\t\tUtil.testaVazio(nome, \"Erro na edicao do fornecedor: nome nao pode ser vazio ou nulo.\");\n\n\t\tUtil.testaNull(atributo, \"Erro na edicao do fornecedor: atributo nao pode ser vazio ou nulo.\");\n\t\tUtil.testaVazio(atributo, \"Erro na edicao do fornecedor: atributo nao pode ser vazio ou nulo.\");\n\n\t\tUtil.testaNull(novoValor, \"Erro na edicao do fornecedor: novo valor nao pode ser vazio ou nulo.\");\n\t\tUtil.testaVazio(novoValor, \"Erro na edicao do fornecedor: novo valor nao pode ser vazio ou nulo.\");\n\n\t\tif (atributo.equals(\"nome\")) {\n\t\t\tthrow new IllegalArgumentException(\"Erro na edicao do fornecedor: nome nao pode ser editado.\");\n\t\t}\n\n\t\tif (!atributo.equals(\"email\") && !atributo.equals(\"telefone\")) {\n\t\t\tthrow new IllegalArgumentException(\"Erro na edicao do fornecedor: atributo nao existe.\");\n\t\t}\n\n\t\tif (!this.fornecedores.containsKey(nome)) {\n\t\t\tthrow new IllegalArgumentException(\"Erro na edicao do fornecedor: fornecedor nao existe.\");\n\t\t}\n\n\t\tif (atributo.equals(\"email\")) {\n\t\t\tthis.fornecedores.get(nome).setEmail(novoValor);\n\t\t}\n\n\t\tif (atributo.equals(\"telefone\")) {\n\t\t\tthis.fornecedores.get(nome).setTelefone(novoValor);\n\t\t}\n\t}",
"public void update(E entity);",
"void updateTenant(EntityUpdateDescriptor descriptor) throws STenantUpdateException;",
"public void updateContratoDosimetro(ContratoDosimetro entity)\n throws Exception;",
"E update(ID id, E entity, RequestContext context);",
"public CelestialBody update(CelestialBody body);",
"@RequestMapping(method = RequestMethod.PUT)\r\n public ResponseObject update(@Validated @RequestBody Candidate candidate) {\r\n return candidateService.update(candidate);\r\n }",
"public Future<CtxModelObject> update(CtxModelObject identifier);",
"public void updateEntity();",
"@Transactional\n public void update(RoutersEntity uRouters, String routers_id) throws NoSuchRoutersException {\n var routers = routersRepository.findById(routers_id).get();//2.0.0.M7\n if (routers == null) throw new NoSuchRoutersException();\n //update\n routers.setOfficeId(uRouters.getOfficeId());\n }",
"public Client update(Client updated) throws EntityNotFoundException;",
"@PUT\n @Produces({ \"application/json\" })\n @Path(\"{id}\")\n @CommitAfter\n public abstract Response update(Person person);",
"@RequestMapping( value = \"/updateEmployer/{id}\" , method=RequestMethod.PUT)\n\tpublic EmployerPrfl updateEmployer(@PathVariable Long id, @RequestBody EmployerPrfl employerPrfl) {\n\t\tEmployerPrfl employerProfile = repository.findById(id).get();\n\t\tif(employerProfile!=null) {\n\t\t\temployerProfile.setCompanyName(employerPrfl.getCompanyName());\n\t\t\temployerProfile.setCity(employerPrfl.getCity());\n\t\t\temployerProfile.setEmail(employerPrfl.getEmail());\n\t\t\treturn repository.save(employerProfile);\n\t\t}\n\t\treturn null;\n\t\t\n\t}",
"public boolean festivalUpdateAf(FestivalDto dto);",
"public void update(RelacionConceptoEmbalajePk pk, RelacionConceptoEmbalaje dto) throws RelacionConceptoEmbalajeDaoException;",
"@Override\n\tpublic void update(ERS_USERS entity) {\n\t\t\n\t}",
"@PUT\n\t@Path (\"updateOperador\")\n\t@Consumes(MediaType.APPLICATION_JSON)\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response updateBebedor(Operador operador) {\n\t\t//TODO Requerimiento 5B: Implemente el metodo a partir de los ejemplos anteriores y utilizando el Transaction Manager de Parranderos \n\t\ttry {\n\t\t\tAlohAndesTransactionManager tm = new AlohAndesTransactionManager(getPath());\n\t\t\ttm.updateOperador(operador);\n\t\t\treturn Response.status(200).entity(operador).build();\n\t\t} catch (Exception e) {\n\t\t\treturn Response.status(500).entity(doErrorMessage(e)).build();\n\t\t}\n\t}",
"public CbmCItemFininceItem update(CbmCItemFininceItem entity);",
"boolean updateTicket(Ticket ticket, boolean createdByMe, boolean assignedToMe, boolean managedByMe);",
"@Override\n\tpublic void updateCreator(CreatorDTO creator) {\n\t\t\n\t}",
"public void updateDetalleNominaEmpleado(DetalleNominaEmpleado entity)\n throws Exception;",
"String updateEdible(String edibleToUpdate, Edible edible);",
"public void update(ClientePk pk, Cliente dto) throws ClienteDaoException;",
"public Address update(Address entity);",
"@Override\n\t@Transactional\n\tpublic Cliente update(Cliente entity) throws Exception {\n\t\treturn clienteRepository.save(entity);\n\t}",
"@PUT\n @Path(\"/update\")\n public void put() {\n System.out.println(\"PUT invoked\");\n }",
"@Override\n\tpublic void Update(PersonelContract entity) {\n\n\t}",
"public Equipamento editar(Equipamento eq) {\r\n\t\t\tthis.conexao.abrirConexao();\r\n\t\t\tString sqlUpdate = \"UPDATE equipamentos SET nome=?,descricao=?, id_usuario=? WHERE id_equipamentos=?\";\r\n\t\t\ttry {\r\n\t\t\t\tPreparedStatement statement = (PreparedStatement) this.conexao.getConexao().prepareStatement(sqlUpdate);\r\n\t\t\t\tstatement.setString(1, eq.getNome());\r\n\t\t\t\tstatement.setString(2, eq.getDescricao());\r\n\t\t\t\tstatement.setLong(3, eq.getUsuario().getId());\r\n\t\t\t\tstatement.setLong(4, eq.getId());\r\n\t\t\t\t/*int linhasAfetadas = */statement.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tthis.conexao.fecharConexao();\r\n\t\t\t}\r\n\t\t\treturn eq;\r\n\t\t}",
"@Override\n\tpublic void update(Cliente t) throws RepositoryException {\n\t\t\n\t}",
"@Override\n\t\tpublic boolean update(Carrera entity, int id) {\n\t\t\t\treturn false;\n\t\t}",
"@RequestMapping(value = \"/enquirys\",\n method = RequestMethod.PUT,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> update(@Valid @RequestBody Enquiry enquiry) throws URISyntaxException {\n log.debug(\"REST request to update Enquiry : {}\", enquiry);\n if (enquiry.getId() == null) {\n return create(enquiry);\n }\n enquiryRepository.save(enquiry);\n return ResponseEntity.ok().build();\n }",
"public static Fornecedor createUpdatedEntity(EntityManager em) {\n Fornecedor fornecedor = new Fornecedor()\n .tipo(UPDATED_TIPO)\n .cpf(UPDATED_CPF)\n .cnpj(UPDATED_CNPJ)\n .primeiroNome(UPDATED_PRIMEIRO_NOME)\n .nomeMeio(UPDATED_NOME_MEIO)\n .sobreNome(UPDATED_SOBRE_NOME)\n .saudacao(UPDATED_SAUDACAO)\n .titulo(UPDATED_TITULO)\n .cep(UPDATED_CEP)\n .tipoLogradouro(UPDATED_TIPO_LOGRADOURO)\n .nomeLogradouro(UPDATED_NOME_LOGRADOURO)\n .complemento(UPDATED_COMPLEMENTO);\n return fornecedor;\n }",
"@Override\r\n\tpublic void updateFournisseur(Fournisseur fournisseur) {\n\t\tthis.sessionFactory.getCurrentSession().update(fournisseur);\r\n\t}",
"public HrJBorrowcontract update(HrJBorrowcontract entity);",
"void update(EmployeeDetail detail) throws DBException;",
"E update(E entity) throws ValidationException;",
"public void update(SgfensBancoPk pk, SgfensBanco dto) throws SgfensBancoDaoException;",
"@Override\n\tpublic Comprobante update(Comprobante entity) throws Exception {\n\t\treturn comproRepository.save(entity);\n\t}",
"public void update(TipologiaStrutturaPk pk, TipologiaStruttura dto) throws TipologiaStrutturaDaoException;",
"@Override\r\n\tpublic void update(PartyType entity) {\n\t\t\r\n\t}",
"public void update(Querellante quere) throws SQLException, IOException {\n con = getConnection();\n\n cs = con.prepareCall(\"Call update_persona(?,?,?,?,?,?)\");\n cs.setEscapeProcessing(true);\n cs.setInt(1, quere.getCedula());\n cs.setString(2, quere.getNombre());\n cs.setString(3, quere.getApellido());\n cs.setInt(4, quere.getTelefono());\n cs.setString(5, quere.getDireccion());\n cs.setInt(6, quere.getIdPersona());\n cs.execute();\n }",
"public int update(RightInfoDTO rightInfo) throws DataAccessException;",
"public void Update(StokContract entity) {\n\t\t\n\t}",
"int updateEstancia(final Long srvcId);",
"@Override\r\n\tpublic PersonneDTO updatePersonne(PersonneDTO personneDTO) {\n\t\treturn daoPersonne.updatePersonne(personneDTO);\r\n\t}",
"public void update(NominaPuestoPk pk, NominaPuesto dto) throws NominaPuestoDaoException;",
"@Override\n\tpublic int update(Proveedor r) {\n\t\treturn 0;\n\t}",
"public void editar() {\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Atualizar(cliente);\n\n JSFUtil.AdicionarMensagemSucesso(\"Cliente editado com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n }",
"Flight updateFlight(Flight flight);",
"@PutMapping(\"/{id}\")\r\n\tpublic ResponseEntity<?> updateArtikel(@PathVariable Long id, @RequestBody Artikel artikel) {\n\t\treturn artikelRepo.findById(id).map(\r\n\t\t\t\t\t\t\t\t\t\tzArtikel->{\r\n\t\t\t\t\t\t\t\t\t\t\tzArtikel.setName(artikel.getName());\r\n\t\t\t\t\t\t\t\t\t\t\tzArtikel.setPreis(artikel.getPreis());\r\n\t\t\t\t\t\t\t\t\t\t\tartikelRepo.save(zArtikel);\r\n\t\t\t\t\t\t\t\t\t\t\treturn ResponseEntity.status(HttpStatus.ACCEPTED)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.body(artikelAssembler.toModel(zArtikel));\r\n\t\t\t\t\t\t\t\t\t\t}).orElseGet(()->{\r\n\t\t\t\t\t\t\t\t\t\t\tartikelRepo.save(artikel);\r\n\t\t\t\t\t\t\t\t\t\t\treturn ResponseEntity.status(HttpStatus.CREATED)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.body(artikelAssembler.toModel(artikel));\r\n\t\t\t\t\t\t\t\t\t\t}); \r\n\t}",
"@Override\n\tpublic Employees update(Employees entity)\n\tthrows OperationNotSupportedException {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic Borne update(Borne obj) {\n\t\tStatement st =null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tst = this.connect.createStatement();\r\n\t\t\tString sql = \"UPDATE Borne SET idZone = '\"+obj.getZone().getId()+\"' WHERE id =\"+obj.getId();\r\n\t\t\tSystem.out.println(sql);\r\n\t\t\tst.executeUpdate(sql);\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn obj;\r\n\t}",
"AdPartner updateAdPartner(AdPartner adPartner);",
"public void updateDistrict(District District);",
"@RequestMapping(value=\"/{id}\", method=RequestMethod.PUT)\n\tpublic ResponseEntity<Void> update(@Valid @RequestBody ClienteDTO objDto, @PathVariable Integer id) {\n\t\t//Garantir que a categoria que vai ser atualizada é a que eu passar o código na URL\n\t\t//Criei um metodo que transforma uma Cliente em ClienteDTO\n\t\t//Que contem as validação.\n\t\tCliente obj = servico.fromDTO(objDto);\n\t\tobj.setId(id);\n\t\tobj = servico.update(obj);\n\t\t//conteudo vázio = noContent.\n\t\treturn ResponseEntity.noContent().build();\n\t}",
"public void editarProveedor() {\n try {\n proveedorFacadeLocal.edit(proTemporal);\n this.proveedor = new Proveedor();\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Proveedor editado\", \"Proveedor editado\"));\n } catch (Exception e) {\n \n }\n\n }",
"@Override\n\tpublic void update(Unidade obj) {\n\n\t}",
"public EmployeeDTO updateEmployee(final EmployeeDTO createEmployeeDTO) throws ApplicationCustomException;",
"@PUT\r\n @Path(\"{proveedorId: \\\\d+}\")\r\n public ProveedorDetailDTO actualizarProveedorID(@PathParam(\"proveedorId\") Long proveedorId, ProveedorDetailDTO proveedor) throws BusinessLogicException {\r\n proveedor.setId(proveedorId);\r\n if (proveedorLogic.getProveedor(proveedorId) == null) {\r\n throw new WebApplicationException(\"El recurso /proveedores/\" + proveedorId + \" no existe.\", 404);\r\n }\r\n ProveedorDetailDTO detailDTO = new ProveedorDetailDTO(proveedorLogic.updateProveedor(proveedorId, proveedor.toEntity()));\r\n return detailDTO;\r\n }",
"public void update(RutaPk pk, Ruta dto) throws RutaDaoException;",
"RocketDTO updateRocket(UpdateRocketDTO rocket);",
"public void updateAuthor(Author author);",
"public void updateForum(Forum forum);",
"void update(T entity) throws Exception;",
"@Override\n public void updateBeer(UUID beerId, BeerDto beerDto) {\n log.debug(\"Updating beer \"+ beerDto.getName() + \"(\" + beerId + \")\" +\"...\");\n }",
"@PutMapping(\"/edit\")\n public ResponseEntity<?> editPenerbit(@RequestBody PenerbitDto dto){\n try {\n StatusMessageDto<PenerbitDto> response = new StatusMessageDto<>();\n if(dto.getNamaPenerbit().isEmpty() == true){\n response.setStatus(HttpStatus.BAD_REQUEST.value());\n response.setMessage(\"Penerbit kosong!\");\n response.setData(dto);\n return ResponseEntity.badRequest().body(response);\n }\n \n PenerbitDto penerbitDto = penerbitService.update(dto);\n if(penerbitDto == null){\n response.setStatus(HttpStatus.BAD_REQUEST.value());\n response.setMessage(\"Penerbit gagal diubah!\");\n response.setData(penerbitDto);\n return ResponseEntity.badRequest().body(response);\n }\n else{\n response.setStatus(HttpStatus.OK.value());\n response.setMessage(\"Penerbit berhasil diubah!\");\n response.setData(penerbitDto);\n return ResponseEntity.ok().body(response);\n }\n } catch (Exception e) {\n return ResponseEntity.badRequest().body(e);\n }\n }",
"T update(T entity);",
"T update(T entity);",
"@Override\r\n\tpublic void update(Cidade obj) {\n\r\n\t}",
"public void updateGeominas(Geominas entity) throws Exception;",
"public void updateSupplierEntity(SupplierEntity originEntity) {\n\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n session.update(originEntity);\n tx.commit();\n log.warn(\"Updated supplier: \" + originEntity + \" with id of: \" + originEntity.getSupplierId());\n\n } catch (HibernateException e) {\n\n if (tx!=null) {\n tx.rollback();\n }\n\n e.printStackTrace();\n\n } finally {\n\n session.close();\n\n }\n\n }",
"public void updateFeriadoZona(FeriadoZona feriadoZona, Usuario usuario);",
"@Override\n public void update(Curso entity) {\n Connection c = null;\n PreparedStatement pstmt = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"UPDATE curso SET idprofesor = ?, nombrecurso = ?, claveprofesor = ?, clavealumno = ? WHERE idcurso = ?\");\n\n pstmt.setInt(1, entity.getIdProfesor());\n pstmt.setString(2, entity.getNombre());\n pstmt.setString(3, entity.getClaveProfesor());\n pstmt.setString(4, entity.getClaveAlumno());\n pstmt.setInt(5, entity.getIdCurso());\n \n pstmt.executeUpdate();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"public void update(SgfensPedidoProductoPk pk, SgfensPedidoProducto dto) throws SgfensPedidoProductoDaoException;",
"@Override\n\tpublic int update(Object party) {\n\t\t\n\t\tint res = session.update(\"party.update_party_full\",party);\n\t\t\n\t\treturn res;\n\t}",
"@Override\n public void update(Usuario usuario) {\n }",
"@PutMapping(\"/updateArtist\")\n public ResponseEntity<Void> updateArtist(@Valid @RequestBody ArtistDto artistDto) {\n logger.info(\"updating artist profile\");\n\n if (artistDto.getUsername() == null) {\n return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();\n }\n\n try {\n if (artistService.updateArtist(artistDto) == false) {\n return ResponseEntity.status(HttpStatus.BAD_REQUEST).build();\n } else {\n return ResponseEntity.status(HttpStatus.OK).build();\n }\n } catch (Exception e) {\n logger.error(\"Exception when updating artist\" + e);\n return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build();\n }\n }",
"public static void saveVendedor(Vendedor vendedor) {\n\t\tSessionFactory sf = HibernateUtil.getSessionFactory();\n\t\tSession sesion = sf.openSession();\n\t\tsesion.beginTransaction();\n\n\t\ttry {\n\t\t\tsesion.save(vendedor);\n\t\t\tsesion.getTransaction().commit();\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tsesion.getTransaction().rollback();\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tsesion.close();\n\t\t}\n\t}",
"@PutMapping(\"/api/rents/{id}\")\r\n public ResponseEntity<?> updateRent(@PathVariable(name = \"id\") Long id, @RequestBody Rent rentUpdate) {\r\n return rentService.find(id).map(rent -> {\r\n rent.setClient(rentUpdate.getClient());\r\n rent.setCar(rentUpdate.getCar());\r\n rent.setRate(rentUpdate.getRate());\r\n rent.setStartDate(rentUpdate.getStartDate());\r\n rent.setEndDate(rentUpdate.getEndDate());\r\n rent.setFinalPrice(rentUpdate.getFinalPrice());\r\n rentService.update(rent);\r\n return new ResponseEntity<>(rent, HttpStatus.OK);\r\n }).orElseThrow(() -> new IllegalArgumentException());\r\n\r\n }",
"D update(D dto);",
"public void update(EvaluationsDegreePk pk, EvaluationsDegree dto) throws EvaluationsDegreeDaoException;",
"@RequestMapping(value=\"/reservas/{id}\", method=RequestMethod.PUT)\r\n\tpublic void modificarReserva(@RequestBody @Valid Reserva r) throws SistemaReservaException{\n\t\tif(!reservaRpository.obtenerTraslapes(r.getFechaInicio(), r.getFechaFin()).isEmpty()){\r\n\t\t\tthrow new SistemaReservaException(); \r\n\t\t }\r\n\t\t\r\n\t\tReserva encontrado = reservaRpository.findOne(r.getId());\r\n\t\tencontrado.setFechaInicio(r.getFechaInicio());\r\n\t\tencontrado.setFechaFin(r.getFechaFin());\r\n\t\tencontrado.setSala(salaRepository.findOne(r.getSala().getId()));\r\n\t\treservaRpository.save(encontrado);\r\n\t}",
"public void updateEmployeeDetails(EmployeeDetails employeeDetails);"
] |
[
"0.6050349",
"0.6031484",
"0.60150325",
"0.5806061",
"0.54002005",
"0.5367613",
"0.52971345",
"0.52707183",
"0.51945066",
"0.5186286",
"0.5169892",
"0.5163821",
"0.5163821",
"0.5152441",
"0.5141539",
"0.5124138",
"0.51102114",
"0.5105273",
"0.5092861",
"0.5041931",
"0.5026314",
"0.49411124",
"0.49090403",
"0.48769057",
"0.48762766",
"0.48695916",
"0.4858128",
"0.48419958",
"0.48415977",
"0.48381427",
"0.48266667",
"0.48226914",
"0.480959",
"0.48050478",
"0.4800511",
"0.4782357",
"0.47817978",
"0.47808623",
"0.4772341",
"0.47722498",
"0.4763825",
"0.47409683",
"0.4734268",
"0.47319308",
"0.47220042",
"0.4708615",
"0.46990055",
"0.4695143",
"0.46830326",
"0.468299",
"0.46784055",
"0.46753788",
"0.46682888",
"0.46651903",
"0.466437",
"0.4662479",
"0.46618477",
"0.46608168",
"0.46576133",
"0.4646681",
"0.46418518",
"0.4636687",
"0.4632751",
"0.46324915",
"0.46323916",
"0.46301875",
"0.46290952",
"0.46237364",
"0.4618767",
"0.46154392",
"0.46093932",
"0.4606059",
"0.46024165",
"0.46024156",
"0.46012172",
"0.45961347",
"0.45944363",
"0.458681",
"0.45786175",
"0.45723423",
"0.4570815",
"0.45703077",
"0.45659173",
"0.4565464",
"0.4565464",
"0.45654452",
"0.45651293",
"0.4564871",
"0.45639122",
"0.45624527",
"0.45595837",
"0.4554696",
"0.4552897",
"0.45514196",
"0.45513695",
"0.45512408",
"0.45440218",
"0.4537978",
"0.4530378",
"0.4529924"
] |
0.72876877
|
0
|
GET /fornecedors > get all the fornecedors.
|
@RequestMapping(value = "/fornecedors",
method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE)
@Timed
@Transactional(readOnly = true)
public ResponseEntity<List<FornecedorDTO>> getAllFornecedors(Pageable pageable)
throws URISyntaxException {
log.debug("REST request to get a page of Fornecedors");
Page<Fornecedor> page = fornecedorService.findAll(pageable);
HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/fornecedors");
return new ResponseEntity<>(page.getContent().stream()
.map(fornecedorMapper::fornecedorToFornecedorDTO)
.collect(Collectors.toCollection(LinkedList::new)), headers, HttpStatus.OK);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public List<FornecedorResource> getListaFornecedores()\r\n {\r\n return fornecedorBusiness.listarFornecedores();\r\n }",
"@GetMapping(\"/familles\")\n public List<FamilleDTO> getAllFamilles() {\n log.debug(\"REST request to get all Familles\");\n return familleService.findAll();\n }",
"@RequestMapping(value = \"/fornecedors/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<FornecedorDTO> getFornecedor(@PathVariable Long id) {\n log.debug(\"REST request to get Fornecedor : {}\", id);\n FornecedorDTO fornecedorDTO = fornecedorService.findOne(id);\n return Optional.ofNullable(fornecedorDTO)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }",
"List<Chofer> findAll();",
"@GetMapping(\"/act-kodus\")\n @Timed\n public List<ActKodu> getAllActKodus() {\n log.debug(\"REST request to get all ActKodus\");\n return actKoduRepository.findAll();\n }",
"public List<Factura> getAllFacturas(){\n return facturaFacade.findAll();\n }",
"public List<Fornecedor> Listar() throws SQLException {\r\n\t\ttry {\r\n\t\t\tString query = \"select * from fornecedor\";\r\n\t\t\tPreparedStatement preparedStatement = this.connection.prepareStatement(query);\r\n\r\n\t\t\tResultSet rs = preparedStatement.executeQuery();\r\n\t\t\tList<Fornecedor> fornecedors = new ArrayList<>();\r\n\t\t\t\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tFornecedor fornecedor = new Fornecedor();\r\n\t\t\t\tfornecedor.setCodigoFornecedor(rs.getInt(\"cd_fornecedor\"));\r\n\t\t\t\tfornecedor.setNomeLocal(rs.getString(\"nm_local\"));\r\n\t\t\t\tfornecedor.setValorFornecedor(rs.getDouble(\"vl_fornecedor\"));\r\n\t\t\t\tfornecedor.setQuantidadePeso(rs.getInt(\"qt_peso\"));\r\n\t\t\t\tfornecedor.setNomeFornecedor(rs.getString(\"nm_fornecedor\"));\r\n\t\t\t\tfornecedor.setDescricao(rs.getString(\"ds_descricao\"));\r\n\t\t\t\tfornecedors.add(fornecedor);\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\treturn fornecedors;\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow e;\r\n\t\t} finally {\r\n\t\t\tthis.connection.close();\r\n\t\t}\r\n\t}",
"@GetMapping(path = \"/\")\n\tpublic @ResponseBody JsonResponse getAllActors() {\n\t\tcom.bmdb.util.JsonResponse jr = null;\n\t\ttry {\n\t\t\tjr = JsonResponse.getInstance(actorRepo.findAll());\n\n\t\t} catch (Exception e) {\n\t\t\tjr = JsonResponse.getInstance(e);\n\t\t}\n\t\treturn jr;\n\t}",
"@GetMapping(path = \"\")\n public ResponseEntity<?> getContractors(){\n logger.debug(\"Request to get all Contractors\");\n List<ContractorDTO> contractors = contractorService.getContractors().stream().map(this::convertToDTO).collect(Collectors.toList());\n if(contractors == null || contractors.size() < 1) throw new ResourceNotFoundException(\"Unable to find any Contractors\");\n return new ResponseEntity(contractors, HttpStatus.ACCEPTED);\n }",
"List<Receta> getAllWithUSer();",
"List<Flight> findAllFlights();",
"public List<FacturaEntity> getFacturas() {\n LOGGER.info(\"Inicia proceso de consultar todos los facturas\");\n List<FacturaEntity> factura = facturaPersistence.findAll();\n LOGGER.info(\"Termina proceso de consultar todos los facturas\");\n return factura;\n }",
"public List<TransporteTerrestreEntity> getTransportes() {\n LOGGER.log(Level.INFO, \"Inicia proceso de consultar todos los transportes.\");\n List<TransporteTerrestreEntity> transportes = persistence.findAll(); \n LOGGER.log(Level.INFO, \"Termina proceso de consultar todos los transportes\");\n return transportes; \n }",
"@RequestMapping(value = \"/charitys\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<Charity> getAll() {\n log.debug(\"REST request to get all Charitys\");\n return charityRepository.findAll();\n }",
"@GetMapping(\"/procesadors\")\n @Timed\n public List<Procesador> getAllProcesadors() {\n log.debug(\"REST request to get all Procesadors\");\n List<Procesador> procesadors = procesadorRepository.findAll();\n return procesadors;\n }",
"@GetMapping(\"/relacions\")\n @Timed\n public List<Relacion> getAllRelacions() {\n log.debug(\"REST request to get all Relacions\");\n return relacionRepository.findAll();\n }",
"@NotNull\n @Override\n public List<Faction> getFactions() {\n return FactionColl.get().getAll()\n .stream().map(MassiveCoreFactionsFaction::new).collect(Collectors.toList());\n }",
"@GetMapping(\"/getallCommande_Fournisseur\")\n\tprivate List<Commande_Fournisseur> getAllCommandes()\n\t{\n\t\tSystem.out.println(\"get all commandes frournisseur\");\n\t\treturn commande_FournisseurController.findAll();\n\t}",
"@GET\n public List<Lehrer> getAllLehrer() {\n Log.d(\"Webservice Lehrer Get:\");\n Query query = em.createNamedQuery(\"findAllTeachers\");\n List<Lehrer> lehrer = query.getResultList();\n return lehrer;\n }",
"@PreAuthorize(\"hasAnyRole('ADMIN')\")\n\t@RequestMapping(method=RequestMethod.GET)\n\tpublic ResponseEntity<List<ClienteDTO>> findAll() {\n\t\tList<Cliente> list = servico.findAll();\n\t\t//Converter essa lista de categorias, para ClienteDTO.\n\t\t//A melhor forma é ir no DTO e criar um construtor que receba o objeto correspondete\n\t\t//Lá das entidades de domínio.\n\t\t//Utilizar o Strem para pecorrer a lista de categorias\n\t\t//O map efetuar uma operação para cada elemento da lista\n\t\t//Vou chamar ela de obj e para cada elemento da minha lista\n\t\t// -> aeroFunction = FUNÇÃO anonima\n\t\t//instaciar a minha categoriaDTO passando o obj como parametro\n\t\t//E depois converter para lista de novo com o collect.\n\t\t\n\t\tList<ClienteDTO> listDto = list.stream().map(obj -> new ClienteDTO(obj)).collect(Collectors.toList());\n\t\t\n\t\treturn ResponseEntity.ok().body(listDto);\n\t}",
"@GetMapping(\"/record-25-herfinancieerings\")\n @Timed\n public List<Record25Herfinancieering> getAllRecord25Herfinancieerings() {\n log.debug(\"REST request to get all Record25Herfinancieerings\");\n return record25HerfinancieeringRepository.findAll();\n }",
"@GetMapping(value = \"/\")\n public ResponseEntity<List<Profesional>> findAll() {\n\t\tList<Profesional> lista;\n\t\ttry {\n\t\t\tlista = profesionalService.findAll();\n\t\t}catch (Exception e) {\n\t\t\treturn new ResponseEntity<List<Profesional>>(HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t}\n\t\treturn new ResponseEntity<List<Profesional>>(lista, HttpStatus.OK); \n }",
"@GetMapping(\"/terrenos\")\n @Timed\n public List<Terreno> getAllTerrenos() {\n log.debug(\"REST request to get all Terrenos\");\n List<Terreno> terrenos = terrenoRepository.findAll();\n return terrenos;\n }",
"List<Corretor> findAll();",
"@PreAuthorize(\"hasAnyRole('ADMIN')\")\n\t@RequestMapping(method=RequestMethod.GET) \n\tpublic ResponseEntity<List<ClienteDTO>> findAll() {\n\t\t\n\t\tList<Cliente> list = service.findAll();\n\t\t\n\t\t//veja que o stream eh para percorrer a lista, o map eh para dizer uma funcao q vai manipular cada elemento da lista\n\t\t//nesse caso, para elemento na lista ele sera passado para a categoriadto \n\t\t//e no fim eh convertida novamente para uma lista\n\t\tList<ClienteDTO> listDTO = list.stream().map(obj->new ClienteDTO(obj)).collect(Collectors.toList());\n\t\t\n\t\t//o ok eh p/ operacao feita com sucesso e o corpo vai ser o obj\n\t\treturn ResponseEntity.ok().body(listDTO); \n\t\t\n\t}",
"@GetMapping(\"/list\")\n public List<Traveller> listTraveller() {\n List<Traveller> theTraveller = travelService.findAll();\n return theTraveller;\n }",
"@GET\n @Path(\"/mostrarOrdenadasFS\")\n @Produces({\"application/json\"})\n public List<Fotografia> fotoUsuarioOrdenadaFS(){\n int idUser = 1;\n return fotografiaEJB.FotoUsuarioOrdenadasFS(idUser);\n }",
"@GetMapping\n public ResponseEntity<List<TechnicianDTO>> findAll () {\n List<TechnicianDTO> listDTO = technicianService.findAll().stream()\n .map(obj -> new TechnicianDTO(obj)).collect(Collectors.toList());\n\n return ResponseEntity.ok().body(listDTO);\n }",
"@GET\n @Path(\"/mostrarOrdenadasFT\")\n @Produces({\"application/json\"})\n public List<Fotografia> fotoUsuarioOrdenadaFT(){\n int idUser = 1;\n return fotografiaEJB.FotoUsuarioOrdenadasFT(idUser);\n }",
"@Override\n\tpublic List<Fournisseur> findAll() {\n\t\treturn null;\n\t}",
"public List<Ejemplar> getAll();",
"@GetMapping(\"/affinites\")\n @Timed\n public ResponseEntity<List<Affinite>> getAllAffinites(Pageable pageable) {\n log.debug(\"REST request to get a page of Affinites\");\n Page<Affinite> page = affiniteRepository.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/affinites\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }",
"@Override\n\tpublic List<flightmodel> getflights() {\n\t\t\n\t\tSystem.out.println(\"heloo\"+repo.findAll());\n\t\treturn repo.findAll();\n\t}",
"@RequestMapping(method = RequestMethod.GET)\n public ChuckNorrisFact getChuckNorrisFact() {\n return client.callChuckNorrisIo();\n }",
"@Override\n @Transactional(readOnly = true)\n public List<FonctionsDTO> findAll() {\n log.debug(\"Request to get all Fonctions\");\n return fonctionsRepository.findAll().stream()\n .map(fonctionsMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public List<Officer> getOfficer() {\n return officerDao.listar(); \n }",
"public void setFornecedor(String fornecedor) { this.fornecedor = fornecedor; }",
"List<Cemetery> findAll();",
"@Override\n public List<Door> findAll() {\n TypedQuery<Door> query = manager.createQuery(\"from Door door\",Door.class);\n return query.getResultList();\n }",
"public List<Freelancer> getFreelancers() {\n \t// return JsonObject\n Response response = freelancerBaseService.request(MediaType.APPLICATION_JSON).get();\n if (response.getStatus() == 200) {\n \treturn response.readEntity(new GenericType<List<Freelancer>>() {});\n } else if (response.getStatus() == 404) {\n return null;\n } else {\n throw new ServiceUnavailableException();\n }\n }",
"@GetMapping(\"/jelos\")\n @Timed\n public List<Jelo> getAllJelos() {\n log.debug(\"REST request to get all Jelos\");\n return jeloRepository.findAll();\n }",
"@GetMapping(\"/receta/all\")\t\n\tpublic List<Receta> listarReceta(){\n\t\t\treturn this.recetaService.findAll();\n\t}",
"@GetMapping(\"/clientes\")\r\n\tpublic List<Cliente> listar(){\r\n\t\treturn iClienteServicio.findAll();\r\n\t\t\r\n\t}",
"public Iterable<Floor> getFloors() {\n return mFloors;\n }",
"List<NegozioDTO> findAll();",
"@GET\r\n public List<ProveedorDetailDTO> obtenerProveedores() {\r\n List<ProveedorDetailDTO> result = listEntityToDetailDTO(proveedorLogic.getProveedores());\r\n return result;\r\n }",
"@GetMapping(\"/personas\")\n\tpublic List<Persona> allPersonas(){\n\t\treturn personaRepository.findAll();\n\t\t\n\t}",
"public List<Flight> fetchFlights() {\n\t\tSession session = SessionBuilder.buildSession();\n\t\tString query = \"from Flight\";\n\t\tQuery q = session.createQuery(query);\n\t\tList<Flight> flights = q.getResultList();\n\t\treturn flights;\n\t}",
"@Override\n\t\tpublic List<Carrera> getAll() {\n\t\t\t\treturn null;\n\t\t}",
"@RequestMapping(method = RequestMethod.GET)\r\n public Callable<ResponseObject> findAll() {\r\n return new Callable<ResponseObject>() {\r\n @Override\r\n public ResponseObject call() throws Exception {\r\n return candidateService.findAll();\r\n }\r\n };\r\n }",
"public List<Door> getDoors(){\n\t\treturn doors;\n\t}",
"public List<Fortaleza> listarFortalezas(){\r\n return cVista.listarFortalezas();\r\n }",
"public List<UsuarioDTO> obtener() throws ReizzelException;",
"List<ToChuc> findAll();",
"public List<ViajeroEntity> findAll() {\n LOGGER.log(Level.INFO, \"Consultando todos\");\n TypedQuery<ViajeroEntity> query = em.createQuery(\"select u from ViajeroEntity u\", ViajeroEntity.class);\n return query.getResultList();\n }",
"@Override\r\n\tpublic List<PersonneDTO> getAllPersonne() {\n\t\treturn daoPersonne.getAllPersonne();\r\n\t}",
"@GET\n\t@Produces({ MediaType.APPLICATION_JSON })\n\tpublic Response getRestaurantes() {\n\t\tRotondAndesTM tm = new RotondAndesTM(getPath());\n\t\tList<Restaurante> restaurantes;\n\t\ttry\n\t\t{\n\t\t\trestaurantes = tm.darRestaurantes();\n\t\t\treturn Response.status( 200 ).entity( restaurantes ).build( );\t\t\t\n\t\t}catch( Exception e )\n\t\t{\n\t\t\treturn Response.status( 500 ).entity( doErrorMessage( e ) ).build( );\n\t\t}\n\t}",
"@Override\n\tpublic List<Fournisseur> getFourniseur() {\n\t\treturn dao.getFourniseur();\n\t}",
"@Override\n\tpublic List<Factura> findAllFacturas() {\n\t\treturn facturaDao.findAll();\n\t}",
"@RequestMapping(value = \"/funcionarios\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<Funcionario> getAllFuncionarios() {\n log.debug(\"REST request to get all Funcionarios\");\n return funcionarioService.findAllByCondominioAtual();\n }",
"@GetMapping(\"/api/rents\")\r\n public ResponseEntity<List<Rent>> findAll(){\r\n final List<Rent> rentList = rentService.findAll();\r\n return rentList != null && !rentList.isEmpty()\r\n ? new ResponseEntity<>(rentList, HttpStatus.OK)\r\n : new ResponseEntity<>(HttpStatus.NOT_FOUND);\r\n }",
"@Override\n\tpublic List<Factura> findAll() {\n\t\treturn facturaRepository.findAll();\n\t}",
"@GetMapping\n public List<Author> getAllAuthors(){\n return authorService.getAllAuthors();\n }",
"@Override\n @Transactional(readOnly = true)\n public List<OrdreDTO> findAll() {\n log.debug(\"Request to get all Ordres\");\n return ordreRepository.findAll().stream()\n .map(ordreMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }",
"@GetMapping(\"/getPersonas\")\n public List<PersonaEntity> listarPersonas(){\n return personaEntities;\n }",
"@Override\n @Transactional(readOnly = true)\n public List<NominationDTO> findAll() {\n log.debug(\"Request to get all Nominations\");\n\n if(SecurityUtils.isCurrentUserInRole(AuthoritiesConstants.ADMIN))\n return _nomNominationRepository.findAll().stream()\n .map(_nominationMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n else\n return findAllNomsForTheCurrentUser();\n\n }",
"@Override\r\n\tpublic List<Factura> findAllFacturas() {\n\t\ttry {\r\n\t\t\treturn facturaDao.findAllFacturas();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@GetMapping(\"/covs\")\n @Timed\n public List<Cov> getAllCovs() {\n log.debug(\"REST request to get all Covs\");\n return covService.findAll();\n }",
"@Override\r\n\tpublic List<Fournisseur> getListFournisseur() {\n\t\treturn this.sessionFactory.getCurrentSession().createQuery(\"from fournisseur\").list();\r\n\t}",
"public String getFornecedor() { return this.fornecedor; }",
"@GetMapping(\"/requesters\")\n public List<ResponseEntity<Object>> getAllRequesters() {\n List<ResponseEntity<Object>> responses = new ArrayList<>();\n List<User> users = repo.findAll();\n for(User u : users) {\n if(u.getIntent() == Intent.SEEKING) {\n setLinks(u);\n responses.add(new ResponseEntity<>(u, HttpStatus.FOUND));\n }\n }\n return responses;\n }",
"@GetMapping(\"/person\")\n\tpublic List<Person> get(){\n\t\treturn personService.get();\n\t}",
"@RequestMapping(value = {\"/fpost/list\"}, method = RequestMethod.GET)\r\n\tpublic ResponseEntity<List<Fpost>> fetchAllFposts() {\r\n\t\tSystem.out.println(\"fetching list of all fposts\");\r\n\t\tList<Fpost> fpost = fpostDAO.list();\r\n\t\treturn new ResponseEntity<List<Fpost>>(fpost, HttpStatus.OK);\r\n\t}",
"@RequestMapping(value = \"/estados\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<Estado> getAll() {\n log.debug(\"REST request to get all Estados\");\n return estadoRepository.findAll();\n }",
"public List<Servicio> findAll();",
"@GET\n\t@Path(\"/getallfriends\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic List getAllFriends() {\n\t\tList allfrnds = fcs.getAllFriends();\n\n\t\t// for (int i = 0; i < allfrnds.size(); i++) {\n\t\t// Friend f=(Friend)allfrnds.get(i);\n\t\t// System.out.println(f.id+\"===>\"+f.name);\n\t\t// }\n\n\t\treturn allfrnds;\n\t}",
"public List<ProgressionCourrier> getAllUsers() {\n Query q = getEntityManager().createQuery(\"select U from ProgressionCourrier U order by U.nomPrenoms\");\n // set parameters\n List<ProgressionCourrier> suggestions = q.getResultList();\n\n // avoid returing null to managed beans\n if (suggestions == null) {\n suggestions = new ArrayList<>();\n }\n\n // return the suggestions\n return suggestions;\n\n }",
"@Transactional(readOnly = true)\n public List<ChocolateDTO> findAll() {\n log.debug(\"Request to get all Chocolates\");\n return chocolateRepository.findAll().stream()\n .map(chocolateMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }",
"public List<CompradorEntity> findAll() {\r\n TypedQuery<CompradorEntity> query = em.createQuery(\"select u from CompradorEntity u\", CompradorEntity.class);\r\n return query.getResultList();\r\n }",
"@GetMapping(path=\"/showData\")\n public List<Person> showData() {\n Iterable<Person> myPerson = personRepository.findAll();\n List<Person> listOfPersons = new ArrayList<>();\n myPerson.forEach((Person person) -> {\n listOfPersons.add(person);\n });\n return listOfPersons;\n }",
"public ArrayList<RaiderFund> getRaiderFunds() {\n\t\tArrayList<RaiderFund> funds = new ArrayList<RaiderFund>();\n\t\t\n\t\tif (!auth.isLoggedIn() || !isLoggedIn())\n\t\t\treturn funds;\n\t\t\n\t\tString html = \"\";\n\t\ttry {\n\t\t\tHttpURLConnection conn = Utility.getGetConn(FUND_HOME);\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(aws, php, dummy));\n\t\t\thtml = Utility.read(conn);\n\t\t\t//System.out.println(html);\n\t\t\tint index = html.indexOf(\"getOverview\");\n\t\t\tString userID = html.substring(index);\n\t\t\tuserID = userID.substring(userID.indexOf(\"(\") + 2,\n\t\t\t\t\tuserID.indexOf(\")\") - 1);\n\t\t\tString token = \"formToken\\\"\";\n\t\t\tindex = html.indexOf(token);\n\t\t\tindex += token.length() + 1;\n\t\t\tString form = html.substring(index);\n\t\t\tform = form.substring(form.indexOf(\"\\\"\") + 1);\n\t\t\tform = form.substring(0, form.indexOf(\"\\\"\"));\n\n\t\t\tconn = Utility.getPostConn(FUND_OVERVIEW);\n\t\t\tString query = \"userId=\" + userID + \"&formToken=\" + form;\n\t\t\tconn.setRequestProperty(\"Content-Length\", query.length() + \"\");\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Referer\",\n\t\t\t\t\t\"https://get.cbord.com/raidercard/full/funds_home.php\");\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(aws, php, dummy));\n\t\t\tDataOutputStream dos = new DataOutputStream(conn.getOutputStream());\n\t\t\tdos.writeBytes(query);\n\t\t\tdos.close();\n\n\t\t\thtml = \"<html><body>\";\n\t\t\thtml += Utility.read(conn);\n\t\t\thtml += \"</body></html>\";\n\t\t\tDocument doc = Jsoup.parse(html);\n\t\t\tfor (Element el : doc.select(\"tbody tr\")) {\n\t\t\t\tRaiderFund fund = new RaiderFund();\n\t\t\t\tfund.setAccountName(el.select(\".account_name\").text());\n\t\t\t\tfund.setAmount(el.select(\".balance\").text());\n\t\t\t\tfunds.add(fund);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tTTUAuth.logError(e, \"raiderfundget\", ErrorType.Fatal);\n\t\t} catch (Throwable t) {\n\t\t\tTTUAuth.logError(t, \"raiderfundgeneral\", ErrorType.Fatal, html);\n\t\t}\n\n\t\treturn funds;\n\t}",
"public void filtrarOfertas() {\n\n List<OfertaDisciplina> ofertas;\n \n ofertas = ofertaDisciplinaFacade.filtrarEixoCursoTurnoCampusQuad(getFiltrosSelecEixos(), getFiltrosSelecCursos(), turno, campus, quadrimestre);\n\n dataModel = new OfertaDisciplinaDataModel(ofertas);\n \n //Após filtrar volta os parametros para os valores default\n setFiltrosSelecEixos(null);\n setFiltrosSelecCursos(null);\n turno = \"\";\n quadrimestre = 0;\n campus = \"\";\n }",
"@GET\n\t@Path(\"/\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic List<Tela> getTelas(){\n\t\treturn new TelaDAO().readAllTelas();\n\t}",
"@Override\n public List<DuLieuBaoCaoDTO> findAll() {\n log.debug(\"Request to get all DuLieuBaoCaos\");\n return duLieuBaoCaoRepository.findAll().stream()\n .map(duLieuBaoCaoMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }",
"@Override\n\tpublic List<CorsoDiLaurea> findAll() {\n\t\treturn null;\n\t}",
"public List<FreelancerDTO> getAll() throws SQLException{\n List<Freelancer> freelancers = repositorioFreelancer.getAll();\n List<FreelancerDTO> freelancersDTO = new ArrayList<>();\n\n for(Freelancer freelancer : freelancers) {\n freelancersDTO.add((FreelancerDTO) freelancer.toDTO());\n }\n return freelancersDTO;\n }",
"@GetMapping(\"all\")\r\n public List<Resident> getAllResidents() {\r\n\r\n return residentService.findAllResident();\r\n }",
"@GetMapping(value = \"/ser4\")\r\n public List<User> ser4() {\r\n return userService.findAll();\r\n }",
"@GET\r\n\t@Produces(MediaType.APPLICATION_JSON)\r\n\tpublic List<CohabitRequestInfo> listAllCohabitRequests(){\r\n\t\t\r\n\t\tEntityManager em = getEntityManager();\r\n\t\tManageRequestService service = new ManageRequestService(em);\r\n\t\tList<CohabitRequest> cohabitRequests = service.viewAllRequests();\r\n\t\tList<CohabitRequestInfo> requests = CohabitRequestInfo.wrap(cohabitRequests);\r\n\t\tem.close();\r\n\t\t\r\n\t\treturn requests;\r\n\t}",
"@GetMapping(path = \"/all\")\n\tpublic @ResponseBody Iterable<SFDC> getAllUsers() {\n\t\treturn sfdcRepository.findAll();\n\t}",
"public List<Empleado> getAll();",
"@GetMapping(\"/emloyees\")\n public List<Employee> all() {\n return employeeRepository.findAll();\n }",
"@GetMapping(\"/parties\")\n\tpublic ResponseEntity<List<Party>> getAllParties() {\n\t\treturn new ResponseEntity<>(dataFetchService.getAllParties(), HttpStatus.OK);\n\t}",
"@GetMapping(\"/detalle-ordens\")\n @Timed\n public ResponseEntity<List<DetalleOrdenDTO>> getAllDetalleOrdens(Pageable pageable) {\n log.debug(\"REST request to get a page of DetalleOrdens\");\n Page<DetalleOrdenDTO> page = detalleOrdenService.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/detalle-ordens\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }",
"@Override\n\tpublic Iterable<Flight> viewAllFlight() {\n\t\treturn flightDao.findAll();\n\t}",
"@RequestMapping(value = \"/lotes/lotesDisponiveis\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<Lote> getAllLotesDisponiveis() {\n log.debug(\"REST retorna todos os lotes com situacao disponivel\");\n SituacaoLote situacao = situacaoLote.findOne(1L);\n return loteService.findBySituacaoLoteIs(situacao);\n }",
"List<WebCrawlerData> retrieveAllEntity();",
"List<ClientDTO> findAll();",
"@Override\n\tpublic List<Provincia> fiindAll() {\n\t\treturn provincieRepository.findAllByOrderByNameAsc();\n\t}",
"List<Neuron> getDendrites();"
] |
[
"0.66537774",
"0.63162965",
"0.61871225",
"0.5938919",
"0.5778768",
"0.56755304",
"0.5663495",
"0.565482",
"0.565309",
"0.56482637",
"0.56096107",
"0.55987877",
"0.55886024",
"0.55825835",
"0.5578412",
"0.5576339",
"0.556765",
"0.55662763",
"0.55649734",
"0.55571747",
"0.5552836",
"0.55523574",
"0.554692",
"0.5517926",
"0.55002326",
"0.5493693",
"0.5485429",
"0.5478349",
"0.54704",
"0.5456157",
"0.54537106",
"0.54416776",
"0.54403865",
"0.54343706",
"0.5426861",
"0.5426274",
"0.5425513",
"0.5417165",
"0.5416545",
"0.5412166",
"0.54080343",
"0.5406726",
"0.5402866",
"0.5390946",
"0.5389944",
"0.53862625",
"0.53687817",
"0.5365662",
"0.53622025",
"0.5362002",
"0.53392303",
"0.5328638",
"0.531664",
"0.5314735",
"0.53137666",
"0.530606",
"0.53004026",
"0.5299349",
"0.52942795",
"0.52870977",
"0.526482",
"0.52473074",
"0.5245232",
"0.52428055",
"0.5242642",
"0.52407235",
"0.522076",
"0.52154464",
"0.52091753",
"0.5206114",
"0.5205736",
"0.52027005",
"0.5196926",
"0.5191313",
"0.5183625",
"0.51773506",
"0.5171825",
"0.51717526",
"0.5164382",
"0.5161896",
"0.5152647",
"0.5146599",
"0.51345927",
"0.51336855",
"0.5128194",
"0.5126283",
"0.51218456",
"0.51157403",
"0.51140714",
"0.51134515",
"0.511135",
"0.51088035",
"0.5102674",
"0.51026154",
"0.5100686",
"0.50993055",
"0.5095409",
"0.50934064",
"0.5086859",
"0.5085883"
] |
0.70509
|
0
|
GET /fornecedors/:id > get the "id" fornecedor.
|
@RequestMapping(value = "/fornecedors/{id}",
method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE)
@Timed
public ResponseEntity<FornecedorDTO> getFornecedor(@PathVariable Long id) {
log.debug("REST request to get Fornecedor : {}", id);
FornecedorDTO fornecedorDTO = fornecedorService.findOne(id);
return Optional.ofNullable(fornecedorDTO)
.map(result -> new ResponseEntity<>(
result,
HttpStatus.OK))
.orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@GetMapping(\"/detalle-ordens/{id}\")\n @Timed\n public ResponseEntity<DetalleOrdenDTO> getDetalleOrden(@PathVariable Long id) {\n log.debug(\"REST request to get DetalleOrden : {}\", id);\n Optional<DetalleOrdenDTO> detalleOrdenDTO = detalleOrdenService.findOne(id);\n return ResponseUtil.wrapOrNotFound(detalleOrdenDTO);\n }",
"public Vendedor getVendedor(Long id);",
"@GetMapping(path = \"{id}\")\n public ResponseEntity<ContractorDTO> getContractors(@PathVariable Long id) {\n logger.debug(\"Request to get a Contractor by id\");\n if(id == null || id <= 0) throw new IllegalArgumentException(\"Expects a valid id value > 0\");\n Optional<Contractor> contractor = contractorService.getByID(id);\n if(contractor != null && contractor.isPresent()) return new ResponseEntity(convertToDTO(contractor.get()) , HttpStatus.ACCEPTED);\n throw new ResourceNotFoundException(\"Unable to find any Contractor with id \" + id);\n }",
"public int getIdFornecedor(){\n\t return idFornecedor;\n\t}",
"@RequestMapping(value = \"/fornecedors/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteFornecedor(@PathVariable Long id) {\n log.debug(\"REST request to delete Fornecedor : {}\", id);\n fornecedorService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"fornecedor\", id.toString())).build();\n }",
"@GetMapping(\"/{idDinheiro}\")\n public Dinheiro findById(@PathVariable Long idDinheiro){\n return dinheiroRepository.findById(idDinheiro).get();\n }",
"@GetMapping(\"/nominees/{id}\")\n @Timed\n public ResponseEntity<NomineeDTO> getNominee(@PathVariable Long id) {\n log.debug(\"REST request to get Nominee : {}\", id);\n Optional<NomineeDTO> nomineeDTO = nomineeService.findOne(id);\n return ResponseUtil.wrapOrNotFound(nomineeDTO);\n }",
"@GetMapping(\"/affinites/{id}\")\n @Timed\n public ResponseEntity<Affinite> getAffinite(@PathVariable Long id) {\n log.debug(\"REST request to get Affinite : {}\", id);\n Affinite affinite = affiniteRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(affinite));\n }",
"@GET\r\n\t@Path(\"/{id}\")\r\n\t@Operation(summary = \"Get contractor\", description = \"Get one contractor by enterprise ID\")\r\n\t@APIResponses(value = {\r\n\t\t@APIResponse(responseCode = \"200\", description = \"Success\"),\r\n\t\t@APIResponse(responseCode = \"404\", description = \"Not Found\"),\r\n\t\t@APIResponse(responseCode = \"500\", description = \"Other error\")\r\n\t})\r\n\tpublic ContractorDAO getContractorById(@PathParam(\"id\") String str) {\n\t\tString id = str.replaceAll(\"\\\\D\", \"\");\r\n\t\tif (id.isEmpty() || id.length() < 9) {\r\n\t\t\tthrow new WebApplicationException(\"ID too short\", Response.Status.BAD_REQUEST);\r\n\t\t}\r\n\r\n\t\t// mimic manual form entry\r\n\t\tFormDAO form = search.getSearchForm(5, 8, \"NL\");\r\n\t\treturn search.getContractorById(id, form.getViewState(), \r\n\t\t\t\tform.getCookies().get(\"JSESSIONID\"), form.getCookies().get(\"MY_SESSION\"),\r\n\t\t\t\ttrue, \"mainForm:searchButton\", \"@all\", \"mainForm:dataTab\",\"mainForm:searchButton\", 1);\r\n }",
"@GET\r\n @Path(\"{proveedorId: \\\\d+}\")\r\n public ProveedorDetailDTO obtenerProveedorID(@PathParam(\"proveedorId\") Long proveedorId) {\r\n ProveedorEntity proveedorEntity = proveedorLogic.getProveedor(proveedorId);\r\n if (proveedorEntity == null) {\r\n throw new WebApplicationException(\"El recurso /proveedores/\" + proveedorId + \" no existe.\", 404);\r\n }\r\n ProveedorDetailDTO proveedorDetailDTO = new ProveedorDetailDTO(proveedorEntity);\r\n return proveedorDetailDTO;\r\n }",
"@GetMapping(\"/fretes/{id}\")\n\tpublic ResponseEntity<?> findById(@PathVariable(\"id\") Integer id) {\n\t\treturn freteRepo.findById(id).map(record -> ResponseEntity.ok().body(record))\n\t\t\t\t.orElse(ResponseEntity.notFound().build());\n\t}",
"@GetMapping(\"/familles/{id}\")\n @Timed\n public ResponseEntity<Famille> getFamille(@PathVariable Long id) {\n log.debug(\"REST request to get Famille : {}\", id);\n Famille famille = familleService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(famille));\n }",
"@GetMapping(\"/citizens/{id}\")\n @Timed\n public ResponseEntity<Citizen> getCitizen(@PathVariable Long id) {\n log.debug(\"REST request to get Citizen : {}\", id);\n Citizen citizen = citizenService.findOne(id);\n return Optional.ofNullable(citizen)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }",
"@GetMapping(\"/act-kodus/{id}\")\n @Timed\n public ResponseEntity<ActKodu> getActKodu(@PathVariable Long id) {\n log.debug(\"REST request to get ActKodu : {}\", id);\n ActKodu actKodu = actKoduRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(actKodu));\n }",
"@GetMapping(\"/familles/{id}\")\n public ResponseEntity<FamilleDTO> getFamille(@PathVariable Long id) {\n log.debug(\"REST request to get Famille : {}\", id);\n Optional<FamilleDTO> familleDTO = familleService.findOne(id);\n return ResponseUtil.wrapOrNotFound(familleDTO);\n }",
"public static Vendedor getVendedorById(int idVendedor) {\n\t\tSessionFactory sf = HibernateUtil.getSessionFactory();\n\t\tSession sesion = sf.openSession();\n\t\tsesion.beginTransaction();\n\n\t\tVendedor vendedor = null;\n\n\t\ttry {\n\t\t\tvendedor = (Vendedor) sesion.get(Vendedor.class, idVendedor);\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tsesion.close();\n\t\t}\n\n\t\treturn vendedor;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic Dorf findById(int id) {\n\t\treturn (Dorf) getSession().get(Dorf.class,id);\r\n\t}",
"@GetMapping(\"/cuentas/{id}\")\n @Timed\n public ResponseEntity<Cuenta> getCuenta(@PathVariable Long id) {\n log.debug(\"REST request to get Cuenta : {}\", id);\n Optional<Cuenta> cuenta = cuentaRepository.findById(id);\n return ResponseUtil.wrapOrNotFound(cuenta);\n }",
"@RequestMapping(value = \"/oeuvres/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Oeuvre> getOeuvre(@PathVariable Long id) {\n log.debug(\"REST request to get Oeuvre : {}\", id);\n Oeuvre oeuvre = oeuvreRepository.findOne(id);\n return Optional.ofNullable(oeuvre)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }",
"@GetMapping(\"/relacions/{id}\")\n @Timed\n public ResponseEntity<Relacion> getRelacion(@PathVariable Long id) {\n log.debug(\"REST request to get Relacion : {}\", id);\n Optional<Relacion> relacion = relacionRepository.findById(id);\n return ResponseUtil.wrapOrNotFound(relacion);\n }",
"@GetMapping(value = \"/consultarByID\")\n public ResponseEntity consultar(@RequestParam Long id) {\n return empleadoService.consultar(id);\n }",
"@GetMapping(\"/{id}\")\n\tpublic ResponseEntity<Contato> getById(@PathVariable long id) \n\t{\n\t\tContato contato = contatoService.getById(id);\n\n\t\tif(contato == null) \n\t\t{\n\t\t\treturn ResponseEntity.notFound().build();\n\t\t}\n\t\treturn ResponseEntity.ok(contato);\n\t}",
"public RecepcionSero getSerologiaById(String id)throws Exception{\n Session session = sessionFactory.getCurrentSession();\n Query query = session.createQuery(\"from RecepcionSero s where s.id= :id \");\n query.setParameter(\"id\", id);\n return (RecepcionSero) query.uniqueResult();\n }",
"@GetMapping(path = \"/endereco/id/{id}\")\n\tpublic Endereco buscarEnderecoById(@PathVariable(name = \"id\",required = true) Long id) throws EnderecoException {\n\t\treturn buscarEnderecoService.buscarPorId(id);\n\t}",
"public Carport getCarportById(int id);",
"@GetMapping(\"/{id}\")\n\tpublic String getById(@PathVariable int id) {\n\t\tSystem.out.println(\"recuperer la commande avec l'id= \" +id);\n\t\tOptional<Commande> optional = commandeRepository.findById(id);\n\t\tif (optional.isPresent()) {\n\t\t\tSystem.out.println(\"Commande= \" +optional.get());\n\t\t} else {\n\t\t\tSystem.out.println(\"La commande avec l'id \" +id+ \" n'existe pas.\");\n\t\t}\n\t\treturn \"details_commande\";\n\t}",
"@GetMapping(\"/docentes/{id}\")\n public ResponseEntity<DocenteDTO> getDocente(@PathVariable Long id) {\n log.debug(\"REST request to get Docente : {}\", id);\n Optional<DocenteDTO> docenteDTO = docenteService.findOne(id);\n return ResponseUtil.wrapOrNotFound(docenteDTO);\n }",
"String get(String id);",
"public Epreuve getById(Long id) {\n\t\tEntityManager em = EntityManagerHolder.getCurrentEntityManager();\n\t\tEpreuve epreuve = em.find(Epreuve.class, id);\n\t\tSystem.out.println(\"Epreuve lu\");\n\t\treturn epreuve;\n\t}",
"@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n\t\tpublic ResponseEntity<Optional<Pedido>> find(@PathVariable Integer id) {\n\t\t\tOptional<Pedido> obj = service.find(id);\n\t\t\treturn ResponseEntity.ok().body(obj);\n\t\t}",
"@GetMapping(\"/person/{id}\")\n public Person findById(@PathVariable(\"id\") Long id) {\n Person person = elasticsearchOperations.get(id.toString(), Person.class);\n return person;\n }",
"@GetMapping(\"/cargos/{id}\")\n @Timed\n public ResponseEntity<Cargo> getCargo(@PathVariable Long id) {\n log.debug(\"REST request to get Cargo : {}\", id);\n Optional<Cargo> cargo = cargoRepository.findById(id);\n return ResponseUtil.wrapOrNotFound(cargo);\n }",
"Videogioco findVideogiocoById(int id);",
"@RequestMapping(method = RequestMethod.GET, value = \"/{id}\")\r\n public Callable<ResponseObject> findById(@PathVariable(\"id\") Long id) {\r\n return new Callable<ResponseObject>() {\r\n @Override\r\n public ResponseObject call() throws Exception {\r\n return candidateService.findById(id);\r\n }\r\n };\r\n }",
"@GetMapping(\"/terrenos/{id}\")\n @Timed\n public ResponseEntity<Terreno> getTerreno(@PathVariable Long id) {\n log.debug(\"REST request to get Terreno : {}\", id);\n Terreno terreno = terrenoRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(terreno));\n }",
"@GetMapping(\"/turno/{id}\")\r\n public ResponseEntity<Turno> getTurno(@PathVariable(\"id\") Long id) \r\n {\r\n Turno turn = turnoRepository.findOne(id);\r\n if (turn == null) \r\n {\r\n return ResponseEntity.notFound().header(\"X-error\", \"No se encontro el paciente con el Id: \"+id).build();\r\n }\r\n return ResponseEntity.ok(turn);\r\n }",
"@RequestMapping(value = \"/drones/{id}\", method = RequestMethod.GET)\r\n\tpublic ResponseEntity<Drone> findDroneByDroneId(@PathVariable(\"id\") Long id) {\r\n\t\tDrone drone = droneManager.findDroneByDroneId(id);\r\n\r\n\t\tif (null == drone) {\r\n\t\t\tLOGGER.log(Level.SEVERE, \" >No Drone found for findDroneByDroneId(\" + id + \"). One was expected!\");\r\n\t\t\treturn new ResponseEntity<Drone>(HttpStatus.NOT_FOUND);\r\n\t\t}\r\n\t\treturn new ResponseEntity<Drone>(drone, HttpStatus.OK);\r\n\t}",
"public static RutaDTO consultarRutaById(int identificador){\n RutaDTO ruta = null;\n HttpClient httpClient = new DefaultHttpClient();\n HttpGet del = new HttpGet(HOST_BACKEND+\"mycityviewBE/rest/ruta/\"+identificador);\n del.setHeader(\"content-type\", CONTENT_TYPE);\n del.setHeader(\"Authorization\", getAuthorization().trim());\n try {\n HttpResponse resp = httpClient.execute(del);\n if(resp.getStatusLine().getStatusCode() == HttpStatus.SC_OK){\n String respStr = EntityUtils.toString(resp.getEntity());\n Gson gson = new GsonBuilder().create();\n ruta = gson.fromJson(respStr, RutaDTO.class);\n }\n } catch (Exception ex) {\n Log.e(\"ServicioRest\", \"Error!\", ex);\n }\n return ruta;\n }",
"@GetMapping(\"/doctors/{id}\")\n @Timed\n public ResponseEntity<Doctor> getDoctor(@PathVariable String id) {\n log.debug(\"REST request to get Doctor : {}\", id);\n Doctor doctor = doctorRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(doctor));\n }",
"@RequestMapping(method = RequestMethod.GET, value = \"/{formularioId}\")\r\n\tpublic FormularioDTO get(@PathVariable(\"formularioId\") int formularioId) {\r\n\t\treturn formularioService.getOne(formularioId);\r\n\t}",
"@GetMapping(\"/byUserId/{id}\")\n public ApiResponse getTurnicet(@PathVariable UUID id){\n return turnicetService.getTurnicetById(id);\n }",
"@GetMapping(\"/convites/{id}\")\n @Timed\n public ResponseEntity<ConviteDTO> getConvite(@PathVariable Long id) {\n log.debug(\"REST request to get Convite : {}\", id);\n ConviteDTO conviteDTO = conviteService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(conviteDTO));\n }",
"public Doctor findById(int id);",
"public Candidat getUserByid(int id) {\n Candidat candidat = StaticVars.currentCandidat;\n String url = StaticVars.baseURL + \"/userbyid\";\n ConnectionRequest req = new ConnectionRequest();\n req.setUrl(url);\n req.setPost(false);\n\n req.addResponseListener(new ActionListener<NetworkEvent>() {\n @Override\n public void actionPerformed(NetworkEvent evt) {\n result = req.getResponseCode();\n }\n\n });\n NetworkManager.getInstance().addToQueueAndWait(req);\n\n return candidat;\n\n }",
"@GetMapping(\"/cotacaos/{id}\")\n @Timed\n public ResponseEntity<CotacaoDTO> getCotacao(@PathVariable Long id) {\n log.debug(\"REST request to get Cotacao : {}\", id);\n CotacaoDTO cotacaoDTO = cotacaoService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(cotacaoDTO));\n }",
"@GetMapping(\"/procesadors/{id}\")\n @Timed\n public ResponseEntity<Procesador> getProcesador(@PathVariable Long id) {\n log.debug(\"REST request to get Procesador : {}\", id);\n Procesador procesador = procesadorRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(procesador));\n }",
"@GetMapping(\"/jelos/{id}\")\n @Timed\n public ResponseEntity<Jelo> getJelo(@PathVariable Long id) {\n log.debug(\"REST request to get Jelo : {}\", id);\n Jelo jelo = jeloRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(jelo));\n }",
"Corretor findOne(Long id);",
"@GET\n @Path(\"{id}\")\n @Produces({ \"application/json\" })\n public abstract Response find(@PathParam(\"id\") Long id);",
"@Override\n\tpublic Oeuvre findOeuvreById(Long id) {\n\t\treturn oeuvreDao.findById(id).get();\n\t}",
"public Renter findRenterById(int id){\n String sql = \"SELECT renterID AS id, first_name AS firstName, last_name AS lastName, CPR AS cpr, email, phone,\" +\n \" driver_license_number AS licenseNumber, a.street, a.building, a.floor, a.door, z.zip, city.name AS city,\" +\n \" c.name AS country FROM renter r JOIN address a ON r.addressID=a.addressID JOIN zip z ON a.zipID=z.zipID \" +\n \"JOIN city ON z.cityID=city.cityID JOIN country c ON z.countryID=c.countryID WHERE renterID = ?\";\n return template.queryForObject(sql, rowMapper, id);\n }",
"@Override\n\tpublic FicheSante getFicheSanteById(int id) {\n\t\treturn daofichesante.getFicheSanteById(id);\n\t}",
"public Proyecto proyectoPorId(int id) {\n\t\t\tRestTemplate plantilla = new RestTemplate();\n\t\t\tProyecto proyecto =plantilla.getForObject(\"http://localhost:5000/proyectos/\" + id, Proyecto.class);\n\t\t\treturn proyecto;\n\t\t}",
"@Override\n public DetalleVenta get(int id) {\n return detalleVentaJpaRepository.getOne(id);\n }",
"@GetMapping(\"/conto-contabiles/{id}\")\n @Timed\n public ResponseEntity<ContoContabile> getContoContabile(@PathVariable Long id) {\n log.debug(\"REST request to get ContoContabile : {}\", id);\n ContoContabile contoContabile = contoContabileService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(contoContabile));\n }",
"@GetMapping(\"/clientes/{id}\")\n\tpublic Cliente buscarXid(@PathVariable Integer id) {\n\t\tCliente cliente = null;\n\t\ttry {\n\t\t\tcliente = this.getClienteService().findById(id);\n\t\t} catch (ExceptionService e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn cliente;\n\t}",
"@Override\n\tpublic Personne getPersonne(int id) {\n\t\treturn dao.getPersonne(id);\n\t}",
"RiceCooker getById(long id);",
"@Path(\"{proveedorId: \\\\d+}/facturas\")\r\n public Class<ProveedorFacturasResource> getProveedorFacturaResource(@PathParam(\"proveedorId\") Long proveedorId) {\r\n if (proveedorLogic.getProveedor(proveedorId) == null) {\r\n throw new WebApplicationException(\"El recurso /proveedores/\" + proveedorId + \" no existe.\", 404);\r\n }\r\n return ProveedorFacturasResource.class;\r\n }",
"@GetMapping(\"/nivels/{id}\")\n @Timed\n public ResponseEntity<NivelDTO> getNivel(@PathVariable Long id) {\n log.debug(\"REST request to get Nivel : {}\", id);\n NivelDTO nivelDTO = nivelService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(nivelDTO));\n }",
"@GetMapping(\"/etape-examen/{id}\")\n public ResponseEntity<EtapeExamenDTO> getEtapeExamen(@PathVariable Long id) {\n log.debug(\"REST request to get EtapeExamen : {}\", id);\n Optional<EtapeExamenDTO> etapeExamenDTO = etapeExamenService.findOne(id);\n return ResponseUtil.wrapOrNotFound(etapeExamenDTO);\n }",
"public Paciente get( Long id ) {\r\n\t\t\tlogger.debug(\"Retrieving codigo with id: \" + id);\r\n\t\t\t\r\n\t\t\t/*for (Paciente paciente:codigos) {\r\n\t\t\t\tif (paciente.getId().longValue() == id.longValue()) {\r\n\t\t\t\t\tlogger.debug(\"Found record\");\r\n\t\t\t\t\treturn paciente;\r\n\t\t\t\t}\r\n\t\t\t}*/\r\n\t\t\t\r\n\t\t\tlogger.debug(\"No records found\");\r\n\t\t\treturn null;\r\n\t\t}",
"@GetMapping(\"projekat/{id}\")\n\tprivate Projekat getProjekat(@PathVariable(\"id\") Integer id) {\n\t\treturn projekatRepository.getOne(id);\n\t}",
"@RequestMapping(value = \"/funcionarios/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<FuncionarioDTO> getFuncionario(@PathVariable Long id) {\n log.debug(\"REST request to get Funcionario : {}\", id);\n return Optional.ofNullable(funcionarioRepository.findOne(id))\n .map(funcionario -> new ResponseEntity<>(new FuncionarioDTO(funcionario), HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }",
"@Override\n\t@Transactional\n\tpublic Optional<DetalleCarrito> findById(Integer id) throws Exception {\n\t\treturn detalleCarritoRepository.findById(id);\n\t}",
"@RequestMapping(value = \"/charitys/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Charity> get(@PathVariable Long id) {\n log.debug(\"REST request to get Charity : {}\", id);\n return Optional.ofNullable(charityRepository.findOne(id))\n .map(charity -> new ResponseEntity<>(\n charity,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }",
"public Paciente obtenerPorId(long id) {\n return pacienteRepository.findById(id);\n }",
"@RequestMapping(value = \"/estados/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Estado> get(@PathVariable Long id, HttpServletResponse response) {\n log.debug(\"REST request to get Estado : {}\", id);\n Estado estado = estadoRepository.findOne(id);\n if (estado == null) {\n return new ResponseEntity<>(HttpStatus.NOT_FOUND);\n }\n return new ResponseEntity<>(estado, HttpStatus.OK);\n }",
"public Ramen getRamen(String id){\n return ramenRepository.findOne(id);\r\n }",
"CounselorBiographyTemp findById( Integer id ) ;",
"@GetMapping(\"/cricketers/{id}\")\n\tpublic ResponseEntity<Cricketer> getCricketerById(@PathVariable Long id) {\n\t\t\n\t\tCricketer crick = cricketRepository.findById(id).orElseThrow(() -> new ResourceNotFoundException(\"Cricketer not exists with id :\" + id));\n\t\treturn ResponseEntity.ok(crick);\n\t}",
"@GetMapping(\"/firmas/{id}\")\n @Timed\n public ResponseEntity<Firma> getFirma(@PathVariable Long id) {\n log.debug(\"REST request to get Firma : {}\", id);\n Firma firma = firmaRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(firma));\n }",
"@Override\n\tpublic Eleve findById(int id) {\n\t\treturn map.get(id);\n\t}",
"public abstract Optional<Object> getByID(@PathVariable(\"id\") int id);",
"public Cliente buscarClientePorDocumento(String id) throws ExceptionService {\n Optional<Cliente> verificar = repositorio.findById(Long.parseLong(id));\n if (verificar.isPresent()) { //verificamos que traiga un resultado\n Cliente cliente = verificar.get(); //con el get obtenemos del optional el objeto en este caso de tipo cliente\n return cliente;\n } else {\n throw new ExceptionService(\"no se encontro el cliente con el documento indicado\");\n }\n }",
"public Optional<Cliente>obtenerId(Long id){\n return clienteRepositori.findById(id);\n }",
"@GetMapping(\"/users/{id}\")\n public Transportador getUserById(@PathVariable(value = \"id\") Long userId) {\n return transportadorRepository.findByNolicencia(userId);\n }",
"@Override\r\n\tpublic Strumento getById(int id) throws StrumentoNotFoundException {\n\t\treturn strumentoRepository.getOne(id);\r\n\t}",
"Clothes getById(int id);",
"public Etudiant getById(int id) {\n\t\treturn dao.getById(id);\r\n\t}",
"Empleado findById(Integer id);",
"@Override\r\n public Assunto buscarId(int id) {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n Query query = em.createQuery(\"SELECT a FROM Assunto a WHERE a.id =:id\");\r\n query.setParameter(\"id\", id);\r\n \r\n List<Assunto> assunto = query.getResultList();\r\n if(assunto != null && assunto.size() > 0)\r\n return assunto.get(0);\r\n return null;\r\n }",
"@Override\n\tpublic Factura findById(Integer id) {\n\t\treturn facturaRepository.findById(id).orElse(null);\n\t}",
"@Override\n\tpublic Town getById(String id) {\n\t\treturn townDAO.searchUniqueByPropertyEqual(\"id\", id);\n\t}",
"RequesterVO get(int id);",
"@Override\r\n\t@Transactional(readOnly=true)\r\n\tpublic Orden findById(Long id) {\n\t\treturn ordenRepository.findById(id).orElse(null);\r\n\t}",
"@GetMapping(\"/restaurant/{id}\")\n public ResponseEntity<Restaurant> GetRestaurantByID(@PathVariable String id) {\n Optional<Restaurant> getRestaurant = restaurantServiceImpl.getById(id);\n return new ResponseEntity<Restaurant>(getRestaurant.get(), HttpStatus.OK);\n }",
"@Override\r\n\tpublic Botany show(int id) {\n\t\treturn dao.show(id);\r\n\t}",
"@GetMapping(\"/api/rents/findbyclient/{id}\")\r\n public ResponseEntity<Optional<Rent>> findByClientId(@PathVariable(name = \"id\") Long id){\r\n final Optional<Rent> rent = rentService.findByClientId(id);\r\n return rent != null\r\n ? new ResponseEntity<>(rent, HttpStatus.OK)\r\n : new ResponseEntity<>(HttpStatus.NOT_FOUND);\r\n }",
"@GetMapping(\"/get/{id}\")\n\tpublic universites getUniversiteById(@PathVariable Long id) {\n\t return IF.getId(id);\n\t}",
"@GetMapping(\"/{id}\")\n public Account account(@PathVariable(\"id\") Long id){\n return accountRepository.findOne(id);\n }",
"@GetMapping(\"/contabancarias/{id}\")\n @Timed\n public ResponseEntity<ContabancariaDTO> getContabancaria(@PathVariable Long id) {\n log.debug(\"REST request to get Contabancaria : {}\", id);\n Contabancaria contabancaria = contabancariaRepository.findOne(id);\n ContabancariaDTO contabancariaDTO = contabancariaMapper.toDto(contabancaria);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(contabancariaDTO));\n }",
"public Empresa getEmpresa(String id) {\n Empresa e = null;\n String empresaID;\n try {\n connection = con.connect();\n PreparedStatement stm = connection.prepareStatement(\"SELECT Empresa.* FROM Empresa \" +\n \"INNER JOIN Revista ON Revista.Empresa_ID = Empresa.ID \" +\n \"WHERE Revista.ID = \" + id);\n //stm.setString(1, id);\n ResultSet rs = stm.executeQuery();\n if (rs.next()) {\n String i = rs.getString(\"ID\");\n String n = rs.getString(\"Nome\");\n String r = rs.getString(\"Rua\");\n String c = rs.getString(\"Cidade\");\n String q = rs.getString(\"QuantidadeRevistas\");\n e = new Empresa(i, n, c, r, q);\n }\n } catch (SQLException e1) {\n e1.printStackTrace();\n }\n finally{\n con.close(connection);\n }\n return e;\n }",
"@GetMapping(value = \"/{id}\")\n public ResponseEntity<TechnicianDTO> findById(@PathVariable Long id) {\n TechnicianDTO objDTO = new TechnicianDTO(technicianService.findById(id));\n return ResponseEntity.ok().body(objDTO);\n }",
"@Override\n\t\tpublic Carrera get(int id) {\n\t\t\t\treturn null;\n\t\t}",
"public Proveedor buscarPorId(Integer id) {\r\n\r\n if (id != 22 && id < 123) {\r\n\r\n return ServiceLocator.getInstanceProveedorDAO().find(id);\r\n }\r\n return null;\r\n\r\n }",
"@GetMapping(\"/covs/{id}\")\n @Timed\n public ResponseEntity<Cov> getCov(@PathVariable Long id) {\n log.debug(\"REST request to get Cov : {}\", id);\n Optional<Cov> cov = covService.findOne(id);\n return ResponseUtil.wrapOrNotFound(cov);\n }",
"public Conge find( Integer idConge ) ;",
"@Override\n public Revue getById(int id) {\n return null;\n }",
"@GetMapping(\"consumer/find/{id}\")\n public User findby (@PathVariable(\"id\") Integer id) {\n return restTemplate.getForObject(\"http://provider-user/provider/find/\" + id, User.class);\n }"
] |
[
"0.66931564",
"0.65358746",
"0.6428077",
"0.6376604",
"0.6360843",
"0.6336517",
"0.6328668",
"0.63062763",
"0.62500465",
"0.6249868",
"0.62421745",
"0.62177444",
"0.621662",
"0.62115836",
"0.613597",
"0.61184907",
"0.6112353",
"0.6103128",
"0.6102288",
"0.61006683",
"0.6023793",
"0.60211337",
"0.600439",
"0.60039604",
"0.5999138",
"0.5998681",
"0.5985471",
"0.5976307",
"0.5973146",
"0.5971408",
"0.59707123",
"0.594484",
"0.59441304",
"0.5929521",
"0.59289235",
"0.5927386",
"0.59233457",
"0.5912205",
"0.58983165",
"0.5893856",
"0.5892359",
"0.5889713",
"0.5876964",
"0.5869789",
"0.58688825",
"0.5820727",
"0.581708",
"0.58166224",
"0.58129907",
"0.5810645",
"0.5800262",
"0.57991374",
"0.5792035",
"0.5779448",
"0.57789516",
"0.5777003",
"0.5768273",
"0.57628673",
"0.5753735",
"0.57470465",
"0.5744594",
"0.57388645",
"0.57242167",
"0.5720244",
"0.57086754",
"0.5706862",
"0.5698198",
"0.5697461",
"0.5695066",
"0.5693002",
"0.569298",
"0.5690734",
"0.5687939",
"0.567879",
"0.5674069",
"0.56716454",
"0.5671172",
"0.5671149",
"0.5668957",
"0.5660273",
"0.56558526",
"0.56556296",
"0.5654236",
"0.5652052",
"0.5650015",
"0.5649928",
"0.5647318",
"0.5644863",
"0.5642554",
"0.5642208",
"0.56419873",
"0.56385094",
"0.5637595",
"0.5635854",
"0.56345016",
"0.5629179",
"0.5629135",
"0.56206125",
"0.5620122",
"0.5613886"
] |
0.7935132
|
0
|
DELETE /fornecedors/:id > delete the "id" fornecedor.
|
@RequestMapping(value = "/fornecedors/{id}",
method = RequestMethod.DELETE,
produces = MediaType.APPLICATION_JSON_VALUE)
@Timed
public ResponseEntity<Void> deleteFornecedor(@PathVariable Long id) {
log.debug("REST request to delete Fornecedor : {}", id);
fornecedorService.delete(id);
return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert("fornecedor", id.toString())).build();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@DeleteMapping(\"/delete_person/{id}\")\n public void delete(@PathVariable(\"id\") int id ){\n persons.remove(id);\n }",
"@DeleteMapping(\"/detalle-ordens/{id}\")\n @Timed\n public ResponseEntity<Void> deleteDetalleOrden(@PathVariable Long id) {\n log.debug(\"REST request to delete DetalleOrden : {}\", id);\n detalleOrdenService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@DeleteMapping(\"/nominees/{id}\")\n @Timed\n public ResponseEntity<Void> deleteNominee(@PathVariable Long id) {\n log.debug(\"REST request to delete Nominee : {}\", id);\n nomineeService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@DeleteMapping(\"/delete_person\")\n public void delete_user (@RequestParam(\"id\") int id){\n persons.remove(id);\n }",
"public void delete(String id);",
"public void delete(String id);",
"public void delete(String id);",
"public void delete(String id);",
"public void delete(String id);",
"public void deleteById(String id);",
"@DeleteMapping(\"/affinites/{id}\")\n @Timed\n public ResponseEntity<Void> deleteAffinite(@PathVariable Long id) {\n log.debug(\"REST request to delete Affinite : {}\", id);\n affiniteRepository.delete(id);\n affiniteSearchRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@DeleteMapping(\"{id}\")\n public ResponseEntity<Long> delete(@PathVariable(\"id\") Long id) {\n logger.debug(\"Request to delete Contractor with id \" + id);\n if(id == null || id == 0) throw new IllegalArgumentException(\"Expects a valid id value > 0\");\n Optional<Contractor> contractor = contractorService.getByID(id);\n if(contractor == null || !contractor.isPresent()) throw new ResourceNotFoundException(\"In order to delete Contractor \" + id + \", existing Contractor must be available with same ID\");\n contractorService.deleteByID(id);\n return new ResponseEntity<Long>(id,new HttpHeaders(), HttpStatus.ACCEPTED);\n }",
"@DeleteMapping(\"/familles/{id}\")\n @Timed\n public ResponseEntity<Void> deleteFamille(@PathVariable Long id) {\n log.debug(\"REST request to delete Famille : {}\", id);\n familleService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@DeleteMapping(\"/citizens/{id}\")\n @Timed\n public ResponseEntity<Void> deleteCitizen(@PathVariable Long id) {\n log.debug(\"REST request to delete Citizen : {}\", id);\n citizenService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"citizen\", id.toString())).build();\n }",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"public void delete(int id);",
"@DELETE\n public void delete(@PathParam(\"id\") String id) {\n }",
"@DeleteMapping(\"/familles/{id}\")\n public ResponseEntity<Void> deleteFamille(@PathVariable Long id) {\n log.debug(\"REST request to delete Famille : {}\", id);\n familleService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@DeleteMapping(\"/api/rents/{id}\")\r\n public ResponseEntity<?> deleteRent(@PathVariable(name = \"id\") Long id) {\r\n return rentService.find(id).map(rent -> {\r\n rentService.delete(rent);\r\n return ResponseEntity.ok().build();\r\n }).orElseThrow(() -> new IllegalArgumentException());\r\n }",
"@DeleteMapping(\"/act-kodus/{id}\")\n @Timed\n public ResponseEntity<Void> deleteActKodu(@PathVariable Long id) {\n log.debug(\"REST request to delete ActKodu : {}\", id);\n actKoduRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@RequestMapping(method = RequestMethod.DELETE, value = \"/{id}\")\r\n public ResponseObject delete(@PathVariable(\"id\") Long id) {\r\n return candidateService.delete(id);\r\n }",
"@RequestMapping(value = \"/estados/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public void delete(@PathVariable Long id) {\n log.debug(\"REST request to delete Estado : {}\", id);\n estadoRepository.delete(id);\n }",
"@DeleteMapping(\"/relacions/{id}\")\n @Timed\n public ResponseEntity<Void> deleteRelacion(@PathVariable Long id) {\n log.debug(\"REST request to delete Relacion : {}\", id);\n\n relacionRepository.deleteById(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"public void delete(Integer id);",
"public void delete(Integer id);",
"public void delete(Integer id);",
"@DeleteMapping(\"/docentes/{id}\")\n public ResponseEntity<Void> deleteDocente(@PathVariable Long id) {\n log.debug(\"REST request to delete Docente : {}\", id);\n docenteService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"void deleteById(int id);",
"@DELETE\r\n @Path(\"{proveedorId: \\\\d+}\")\r\n public void eliminarProveedorID(@PathParam(\"proveedorId\") Long proveedorId) {\r\n ProveedorEntity entity = proveedorLogic.getProveedor(proveedorId);\r\n if (entity == null) {\r\n throw new WebApplicationException(\"El recurso /proveedores/\" + proveedorId + \" no existe.\", 404);\r\n }\r\n proveedorLogic.deleteProveedor(proveedorId);\r\n }",
"@PostMapping(\"/delete-by-id\")\r\n public String deleteById(Model model,@RequestParam int id) {\r\n try {\r\n service.delete(id);\r\n model.addAttribute(\"msg\",\"Trainee deleted successfuly!\");\r\n }catch(Exception ex) {\r\n System.out.println(\"Error \"+ex.getMessage());\r\n model.addAttribute(\"msg\",\"No record found!\");\r\n }\r\n return \"delete\";\r\n }",
"@RequestMapping(value = \"/oeuvres/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteOeuvre(@PathVariable Long id) {\n log.debug(\"REST request to delete Oeuvre : {}\", id);\n oeuvreRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"oeuvre\", id.toString())).build();\n }",
"@DeleteMapping(\"/cuentas/{id}\")\n @Timed\n public ResponseEntity<Void> deleteCuenta(@PathVariable Long id) {\n log.debug(\"REST request to delete Cuenta : {}\", id);\n\n cuentaRepository.deleteById(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"void deleteById(final String id);",
"@DeleteMapping(path = \"/endereco/delete/{id}\")\n\tpublic void deleteEndereco(@PathVariable(name = \"id\",required = true) Long id) throws EnderecoException {\n\t\tbuscarEnderecoService.deletarPorId(id);\n\t}",
"void delete(String id);",
"void delete(String id);",
"void delete(String id);",
"void delete(String id);",
"void delete(String id);",
"void delete(String id);",
"@RequestMapping(\"ville/delete/{id}\")\r\n public String delete(@PathVariable Integer id) {\r\n villeService.deleteVille(id);\r\n return \"redirect:/villes\";\r\n }",
"@DeleteMapping(\"/terrenos/{id}\")\n @Timed\n public ResponseEntity<Void> deleteTerreno(@PathVariable Long id) {\n log.debug(\"REST request to delete Terreno : {}\", id);\n terrenoRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"void deleteById(Integer id);",
"void deleteById(Integer id);",
"@DeleteMapping(\"/usuarios/{id}\")\n\t public void delete(@PathVariable Integer id) {\n\t service.delete(id);\n\t }",
"@RequestMapping( value = \"/{id}\", method = RequestMethod.DELETE )\n public void delete(@PathVariable(value=\"id\") int id){\n classService.delete(id);\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Fonctions : {}\", id);\n fonctionsRepository.deleteById(id);\n }",
"@GetMapping(\"/delete/{id}\")\n public String borrarSocio(@PathVariable Integer id) {\n personaService.borrarSocio(id);\n return \"redirect:/admin/socios\";\n\n }",
"@DeleteMapping(\"/cargos/{id}\")\n @Timed\n public ResponseEntity<Void> deleteCargo(@PathVariable Long id) {\n log.debug(\"REST request to delete Cargo : {}\", id);\n\n cargoRepository.deleteById(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@RequestMapping(value=\"/{id}\", method=RequestMethod.DELETE)\n\tpublic ResponseEntity<Void> deletar(@PathVariable(\"id\") Long id){\n\t\tlivrosService.deletar(id);\n\t\treturn ResponseEntity.noContent().build();\n\t}",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Ordre : {}\", id); ordreRepository.deleteById(id);\n }",
"@PostMapping(\"/delete\")\r\n public String deleteForm(Model model,@RequestParam int traineeId) {\r\n try {\r\n Trainee trainee = service.findById(traineeId);\r\n model.addAttribute(\"trainee\", trainee);\r\n }catch(Exception ex) {\r\n System.out.println(\"Error \"+ex.getMessage());\r\n model.addAttribute(\"msg\",\"No record found!\");\r\n }\r\n return \"delete\";\r\n }",
"void delete( Integer id );",
"public void deleteById(int theId);",
"@DeleteMapping(\"/procesadors/{id}\")\n @Timed\n public ResponseEntity<Void> deleteProcesador(@PathVariable Long id) {\n log.debug(\"REST request to delete Procesador : {}\", id);\n procesadorRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"public String deleteResearcher(int id);",
"ResponseEntity deleteById(UUID id);",
"public void delete(Long id);",
"public void delete(Long id);",
"public void delete(Long id);",
"public void delete(Long id);",
"public void delete(Long id);",
"public void delete(Long id) {\n log.debug(\"Request to delete CaraterDaInternacao : {}\", id);\n caraterDaInternacaoRepository.deleteById(id);\n caraterDaInternacaoSearchRepository.deleteById(id);\n }",
"@DeleteMapping(\"/firmas/{id}\")\n @Timed\n public ResponseEntity<Void> deleteFirma(@PathVariable Long id) {\n log.debug(\"REST request to delete Firma : {}\", id);\n firmaRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"public void delete(Long id) {\n log.debug(\"Request to delete Candidato : {}\", id);\n candidatoRepository.deleteById(id);\n }",
"@Override\r\n\tpublic void delete(String id) {\n\t\t\r\n\t}",
"@Override\n\tpublic void delete(String id) throws Exception {\n\n\t}",
"@DeleteMapping(\"/jelos/{id}\")\n @Timed\n public ResponseEntity<Void> deleteJelo(@PathVariable Long id) {\n log.debug(\"REST request to delete Jelo : {}\", id);\n jeloRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@DeleteMapping(value = \"/delete\", produces = \"application/json\")\n void delete(@RequestParam int id);",
"@DeleteMapping(\"/doctors/{id}\")\n @Timed\n public ResponseEntity<Void> deleteDoctor(@PathVariable String id) {\n log.debug(\"REST request to delete Doctor : {}\", id);\n doctorRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"void delete(Integer id);",
"void delete(Integer id);",
"@DeleteMapping(\"{id}\")\n public ResponseEntity<PersonResponse> delete(@PathVariable(name = \"id\") String id) {\n personService.delete(id);\n return ResponseEntity.status(HttpStatus.NO_CONTENT).build();\n }",
"public void eliminarTripulante(Long id);",
"public void deleteById(Long id);",
"public void deleteByVaiTroID(long vaiTroId);",
"public void deleteParticipacao(Integer id) {\n participacaoRepository.deleteById(id);\n //listClient();\n \n}",
"@DeleteMapping(\"/contabancarias/{id}\")\n @Timed\n public ResponseEntity<Void> deleteContabancaria(@PathVariable Long id) {\n log.debug(\"REST request to delete Contabancaria : {}\", id);\n contabancariaRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"public void delete(int id) {\n\n\t}",
"@Override\n\tpublic void delete(String id) {\n\n\t}",
"@PreAuthorize(\"hasAuthority('ADMIN')\")\n // curl -i --request DELETE -u tim:Dial0gicRots! http:/localhost:8080/dist/delete/425\n // @PreAuthorize(\"hasAuthority('ROLE_ADMIN')\")\n @DeleteMapping(\"delete/{id}\")\n public ResponseEntity<Void> deleteDistance(@PathVariable(\"id\") Integer id) {\n log.info(\"deleteDistance\");\n distanceService.deleteDistance(id);\n return new ResponseEntity<Void>(HttpStatus.NO_CONTENT);\n }",
"@DeleteMapping(\"/godowns/{id}\")\n @Timed\n public ResponseEntity<Void> deleteGodown(@PathVariable Long id) {\n log.debug(\"REST request to delete Godown : {}\", id);\n godownService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"public void delete(Long id) {\n log.debug(\"Request to delete Kohnegi : {}\", id);\n kohnegiRepository.deleteById(id);\n }",
"@Override\n\tpublic void delete(String id) {\n\t\t\n\t}",
"@Override\n\tpublic void delete(String id) {\n\t\t\n\t}",
"@RequestMapping(value = \"/charitys/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public void delete(@PathVariable Long id) {\n log.debug(\"REST request to delete Charity : {}\", id);\n charityRepository.delete(id);\n }",
"void delete(ID id);",
"public void deleteUsuario (int id);",
"@DeleteMapping(\"/cotacaos/{id}\")\n @Timed\n public ResponseEntity<Void> deleteCotacao(@PathVariable Long id) {\n log.debug(\"REST request to delete Cotacao : {}\", id);\n cotacaoService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Jeu : {}\", id);\n jeuRepository.delete(id);\n jeuSearchRepository.delete(id);\n }",
"@Override\r\n\tpublic void delete(String id) {\n\r\n\t}"
] |
[
"0.7331649",
"0.72771645",
"0.72077405",
"0.7171924",
"0.71227896",
"0.71227896",
"0.71227896",
"0.71227896",
"0.71227896",
"0.70900697",
"0.70630676",
"0.7061972",
"0.70611715",
"0.70452076",
"0.70424503",
"0.70424503",
"0.70424503",
"0.70424503",
"0.70424503",
"0.70424503",
"0.70424503",
"0.70424503",
"0.70424503",
"0.70424503",
"0.701953",
"0.69950545",
"0.69784796",
"0.6971378",
"0.69660383",
"0.69585246",
"0.69563514",
"0.6936936",
"0.69197094",
"0.69197094",
"0.69197094",
"0.6917814",
"0.69157475",
"0.6905573",
"0.68946815",
"0.6881312",
"0.6880636",
"0.6873739",
"0.68698424",
"0.686842",
"0.686842",
"0.686842",
"0.686842",
"0.686842",
"0.686842",
"0.6858098",
"0.68470174",
"0.6842429",
"0.6842429",
"0.68392664",
"0.6835841",
"0.68304735",
"0.681231",
"0.6804619",
"0.67943287",
"0.67897093",
"0.6785345",
"0.6783891",
"0.67745435",
"0.6755982",
"0.67546326",
"0.6743745",
"0.67376673",
"0.67376673",
"0.67376673",
"0.67376673",
"0.67376673",
"0.6737382",
"0.6733889",
"0.67300427",
"0.6729318",
"0.67220145",
"0.6721983",
"0.6720674",
"0.671094",
"0.6710768",
"0.6710768",
"0.6705568",
"0.67036533",
"0.6696978",
"0.66845673",
"0.6684536",
"0.667393",
"0.66736287",
"0.6667309",
"0.66619885",
"0.6661519",
"0.66593075",
"0.66571",
"0.66571",
"0.6656674",
"0.66554415",
"0.6645541",
"0.664357",
"0.66411316",
"0.6628158"
] |
0.84996855
|
0
|
Turns an integer into an array of bytes in LITTLE_ENDIAN format.
|
public static byte[] convertIntToByteArray(int toConvert, Boolean... bigEndian) {
// Get the byte array of the int and return it, little endian style
if (bigEndian.length > 0 && bigEndian[0]) {
return ByteBuffer.allocate(4).order(ByteOrder.BIG_ENDIAN).putInt(toConvert).array();
}
else {
return ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(toConvert).array();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static byte[] toLEBytes(int i) {\n\t\treturn ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(i).array();\n\t}",
"public static byte[] intToBytes(int i) {\n\n ByteBuffer byteBuffer = ByteBuffer.allocate(NUM_BYTES_IN_INT);\n byteBuffer.putInt(i);\n return byteBuffer.array();\n\n }",
"static byte[] toBEBytes(int i) {\n\t\treturn ByteBuffer.allocate(4).order(ByteOrder.BIG_ENDIAN).putInt(i).array();\n\t}",
"private byte[] intToByteArray(int i) {\n ByteBuffer bbf = ByteBuffer.allocate(4)\n .order(ByteOrder.LITTLE_ENDIAN)\n .putInt(i);\n return bbf.array();\n }",
"public static byte[] getBytes(int value) {\r\n\t\treturn ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(value).array();\r\n\t}",
"public static byte[] intToBinary(int value)\n {\n String tmp = Integer.toBinaryString(value);\n int len = tmp.length();\n int change = 8 - (len % 8);\n\n if(change != 0) len += change;\n\n byte[] res = new byte[len];\n for(int i = 0; i < len; i++) {\n if(i < change){\n // Tag on leading zeroes if needed\n res[i] = 0x00;\n }else{\n char c = tmp.charAt(i - change);\n res[i] = (byte) (c == '0' ? 0x00 : 0x01);\n }\n }\n\n return res;\n }",
"public static byte[] intToByte(int i) {\n return new byte[] {(byte)(i>>24), (byte)(i>>16), (byte)(i>>8), (byte)i};\n }",
"public static byte[] toBytes(final long number) {\n\t\treturn new byte[] {\n\t\t\t(byte) (number >>> 56),\n\t\t\t(byte) (number >>> 48),\n\t\t\t(byte) (number >>> 40),\n\t\t\t(byte) (number >>> 32),\n\t\t\t(byte) (number >>> 24),\n\t\t\t(byte) (number >>> 16),\n\t\t\t(byte) (number >>> 8),\n\t\t\t(byte) (number)\n\t\t};\n\t}",
"public static byte[] intToBytesArray(int num) {\r\n\t\tbyte[] byteArr = new byte[4];\r\n\t\t// big endian, low to high\r\n\t\tfor (int i = 0; i < byteArr.length; i++) {\r\n\t\t\tbyteArr[byteArr.length - 1 - i] = (byte) (num & 0xff);\r\n\t\t\tnum >>= 8;\r\n\t\t}\r\n\t\treturn byteArr;\r\n\t}",
"private static byte[] intToBytes(Integer integer) {\n\t\treturn BigInteger.valueOf(integer).toByteArray();\n\t}",
"private byte[] intToBytes(int i) {\n\t\tb.clear();\n\t\treturn b.order(ByteOrder.LITTLE_ENDIAN).putInt(i).array();\n\t}",
"public static byte[] intToBytes(int in) {\n byte[] bytes = new byte[4];\n for (int i = 0; i < 4; i++) {\n bytes[i] = (byte) ((in >>> i * 8) & 0xFF);\n }\n return bytes;\n }",
"byte[] IntToByte(int i)\r\n {\r\n return Integer.toString(i).getBytes();\r\n }",
"public byte[] intToBytes(int x) {\n\t\tByteBuffer buffer = ByteBuffer.allocate(Integer.BYTES);\n\t\tbuffer.putInt(x);\n\t\treturn buffer.array();\n\t}",
"public static byte[] getBytes(long value) {\r\n\t\treturn ByteBuffer.allocate(8).order(ByteOrder.LITTLE_ENDIAN).putLong(value).array();\r\n\t}",
"static byte[] toArray(int value) {\n return new byte[] {\n (byte) (value >> 24),\n (byte) (value >> 16),\n (byte) (value >> 8),\n (byte) value };\n }",
"public static byte[] convertInt8(int v)\r\n {\r\n byte[] bytes = new byte[1];\r\n bytes[0] = (byte) v;\r\n return bytes;\r\n }",
"public static byte[] intToBytes(int value) {\n ByteBuffer bb = ByteBuffer.allocate(4);\n bb.putInt(value);\n return bb.array();\n }",
"public static byte[] toByteArray(int value) {\n INT_BUFFER.clear();\n return INT_BUFFER.order(ByteOrder.LITTLE_ENDIAN).putInt(value).array();\n }",
"public static byte[] toBytes(int val) {\n byte [] b = new byte[4];\n for(int i = 3; i > 0; i--) {\n b[i] = (byte) val;\n val >>>= 8;\n }\n b[0] = (byte) val;\n return b;\n }",
"private byte[] bit_conversion(int i) {\n // originally integers (ints) cast into bytes\n // byte byte7 = (byte)((i & 0xFF00000000000000L) >>> 56);\n // byte byte6 = (byte)((i & 0x00FF000000000000L) >>> 48);\n // byte byte5 = (byte)((i & 0x0000FF0000000000L) >>> 40);\n // byte byte4 = (byte)((i & 0x000000FF00000000L) >>> 32);\n\n // only using 4 bytes\n byte byte3 = (byte) ((i & 0xFF000000) >>> 24); // 0\n byte byte2 = (byte) ((i & 0x00FF0000) >>> 16); // 0\n byte byte1 = (byte) ((i & 0x0000FF00) >>> 8); // 0\n byte byte0 = (byte) ((i & 0x000000FF));\n // {0,0,0,byte0} is equivalent, since all shifts >=8 will be 0\n return (new byte[] { byte3, byte2, byte1, byte0 });\n }",
"public static byte[] toBytes(long val) {\n byte [] b = new byte[8];\n for (int i = 7; i > 0; i--) {\n b[i] = (byte) val;\n val >>>= 8;\n }\n b[0] = (byte) val;\n return b;\n }",
"public byte[] l2b(long value) {\n byte[] data = new byte[8];\n data[0] = (byte) ((value >> 56) & 0xFF);\n data[1] = (byte) ((value >> 48) & 0xFF);\n data[2] = (byte) ((value >> 40) & 0xFF);\n data[3] = (byte) ((value >> 32) & 0xFF);\n data[4] = (byte) ((value >> 24) & 0xFF);\n data[5] = (byte) ((value >> 16) & 0xFF);\n data[6] = (byte) ((value >> 8) & 0xFF);\n data[7] = (byte) (value & 0xFF);\n return data;\n }",
"public static byte[] toBigEndianByteArray(Number number) throws ScriptException\n {\n long n = number.longValue();\n for (int i = 1; i <= 8; i++)\n {\n long maxNum = 1L << (i * 8 - 1);\n if (n <= maxNum && n >= -maxNum)\n {\n byte[] res = new byte[i];\n boolean changeSign = false;\n if (n < 0)\n {\n changeSign = true;\n n = -n;\n }\n for (int j = 0; j < i; j++)\n {\n res[j] = (byte) ((n >> j * 8) & 0xFF);\n }\n // Bitcoin scripts use 1-complement for negative numbers\n if (changeSign)\n {\n res[i - 1] |= 0x80;\n }\n return res;\n }\n }\n throw new ScriptException(\"Number to large to convert to binary: \" + number);\n }",
"private static byte[] getBytes(int val) {\n log.log(Level.FINEST, String.format(\"%d\", val));\n byte[] ret = new byte[NekoIOConstants.INT_LENGTH];\n for (int i = 0; i < NekoIOConstants.INT_LENGTH; i++) {\n if (NekoIOConstants.BIG_ENDIAN) {\n ret[NekoIOConstants.INT_LENGTH - 1 - i] = (byte) val;\n } else {\n ret[i] = (byte) val;\n }\n val >>= 8;\n }\n return ret;\n }",
"public byte[] convertIntToByte(int[] intArr) throws IOException {\r\n byte[] byteArr = new byte[intArr.length];\r\n for(int i = 0; i < intArr.length; i++) {\r\n Integer tempInt = intArr[i];\r\n byte tempByte = tempInt.byteValue();\r\n byteArr[i] = tempByte;\r\n }\r\n return byteArr;\r\n }",
"public static byte[] longToBytes(long l) {\n\n ByteBuffer byteBuffer = ByteBuffer.allocate(NUM_BYTES_IN_LONG);\n byteBuffer.putLong(l);\n return byteBuffer.array();\n\n }",
"public static byte[] convertIntegersToBytes(int[] nums) {\n if (nums != null) {\n byte[] outputBytes = new byte[nums.length * 4];\n for(int i = 0, k = 0; i < nums.length; i++) {\n int integerTemp = nums[i];\n for(int j = 0; j < 4; j++, k++) {\n outputBytes[k] = (byte)((integerTemp >> (8 * j)) & 0xFF);\n }\n }\n return outputBytes;\n } else {\n return null;\n }\n }",
"public byte[] i2b(int value) {\n byte[] data = new byte[4];\n data[0] = (byte) ((value >> 24) & 0xFF);\n data[1] = (byte) ((value >> 16) & 0xFF);\n data[2] = (byte) ((value >> 8) & 0xFF);\n data[3] = (byte) (value & 0xFF);\n return data;\n }",
"public static byte[] getLongAsBytes(long l) {\n\t\treturn new byte[] {\n\t\t\t\t(byte) (l >> 56),\n\t\t\t\t(byte) (l >> 48),\n\t\t\t\t(byte) (l >> 40),\n\t\t\t\t(byte) (l >> 32),\n\t\t\t\t(byte) (l >> 24),\n\t\t\t\t(byte) (l >> 16),\n\t\t\t\t(byte) (l >> 8),\n\t\t\t\t(byte) l\n\t\t\t};\n\t}",
"public static byte[] longToBytes(long x) {\n\t ByteBuffer buffer = ByteBuffer.allocate(Long.BYTES);\n\t buffer.putLong(x);\n\t return buffer.array();\n\t}",
"public static byte[] intToFourBytes(int val) {\n if (val < 0) throw new IllegalArgumentException(\"Value may not be signed.\");\n byte[] bytes = new byte[4];\n\n for (int i = 3; i >= 0; --i) {\n // unpack a byte\n byte b = (byte)(val & 0xff);\n // shift by 8 bits\n val >>= 8;\n // store the unpacked byte, moving from LSB to MSB (so the MSB ends up in bytes[0])\n bytes[i] = b;\n }\n\n return bytes;\n }",
"private static final byte[] longToByteArray(long l) {\n\t\tbyte[] retVal = new byte[8];\n\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tretVal[i] = (byte) l;\n\t\t\tl >>= 8;\n\t\t}\n\n\t\treturn retVal;\n\t}",
"private static byte[] toByteArray(int[] array) {\n final byte[] res = new byte[array.length];\n for (int i = 0; i < array.length; ++i) {\n final int value = array[i];\n res[i] = (byte) value;\n }\n return res;\n }",
"private byte[] intToBits(int number, int n) {\n\t\tbyte[] bits = new byte[n];\n\t\t\n\t\tString bitString = Integer.toBinaryString(number);\n\t\twhile (bitString.length() < n) {\n\t\t\tbitString = \"0\" + bitString;\n\t\t}\n\t\t\n\t\tfor(int i = 0, maxLen = bits.length; i < maxLen; i++) {\n\t\t\tbits[i] = (byte) (bitString.charAt(i) == 1 ? 1 : 0);\n\t\t}\n\t\t\n\t\treturn bits;\n\t}",
"public byte[] int2byteArray(int[] ints){\n ByteBuffer buf = ByteBuffer.allocate(ints.length * Integer.BYTES);\n for (int i = 0; i < ints.length; i++) {\n buf.putInt(ints[i]);\n }\n\n return buf.array();\n }",
"public static byte[] integerAsConsecutiveBytes(int num) {\r\n\t\tbyte[] bytes = new byte[4];\r\n\t\tfor(int i=0; i < bytes.length; i++) {\r\n\t\t\tint shiftFactor = 8 * (bytes.length - (i + 1));\r\n\t\t\tint value = num >> shiftFactor;\r\n\t\t\tbytes[i] = (byte) value;\r\n\t\t}\r\n\t\treturn bytes;\r\n\t}",
"public static byte[] b(int... array) {\n if (array == null) {\n return null;\n }\n byte[] ret = new byte[array.length];\n for (int i = 0; i < ret.length; i++) {\n ret[i] = (byte) array[i];\n }\n return ret;\n }",
"public static byte[] convertInt32(int v, boolean isLE)\r\n {\r\n byte[] bytes = new byte[4];\r\n if (isLE)\r\n {\r\n bytes[3] = (byte) ((v >>> 24) & 0xFF);\r\n bytes[2] = (byte) ((v >>> 16) & 0xFF);\r\n bytes[1] = (byte) ((v >>> 8) & 0xFF);\r\n bytes[0] = (byte) ((v >>> 0) & 0xFF);\r\n }\r\n else\r\n {\r\n bytes[0] = (byte) ((v >>> 24) & 0xFF);\r\n bytes[1] = (byte) ((v >>> 16) & 0xFF);\r\n bytes[2] = (byte) ((v >>> 8) & 0xFF);\r\n bytes[3] = (byte) ((v >>> 0) & 0xFF);\r\n }\r\n return bytes;\r\n }",
"public static Binary integer_to_binary_1(Integer integer) {\n return new Binary(integer.toString().getBytes(ISO_8859_1));\n }",
"private static byte[] intToSmallBytes(int value) {\n return shortToBytes((short)value);\n }",
"private byte[] shortToByteArray(short i) {\n ByteBuffer bbf = ByteBuffer.allocate(2)\n .order(ByteOrder.LITTLE_ENDIAN)\n .putShort(i);\n return bbf.array();\n }",
"static byte[] long2byteArray(long number, int length, boolean swapHalfWord) {\n }",
"public static int[] integerToBinary(int num)\n\t{\n\t\tint binaryNumber []= new int[3];\n\t\tint finalBinaryNumber []= {0,0,0};\n\t\tint count=2;\n\t\tint k= Math.abs(num);\n\t\twhile(k>0)\n\t\t{\n\t\t\tbinaryNumber[count]= k%2;\n\t\t\tk=k/2;\n\t\t\tcount--;\n\t\t\t\n\t\t}\n\t\tfor(int i=2; i>=0;i--)\n\t\t{\n\t\t\tfinalBinaryNumber[i]= binaryNumber[i];\n\t\t}\n\t\treturn finalBinaryNumber;\n\t}",
"public static void intToByteArray(int value, byte[] buffer, int offset) {\n buffer[offset] = (byte) (value >> 24 & 0xFF);\n buffer[offset + 1] = (byte) (value >> 16 & 0xFF);\n buffer[offset + 2] = (byte) (value >> 8 & 0xFF);\n buffer[offset + 3] = (byte) (value & 0xFF);\n }",
"public static byte[] toBytes(final long... numbers) {\n\t\tbyte[] bytes = new byte[numbers.length * 8];\n\t\tfor (int i = 0, j = 0; i < numbers.length; i++, j += 8) {\n\t\t\tSystem.arraycopy(toBytes(numbers[i]), 0, bytes, j, 8);\n\t\t}\n\t\treturn bytes;\n\t}",
"static byte[] Int16ToByteArray(int data) {\n byte[] result = new byte[2];\n result[0] = (byte) ((data & 0x000000FF));\n result[1] = (byte) ((data & 0x0000FF00) >> 8);\n return result;\n }",
"public static byte[] getEncodeIntervalNumberByteArray(long intervalNumber) {\n return intToByteLittleEndian((int)getUint32(intervalNumber));\n }",
"private static byte[] intArray2ByteArray (int[] src)\n\t{\n\t\tbyte[] dst = new byte [src.length];\n\t\tfor (int i = 0; i < src.length; ++ i)\n\t\t\tdst[i] = (byte) src[i];\n\t\treturn dst;\n\t}",
"public static byte[] convertLong(long v, boolean isLE)\r\n {\r\n byte[] bytes = new byte[8];\r\n if (isLE)\r\n {\r\n bytes[0] = (byte) (v >>> 0);\r\n bytes[1] = (byte) (v >>> 8);\r\n bytes[2] = (byte) (v >>> 16);\r\n bytes[3] = (byte) (v >>> 24);\r\n bytes[4] = (byte) (v >>> 32);\r\n bytes[5] = (byte) (v >>> 40);\r\n bytes[6] = (byte) (v >>> 48);\r\n bytes[7] = (byte) (v >>> 56);\r\n }\r\n else\r\n {\r\n bytes[0] = (byte) (v >>> 56);\r\n bytes[1] = (byte) (v >>> 48);\r\n bytes[2] = (byte) (v >>> 40);\r\n bytes[3] = (byte) (v >>> 32);\r\n bytes[4] = (byte) (v >>> 24);\r\n bytes[5] = (byte) (v >>> 16);\r\n bytes[6] = (byte) (v >>> 8);\r\n bytes[7] = (byte) (v >>> 0);\r\n }\r\n return bytes;\r\n }",
"public synchronized static byte [] LongToBytes ( long ldata, int n )\n {\n byte buff[] = new byte [ n ];\n\n for ( int i=n-1; i>=0; i--)\n {\n // Keep assigning the right most 8 bits to the\n // byte arrays while shift 8 bits during each iteration\n buff [ i ] = (byte) ldata;\n ldata = ldata >> 8;\n }\n return buff;\n }",
"public static byte[] parseIntToIP(int ip) {\n return ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(ip).array();\n }",
"public byte[] toByteArray() {\n/* 510 */ ByteBuffer buff = ByteBuffer.allocate(40).order(ByteOrder.LITTLE_ENDIAN);\n/* 511 */ writeTo(buff);\n/* 512 */ return buff.array();\n/* */ }",
"public static byte[] getBytes(char value) {\r\n\t\treturn ByteBuffer.allocate(2).order(ByteOrder.LITTLE_ENDIAN).putChar(value).array();\r\n\t}",
"public static byte[] LongToOpaque(long number) { \n long temp = number; \n byte[] b = new byte[16]; //0-7 time stamp, 8-15 customized \n for (int i = 0; i < 8; i++) { \n b[i] = new Long(temp & 0xff).byteValue();\n temp = temp >> 8; // right shift 8\n } \n return b; \n }",
"public byte[] getEncoded() {\n return toByteArray(Integer.valueOf(this.intValue));\n }",
"public static int[] getBytesFromQuadByte(final long longValue) {\n int[] intArray = new int[4];\n\n intArray[0] = (int) ((longValue >>> 3 * BYTE_LENGTH) & BYTE_MASK);\n intArray[1] = (int) ((longValue >>> 2 * BYTE_LENGTH) & BYTE_MASK);\n intArray[2] = (int) ((longValue >>> BYTE_LENGTH) & BYTE_MASK);\n intArray[3] = (int) (longValue & BYTE_MASK);\n\n return intArray;\n }",
"public static byte[] intToHex(long value){\n\t\tint count=7;\n\t\tshort[] bytes = new short[8];\n\t\tcal(value,count,bytes);\n\t\treturn shorts2bytes(bytes);\n\t}",
"public static double bitsToBytes(double num) { return (num/8); }",
"public static byte[] getBytes(short value) {\r\n\t\treturn ByteBuffer.allocate(2).order(ByteOrder.LITTLE_ENDIAN).putShort(value).array();\r\n\t}",
"private static final void encodeBEInt(int paramInt1, byte[] paramArrayOfByte, int paramInt2)\r\n/* 137: */ {\r\n/* 138:209 */ paramArrayOfByte[(paramInt2 + 0)] = ((byte)(paramInt1 >>> 24));\r\n/* 139:210 */ paramArrayOfByte[(paramInt2 + 1)] = ((byte)(paramInt1 >>> 16));\r\n/* 140:211 */ paramArrayOfByte[(paramInt2 + 2)] = ((byte)(paramInt1 >>> 8));\r\n/* 141:212 */ paramArrayOfByte[(paramInt2 + 3)] = ((byte)paramInt1);\r\n/* 142: */ }",
"ByteOrder byteOrder();",
"public native static long getConvertBytes();",
"byte[] convertTo8Bit(byte[] data, int from, int to)\n {\n // How big?\n int main = ((to - from) / 8) * 8;\n int remainder = (to - from) - main;\n int size = ((to - from) / 8) * 7 + (remainder - 1);\n \n byte[] newd = new byte[size];\n \n int j = 0;\n for(int i = from; i < to; i += 8)\n { \n for(int x = 0; x < 7; x++)\n {\n if (j + x < newd.length)\n newd[j + x] = (byte)(data[i + x + 1] | (byte)(((data[i] >>> x) & 0x1) << 7));\n }\n j += 7;\n }\n return newd;\n }",
"public static String intToBinaryString(int value) {\r\n String bin = \"00000000000000000000000000000000\" + Integer.toBinaryString(value);\r\n\r\n return bin.substring(bin.length() - 32, bin.length() - 24)\r\n + \" \"\r\n + bin.substring(bin.length() - 24, bin.length() - 16)\r\n + \" \"\r\n + bin.substring(bin.length() - 16, bin.length() - 8)\r\n + \" \"\r\n + bin.substring(bin.length() - 8, bin.length());\r\n }",
"private static ByteBuffer toByteBuffer(int[] array) {\n final ByteBuffer buffer = ByteBuffer.allocateDirect(array.length);\n buffer.put(toByteArray(array));\n buffer.rewind();\n return buffer;\n }",
"String intToBinaryNumber(int n){\n return Integer.toBinaryString(n);\n }",
"public char[] decimalToBinary(int value) {\n\t\t// TODO: Implement this method.\n\t\treturn null;\n\t}",
"public static byte[] longToByteArray(long value, int valueSize, int length) {\n long val = value;\n // Convert the long to 8-byte BE representation\n byte[] b = new byte[8];\n for (int i = 7; i >= 0 && val != 0L; i--) {\n b[i] = (byte) val;\n val >>>= 8;\n }\n // Then copy the rightmost valueSize bytes\n // e.g., for an integer we want rightmost 4 bytes\n return Arrays.copyOfRange(b, 8 - valueSize, 8 + length - valueSize);\n }",
"public static byte[] getShortAsBytes(short s) {\n\t\treturn new byte[] {\n\t\t\t\t(byte) (s >>> 8),\n\t\t\t\t(byte) s\n\t\t};\n\t}",
"public static int toUnsignedByte(final int intValue) {\n return intValue & BYTE_MASK;\n }",
"public static String toByteString(byte value) {\n String str = String.format(\"%x\", value);\n if (str.length() == 1)\n str = \"0\" + str;\n return str;\n }",
"public int toByte(int dontCareValue){\n if(dontCareValue != 0 && dontCareValue != 1){\n throw new IllegalArgumentException(\"dontCareValue must be 0 or 1\");\n }\n int bite = 0;\n for(int idx = LENGTH - 1; idx >= 0; idx--){\n int bit;\n switch(value[idx]){\n case ZERO: bit = 0; break;\n case ONE: bit = 1; break;\n default: bit = dontCareValue; break;\n }\n bite |= bit;\n bite <<= 1;\n }\n //During conversion, we shifted one too many.\n return bite >> 1;\n }",
"public byte[] toBytes () {\n return toTuple().toBytes();\n }",
"static int intToBytes(int int_value, byte[] dest, int index) {\n dest[index + 0] = (byte) (int_value & 0xff);\n dest[index + 1] = (byte) ((int_value >> 8) & 0xff);\n dest[index + 2] = (byte) ((int_value >> 16) & 0xff);\n dest[index + 3] = (byte) ((int_value >> 24) & 0xff);\n return 4;\n }",
"public static String dexToBin(int value) {\n\tString binVal = Integer.toBinaryString(value);\n\t\treturn binVal;\n\t\t\n\t}",
"public static byte toSignedByte(final int intValue) {\n return (byte) ((intValue << 24) >> 24);\n }",
"public static int intToBytes(int s, byte bc[], int index) {\n bc[index++] = (byte) ((s >> 24) & 0xff);\n bc[index++] = (byte) ((s >> 16) & 0xff);\n bc[index++] = (byte) ((s >> 8) & 0xff);\n bc[index++] = (byte) (s & 0xff);\n return index;\n }",
"public static byte[] getBytes( int flags )\n {\n return new byte[]{\n (byte)( flags >>> 24), \n (byte)( ( flags >> 16 ) & 0x00ff ), \n (byte)( ( flags >> 8 ) & 0x00ff ), \n (byte)( flags & 0x00ff ) };\n }",
"List<Byte> getAsBytes();",
"public static byte[] shortToBytes(short s) {\n\n ByteBuffer byteBuffer = ByteBuffer.allocate(NUM_BYTES_IN_SHORT);\n byteBuffer.putShort(s);\n return byteBuffer.array();\n\n }",
"private byte[] toByte(long address) {\n byte[] addressInBytes = new byte[]{\n (byte) (address >> 40 & 0xff),\n (byte) (address >> 32 & 0xff),\n (byte) (address >> 24 & 0xff),\n (byte) (address >> 16 & 0xff),\n (byte) (address >> 8 & 0xff),\n (byte) (address >> 0 & 0xff)\n };\n return addressInBytes;\n }",
"public static void unsignedIntToBytes(byte[] buf, int offset, int len, int value) {\n for (int i = len - 1; i >= 0; i--) {\n buf[i + offset] = (byte) (value & 0xFF);\n value >>= 8;\n }\n }",
"private static byte[] shortToBytes(short value) {\n ByteBuffer bb = ByteBuffer.allocate(2);\n bb.putShort(value);\n return bb.array();\n }",
"public static byte[] arrayBigIntegerToByte(BigInteger... a) {\n if(a.length == 0) {\n throw new IllegalArgumentException(\"You must supply at least one BigInteger\");\n }\n\n int[] bigIntLengths = new int[a.length];\n byte[][] bigInts = new byte[a.length][];\n int len = 0; // length of the array of numbers\n for(int i = 0; i < a.length; i++) {\n // first INT_LENGTH_IN_BYTES bytes = number length\n bigInts[i] = a[i].toByteArray();\n bigIntLengths[i] = bigInts[i].length;\n len += INT_LENGTH_IN_BYTES + bigIntLengths[i]; // INT_LENGTH_IN_BYTES to save the length of the number\n }\n\n if(len > Integer.MAX_VALUE) {\n // TODO: ....\n throw new OutOfMemoryError(\"Could not send the array of BigIntegers\");\n }\n byte[] res = new byte[INT_LENGTH_IN_BYTES + (int)len];\n System.arraycopy(intToByte(a.length), 0, res, 0, INT_LENGTH_IN_BYTES);\n for(int i = 0, offset = INT_LENGTH_IN_BYTES; i < a.length; i++) {\n // append BigInteger length\n System.arraycopy(intToByte(bigIntLengths[i]), 0, res, offset, INT_LENGTH_IN_BYTES);\n // append BigInteger\n System.arraycopy(bigInts[i], 0, res, offset + INT_LENGTH_IN_BYTES, bigIntLengths[i]);\n offset += bigIntLengths[i] + INT_LENGTH_IN_BYTES;\n }\n\n return res;\n }",
"private static byte int2(int x) { return (byte)(x >> 16); }",
"public void testToByte(){\t\r\n\t\t\r\n\t\tbyte[] lRes = ByteUtil.intToByteArray(fIntToTest);\r\n\t\t\r\n\t\tfor(int lCnt =0; lCnt< lRes.length; lCnt++){\r\n\t\t\tassertEquals(lRes[lCnt], fIntToTestByteArray[lCnt]);\r\n\t\t}\r\n\t\t\r\n\t}",
"public byte[] getByteArray() {\n long val = getValue();\n return new byte[] {\n (byte)((val>>24) & 0xff),\n (byte)((val>>16) & 0xff),\n (byte)((val>>8) & 0xff),\n (byte)(val & 0xff) };\n }",
"public static byte[] integerToByteArray_ASN1_Value(int toBeConverted) {\n\t\t\n\t\t//create the temporary version of what will be returned\n\t\tbyte[] tempToBeReturned = {\n\t (byte)(toBeConverted >> 24),\n\t (byte)(toBeConverted >> 16),\n\t (byte)(toBeConverted >> 8),\n\t (byte)toBeConverted};\n\t\t\n\t\t\n\t\t//converting positive integers\n\t\tif(toBeConverted >= 0) {\n\t\t\t//0 to 127: return only one octet\n\t\t\tif(toBeConverted<=127) {\n\t\t\t\tbyte[] toBeReturned = new byte[1];\n\t\t\t\ttoBeReturned[0] = tempToBeReturned[3];\t\t\t\t\n\t\t\t\treturn toBeReturned;\n\t\t\t}\n\t\t\t\n\t\t\t//128 to 32768-1 return two octets\n\t\t\telse if(toBeConverted<=32767) {\n\t\t\t\tbyte[] toBeReturned = new byte[2];\n\t\t\t\ttoBeReturned[0] = tempToBeReturned[2];\t\t\t\t\n\t\t\t\ttoBeReturned[1] = tempToBeReturned[3];\n\t\t\t\treturn toBeReturned;\n\t\t\t}\n\t\t\t\n\t\t\t//32767 to 8388607 return three octets\n\t\t\telse if(toBeConverted<=8388607) {\n\t\t\t\tbyte[] toBeReturned = new byte[3];\n\t\t\t\ttoBeReturned[0] = tempToBeReturned[1];\t\t\t\t\n\t\t\t\ttoBeReturned[1] = tempToBeReturned[2];\n\t\t\t\ttoBeReturned[2] = tempToBeReturned[3];\n\t\t\t\treturn toBeReturned;\n\t\t\t}\n\t\t\t\n\t\t\t//above that: return four octets\n\t\t\telse {\n\t\t\t\treturn tempToBeReturned;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//converting negative integers\n\t\telse if(toBeConverted<0) {\n\t\t\t//-1 to -128: return one octet\n\t\t\tif(toBeConverted>=-128) {\n\t\t\t\tbyte[] toBeReturned = new byte[1];\n\t\t\t\ttoBeReturned[0] = tempToBeReturned[3];\t\t\t\t\n\t\t\t\treturn toBeReturned;\n\t\t\t}\n\t\t\t\n\t\t\t//-129 to -32768 return two octets\n\t\t\telse if(toBeConverted>=-32768) {\n\t\t\t\tbyte[] toBeReturned = new byte[2];\n\t\t\t\ttoBeReturned[0] = tempToBeReturned[2];\t\t\t\t\n\t\t\t\ttoBeReturned[1] = tempToBeReturned[3];\n\t\t\t\treturn toBeReturned;\n\t\t\t}\n\t\t\t\n\t\t\t//-32769 to -8388608 return three octets\n\t\t\telse if(toBeConverted>=-8388608) {\n\t\t\t\tbyte[] toBeReturned = new byte[3];\n\t\t\t\ttoBeReturned[0] = tempToBeReturned[1];\t\t\t\t\n\t\t\t\ttoBeReturned[1] = tempToBeReturned[2];\n\t\t\t\ttoBeReturned[2] = tempToBeReturned[3];\n\t\t\t\treturn toBeReturned;\n\t\t\t}\n\t\t\t\n\t\t\t//above that: return four octets\n\t\t\telse {\n\t\t\t\treturn tempToBeReturned;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//if method fails for any reason, it returns null\n\t\treturn null;\n\t}",
"static byte[] encode(BigInteger n) {\n\t\tbyte[] encodedN;\n\t\tif (n.signum() == 0) {\n\t\t\t// If n is zero, return an zero-length byte array\n\t\t\tencodedN = new byte[0];\n\t\t} else {\n\t\t\t// No need to reverse as C# original does at this point, as Java is always Big Endian.\n\t\t\tbyte[] nAsByteArray = n.toByteArray();\n\t\t\tint firstNonZeroIndex = 0;\n\t\t\twhile ((nAsByteArray[firstNonZeroIndex] == 0) && (firstNonZeroIndex < nAsByteArray.length)) {\n\t\t\t\tfirstNonZeroIndex++;\n\t\t\t}\n\t\t\t// Finally copy the non-zero bytes in to a new array\n\t\t\tencodedN = new byte[nAsByteArray.length - firstNonZeroIndex];\n\t\t\tSystem.arraycopy(nAsByteArray, firstNonZeroIndex, encodedN, 0, nAsByteArray.length - firstNonZeroIndex);\n\t\t}\n\n\t\treturn encodedN;\n\t}",
"public static byte [] toBytes(final boolean b) {\n return new byte[] { b ? (byte) -1 : (byte) 0 };\n }",
"String getIntegerEncoding();",
"public byte[] getBytes(boolean littleEndian) {\n try {\n String charSet = \"US-ASCII\";\n\n byte[] sysname_buf = (this.sysname + \"\\0\").getBytes(charSet);\n byte[] nodename_buf = (this.nodename + \"\\0\").getBytes(charSet);\n byte[] release_buf = (this.release + \"\\0\").getBytes(charSet);\n byte[] version_buf = (this.version + \"\\0\").getBytes(charSet);\n byte[] machine_buf = (this.machine + \"\\0\").getBytes(charSet);\n byte[] domainname_buf = (this.domainname + \"\\0\").getBytes(charSet);\n\n byte[] buffer = new byte[SIZE_OF];\n\n ByteBuffer byteBuffer = ByteBuffer.wrap(buffer).order(littleEndian ? ByteOrder.LITTLE_ENDIAN : ByteOrder.BIG_ENDIAN);\n\n byteBuffer.position(0);\n byteBuffer.put(sysname_buf);\n\n byteBuffer.position(_SYSNAME_SIZE);\n byteBuffer.put(nodename_buf);\n\n byteBuffer.position(_SYSNAME_SIZE * 2);\n byteBuffer.put(release_buf);\n\n byteBuffer.position(_SYSNAME_SIZE * 3);\n byteBuffer.put(version_buf);\n\n byteBuffer.position(_SYSNAME_SIZE * 4);\n byteBuffer.put(machine_buf);\n\n byteBuffer.position(_SYSNAME_SIZE * 5);\n byteBuffer.put(domainname_buf);\n\n return buffer;\n } catch (UnsupportedEncodingException e) {\n throw new RuntimeException(e);\n }\n }",
"public int[] utf8ToInt(byte[] bval) {\n return utf8ToInt(bval, bval.length);\n }",
"private int[] intToBinaryReverse(int rule) {\n\n int[] binary = new int[8];\n\n // int[] from int\n for (int i = 0, num = rule; i <= 7; i++, num >>>= 1) {\n binary[i] = num & 1;\n }\n\n return binary;\n }",
"public static byte[] encode(ArrayList<Integer> nums)\n {\n //ArrayList<Byte> byteStream = new ArrayList<Byte>();\n int totalSize = 0;\n for(int i=0;i<nums.size();i++)\n {\n int n = nums.get(i);\n int sizeReq = 1;\n if(n < Math.pow(2, 7))\n sizeReq = 1;\n else if(n < Math.pow(2, 14))\n sizeReq = 2;\n else if(n < Math.pow(2, 21))\n sizeReq = 3;\n else if(n < Math.pow(2, 28))\n sizeReq = 4;\n totalSize += sizeReq;\n }\n byte totalArray[] = new byte[totalSize];\n int c = 0;\n for(int i=0;i<nums.size();i++)\n {\n byte array[] = encode(nums.get(i));\n //byteStream.addAll(array);\n for(int j=0;j<array.length;j++)\n totalArray[c++] = array[j];\n }\n return totalArray;\n }",
"public static byte[] longToBytes(float x) {\n int bits = Float.floatToIntBits(x);\n byte[] buffer = new byte[4];\n buffer[0] = (byte)(bits & 0xff);\n buffer[1] = (byte)((bits >> 8) & 0xff);\n buffer[2] = (byte)((bits >> 16) & 0xff);\n buffer[3] = (byte)((bits >> 24) & 0xff);\n\n return buffer;\n }",
"public static byte[] convertDoubleToByteArray(double toConvert) {\n return ByteBuffer.allocate(8).order(ByteOrder.LITTLE_ENDIAN).putDouble(toConvert).array();\n }",
"public static byte[] NumStringToBytes(String in) {\n BigInteger num = new BigInteger(in);\n byte[] bytes = num.toByteArray();\n if (bytes.length > 0) {\n if (bytes[0] == 0) {\n byte[] cuttedByte = new byte[bytes.length - 1];\n System.arraycopy(bytes, 1, cuttedByte, 0, bytes.length - 1);\n return cuttedByte;\n }\n\n }\n return num.toByteArray();\n }",
"public static byte[] I2OSP(int value, int length) {\n\t\tbyte[] res = new byte[length];\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tres[length - i - 1] = (byte) ((value >> (i << 3)) & 0xFF);\n\t\t}\n\t\treturn res;\n\t}"
] |
[
"0.74134433",
"0.70827323",
"0.7058657",
"0.7022418",
"0.697243",
"0.6957495",
"0.69516873",
"0.6949263",
"0.6941992",
"0.69374686",
"0.69321156",
"0.6908633",
"0.6882311",
"0.67781645",
"0.67640543",
"0.67404515",
"0.67347103",
"0.67293906",
"0.6541449",
"0.65296197",
"0.64762074",
"0.64698756",
"0.6429031",
"0.6409083",
"0.63880193",
"0.6385992",
"0.6370439",
"0.6325864",
"0.6278716",
"0.6272681",
"0.62599576",
"0.6241107",
"0.62116027",
"0.6152002",
"0.6117655",
"0.60849166",
"0.60765916",
"0.6071843",
"0.60490227",
"0.5939606",
"0.59284306",
"0.5886815",
"0.58816963",
"0.5862245",
"0.5792365",
"0.57818294",
"0.5779249",
"0.5772733",
"0.5758322",
"0.5738945",
"0.5702979",
"0.5679677",
"0.5659537",
"0.5644106",
"0.5603608",
"0.55924743",
"0.5547039",
"0.55409193",
"0.55357534",
"0.54990584",
"0.5493208",
"0.5486894",
"0.5476202",
"0.54649276",
"0.54646444",
"0.54507655",
"0.5372957",
"0.5335084",
"0.53297675",
"0.5318869",
"0.5299911",
"0.5298721",
"0.5297422",
"0.52812696",
"0.52665806",
"0.5260874",
"0.52349865",
"0.52340764",
"0.52238864",
"0.52231884",
"0.5213032",
"0.5209449",
"0.5205639",
"0.5201997",
"0.51818466",
"0.51646453",
"0.51530004",
"0.514632",
"0.5137055",
"0.51078254",
"0.51049805",
"0.51030993",
"0.50850815",
"0.50711983",
"0.5069134",
"0.5061741",
"0.50584203",
"0.5055346",
"0.5045994",
"0.502231"
] |
0.6831636
|
13
|
Turns a float into an array of bytes in LITTLE_ENDIAN format.
|
public static byte[] convertFloatToByteArray(float toConvert) {
return ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putFloat(toConvert).array();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static byte[] longToBytes(float x) {\n int bits = Float.floatToIntBits(x);\n byte[] buffer = new byte[4];\n buffer[0] = (byte)(bits & 0xff);\n buffer[1] = (byte)((bits >> 8) & 0xff);\n buffer[2] = (byte)((bits >> 16) & 0xff);\n buffer[3] = (byte)((bits >> 24) & 0xff);\n\n return buffer;\n }",
"public static byte[] writeFloatToBytes(float value) {\n FLOAT_BUFFER.clear();\n FLOAT_BUFFER.putFloat(value);\n return FLOAT_BUFFER.array();\n }",
"public void getBytes(float[] f, byte[] b) {\n getBytes(f,b,0);\n }",
"public static double bitsToBytes(double num) { return (num/8); }",
"public static byte[] getBytes(long value) {\r\n\t\treturn ByteBuffer.allocate(8).order(ByteOrder.LITTLE_ENDIAN).putLong(value).array();\r\n\t}",
"public static byte[] toBytes(long val) {\n byte [] b = new byte[8];\n for (int i = 7; i > 0; i--) {\n b[i] = (byte) val;\n val >>>= 8;\n }\n b[0] = (byte) val;\n return b;\n }",
"public byte[] l2b(long value) {\n byte[] data = new byte[8];\n data[0] = (byte) ((value >> 56) & 0xFF);\n data[1] = (byte) ((value >> 48) & 0xFF);\n data[2] = (byte) ((value >> 40) & 0xFF);\n data[3] = (byte) ((value >> 32) & 0xFF);\n data[4] = (byte) ((value >> 24) & 0xFF);\n data[5] = (byte) ((value >> 16) & 0xFF);\n data[6] = (byte) ((value >> 8) & 0xFF);\n data[7] = (byte) (value & 0xFF);\n return data;\n }",
"public static byte[] toBytes(final long number) {\n\t\treturn new byte[] {\n\t\t\t(byte) (number >>> 56),\n\t\t\t(byte) (number >>> 48),\n\t\t\t(byte) (number >>> 40),\n\t\t\t(byte) (number >>> 32),\n\t\t\t(byte) (number >>> 24),\n\t\t\t(byte) (number >>> 16),\n\t\t\t(byte) (number >>> 8),\n\t\t\t(byte) (number)\n\t\t};\n\t}",
"public void getBytes(float[][] f, byte[] b) {\n int n1 = f[0].length;\n int n2 = f.length;\n for (int i2=0; i2<n2; ++i2)\n getBytes(f[i2],b,i2*n1);\n }",
"public void getBytes(float[][] f, byte[][] b) {\n int n = f.length;\n for (int i=0; i<n; ++i)\n getBytes(f[i],b[i]);\n }",
"public void getBytes(float[][][] f, byte[] b) {\n int n1 = f[0][0].length;\n int n2 = f[0].length;\n int n3 = f.length;\n for (int i3=0; i3<n3; ++i3)\n for (int i2=0; i2<n2; ++i2)\n getBytes(f[i3][i2],b,i2*n1+i3*n1*n2);\n }",
"public static byte[] convertDoubleToByteArray(double toConvert) {\n return ByteBuffer.allocate(8).order(ByteOrder.LITTLE_ENDIAN).putDouble(toConvert).array();\n }",
"public void getBytes(float[][][] f, byte[][][] b) {\n int n = f.length;\n for (int i=0; i<n; ++i)\n getBytes(f[i],b[i]);\n }",
"private static final byte[] longToByteArray(long l) {\n\t\tbyte[] retVal = new byte[8];\n\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tretVal[i] = (byte) l;\n\t\t\tl >>= 8;\n\t\t}\n\n\t\treturn retVal;\n\t}",
"public static byte[] longToBytes(long l) {\n\n ByteBuffer byteBuffer = ByteBuffer.allocate(NUM_BYTES_IN_LONG);\n byteBuffer.putLong(l);\n return byteBuffer.array();\n\n }",
"public static byte[] getLongAsBytes(long l) {\n\t\treturn new byte[] {\n\t\t\t\t(byte) (l >> 56),\n\t\t\t\t(byte) (l >> 48),\n\t\t\t\t(byte) (l >> 40),\n\t\t\t\t(byte) (l >> 32),\n\t\t\t\t(byte) (l >> 24),\n\t\t\t\t(byte) (l >> 16),\n\t\t\t\t(byte) (l >> 8),\n\t\t\t\t(byte) l\n\t\t\t};\n\t}",
"public void getBytes(Float3 f3, byte[][][] b) {\n int n1 = f3.getN1();\n int n2 = f3.getN2();\n int n3 = f3.getN3();\n float[][] fi3 = new float[n2][n1];\n for (int i3=0; i3<n3; ++i3) {\n f3.get12(n1,n2,0,0,i3,fi3);\n getBytes(fi3,b[i3]);\n }\n }",
"static byte[] toBEBytes(int i) {\n\t\treturn ByteBuffer.allocate(4).order(ByteOrder.BIG_ENDIAN).putInt(i).array();\n\t}",
"public byte[] readRawFloat() throws IOException {\n byte[] bytes = new byte[5];\n bytes[0] = (byte) Type.FLOAT.code;\n in.readFully(bytes, 1, 4);\n return bytes;\n }",
"public static byte[] toBigEndianByteArray(Number number) throws ScriptException\n {\n long n = number.longValue();\n for (int i = 1; i <= 8; i++)\n {\n long maxNum = 1L << (i * 8 - 1);\n if (n <= maxNum && n >= -maxNum)\n {\n byte[] res = new byte[i];\n boolean changeSign = false;\n if (n < 0)\n {\n changeSign = true;\n n = -n;\n }\n for (int j = 0; j < i; j++)\n {\n res[j] = (byte) ((n >> j * 8) & 0xFF);\n }\n // Bitcoin scripts use 1-complement for negative numbers\n if (changeSign)\n {\n res[i - 1] |= 0x80;\n }\n return res;\n }\n }\n throw new ScriptException(\"Number to large to convert to binary: \" + number);\n }",
"private static String FloatToBinaryString(float data){\n int intData = Float.floatToIntBits(data);\n return String.format(\"%32s\", Integer.toBinaryString(intData)).replace(' ', '0');\n }",
"public static byte[] toBytes(final long... numbers) {\n\t\tbyte[] bytes = new byte[numbers.length * 8];\n\t\tfor (int i = 0, j = 0; i < numbers.length; i++, j += 8) {\n\t\t\tSystem.arraycopy(toBytes(numbers[i]), 0, bytes, j, 8);\n\t\t}\n\t\treturn bytes;\n\t}",
"public static byte[] toLEBytes(int i) {\n\t\treturn ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(i).array();\n\t}",
"public void getBytes(Float3 f3, byte[] b) {\n int n1 = f3.getN1();\n int n2 = f3.getN2();\n int n3 = f3.getN3();\n float[][] fi3 = new float[n2][n1];\n for (int i3=0; i3<n3; ++i3) {\n f3.get12(n1,n2,0,0,i3,fi3);\n for (int i2=0; i2<n2; ++i2)\n getBytes(fi3[i2],b,i2*n1+i3*n1*n2);\n }\n }",
"public byte[] toByteArray() {\n/* 510 */ ByteBuffer buff = ByteBuffer.allocate(40).order(ByteOrder.LITTLE_ENDIAN);\n/* 511 */ writeTo(buff);\n/* 512 */ return buff.array();\n/* */ }",
"public abstract byte[] toBytes() throws Exception;",
"List<Byte> getAsBytes();",
"public static float[] pcmToFloat(byte[] bytes)\n\t{\n\t\treturn toFloat(toShort(bytes));\n\t}",
"public static byte[] getBytes(short value) {\r\n\t\treturn ByteBuffer.allocate(2).order(ByteOrder.LITTLE_ENDIAN).putShort(value).array();\r\n\t}",
"public static float readFloatFromBytes(byte[] data) {\n return ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN).getFloat();\n }",
"public static byte[] longToBytes(long x) {\n\t ByteBuffer buffer = ByteBuffer.allocate(Long.BYTES);\n\t buffer.putLong(x);\n\t return buffer.array();\n\t}",
"void writeFloats(float[] f, int off, int len) throws IOException;",
"String getFloatingPointEncoding();",
"public static byte[] toArray(List<Byte> list) {\n byte[] bytes = new byte[list.size()];\n for (int i = 0; i < list.size(); i++)\n bytes[i] = list.get(i);\n return bytes;\n }",
"public native static long getConvertBytes();",
"static byte[] toArray(int value) {\n return new byte[] {\n (byte) (value >> 24),\n (byte) (value >> 16),\n (byte) (value >> 8),\n (byte) value };\n }",
"static byte[] long2byteArray(long number, int length, boolean swapHalfWord) {\n }",
"public static byte[] getShortAsBytes(short s) {\n\t\treturn new byte[] {\n\t\t\t\t(byte) (s >>> 8),\n\t\t\t\t(byte) s\n\t\t};\n\t}",
"public static int[] getBytesFromQuadByte(final long longValue) {\n int[] intArray = new int[4];\n\n intArray[0] = (int) ((longValue >>> 3 * BYTE_LENGTH) & BYTE_MASK);\n intArray[1] = (int) ((longValue >>> 2 * BYTE_LENGTH) & BYTE_MASK);\n intArray[2] = (int) ((longValue >>> BYTE_LENGTH) & BYTE_MASK);\n intArray[3] = (int) (longValue & BYTE_MASK);\n\n return intArray;\n }",
"private byte[] shortToByteArray(short i) {\n ByteBuffer bbf = ByteBuffer.allocate(2)\n .order(ByteOrder.LITTLE_ENDIAN)\n .putShort(i);\n return bbf.array();\n }",
"public static byte[] convertLong(long v, boolean isLE)\r\n {\r\n byte[] bytes = new byte[8];\r\n if (isLE)\r\n {\r\n bytes[0] = (byte) (v >>> 0);\r\n bytes[1] = (byte) (v >>> 8);\r\n bytes[2] = (byte) (v >>> 16);\r\n bytes[3] = (byte) (v >>> 24);\r\n bytes[4] = (byte) (v >>> 32);\r\n bytes[5] = (byte) (v >>> 40);\r\n bytes[6] = (byte) (v >>> 48);\r\n bytes[7] = (byte) (v >>> 56);\r\n }\r\n else\r\n {\r\n bytes[0] = (byte) (v >>> 56);\r\n bytes[1] = (byte) (v >>> 48);\r\n bytes[2] = (byte) (v >>> 40);\r\n bytes[3] = (byte) (v >>> 32);\r\n bytes[4] = (byte) (v >>> 24);\r\n bytes[5] = (byte) (v >>> 16);\r\n bytes[6] = (byte) (v >>> 8);\r\n bytes[7] = (byte) (v >>> 0);\r\n }\r\n return bytes;\r\n }",
"private byte[] intToByteArray(int i) {\n ByteBuffer bbf = ByteBuffer.allocate(4)\n .order(ByteOrder.LITTLE_ENDIAN)\n .putInt(i);\n return bbf.array();\n }",
"public byte[] getByteArray() {\n long val = getValue();\n return new byte[] {\n (byte)((val>>24) & 0xff),\n (byte)((val>>16) & 0xff),\n (byte)((val>>8) & 0xff),\n (byte)(val & 0xff) };\n }",
"public static byte[] convertInt8(int v)\r\n {\r\n byte[] bytes = new byte[1];\r\n bytes[0] = (byte) v;\r\n return bytes;\r\n }",
"public static byte[] getBytes(int value) {\r\n\t\treturn ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(value).array();\r\n\t}",
"public abstract float[] toFloatArray();",
"public byte[] toBytes () {\n return toTuple().toBytes();\n }",
"public static byte[] intToBytesArray(int num) {\r\n\t\tbyte[] byteArr = new byte[4];\r\n\t\t// big endian, low to high\r\n\t\tfor (int i = 0; i < byteArr.length; i++) {\r\n\t\t\tbyteArr[byteArr.length - 1 - i] = (byte) (num & 0xff);\r\n\t\t\tnum >>= 8;\r\n\t\t}\r\n\t\treturn byteArr;\r\n\t}",
"private byte[] toByte(long address) {\n byte[] addressInBytes = new byte[]{\n (byte) (address >> 40 & 0xff),\n (byte) (address >> 32 & 0xff),\n (byte) (address >> 24 & 0xff),\n (byte) (address >> 16 & 0xff),\n (byte) (address >> 8 & 0xff),\n (byte) (address >> 0 & 0xff)\n };\n return addressInBytes;\n }",
"public static byte[] getBytes(char value) {\r\n\t\treturn ByteBuffer.allocate(2).order(ByteOrder.LITTLE_ENDIAN).putChar(value).array();\r\n\t}",
"public static byte[] convertIntegersToBytes(int[] nums) {\n if (nums != null) {\n byte[] outputBytes = new byte[nums.length * 4];\n for(int i = 0, k = 0; i < nums.length; i++) {\n int integerTemp = nums[i];\n for(int j = 0; j < 4; j++, k++) {\n outputBytes[k] = (byte)((integerTemp >> (8 * j)) & 0xFF);\n }\n }\n return outputBytes;\n } else {\n return null;\n }\n }",
"public static byte[] getEncodeIntervalNumberByteArray(long intervalNumber) {\n return intToByteLittleEndian((int)getUint32(intervalNumber));\n }",
"public static byte[] b(int... array) {\n if (array == null) {\n return null;\n }\n byte[] ret = new byte[array.length];\n for (int i = 0; i < ret.length; i++) {\n ret[i] = (byte) array[i];\n }\n return ret;\n }",
"private static byte[] shortToBytes(short value) {\n ByteBuffer bb = ByteBuffer.allocate(2);\n bb.putShort(value);\n return bb.array();\n }",
"public static byte[] LongToOpaque(long number) { \n long temp = number; \n byte[] b = new byte[16]; //0-7 time stamp, 8-15 customized \n for (int i = 0; i < 8; i++) { \n b[i] = new Long(temp & 0xff).byteValue();\n temp = temp >> 8; // right shift 8\n } \n return b; \n }",
"public abstract byte[] toByteArray();",
"public abstract byte[] toByteArray();",
"public static byte[] toBytes(int val) {\n byte [] b = new byte[4];\n for(int i = 3; i > 0; i--) {\n b[i] = (byte) val;\n val >>>= 8;\n }\n b[0] = (byte) val;\n return b;\n }",
"ByteOrder byteOrder();",
"void writeBytes(byte[] value);",
"public byte[] getBytes(boolean littleEndian) {\n try {\n String charSet = \"US-ASCII\";\n\n byte[] sysname_buf = (this.sysname + \"\\0\").getBytes(charSet);\n byte[] nodename_buf = (this.nodename + \"\\0\").getBytes(charSet);\n byte[] release_buf = (this.release + \"\\0\").getBytes(charSet);\n byte[] version_buf = (this.version + \"\\0\").getBytes(charSet);\n byte[] machine_buf = (this.machine + \"\\0\").getBytes(charSet);\n byte[] domainname_buf = (this.domainname + \"\\0\").getBytes(charSet);\n\n byte[] buffer = new byte[SIZE_OF];\n\n ByteBuffer byteBuffer = ByteBuffer.wrap(buffer).order(littleEndian ? ByteOrder.LITTLE_ENDIAN : ByteOrder.BIG_ENDIAN);\n\n byteBuffer.position(0);\n byteBuffer.put(sysname_buf);\n\n byteBuffer.position(_SYSNAME_SIZE);\n byteBuffer.put(nodename_buf);\n\n byteBuffer.position(_SYSNAME_SIZE * 2);\n byteBuffer.put(release_buf);\n\n byteBuffer.position(_SYSNAME_SIZE * 3);\n byteBuffer.put(version_buf);\n\n byteBuffer.position(_SYSNAME_SIZE * 4);\n byteBuffer.put(machine_buf);\n\n byteBuffer.position(_SYSNAME_SIZE * 5);\n byteBuffer.put(domainname_buf);\n\n return buffer;\n } catch (UnsupportedEncodingException e) {\n throw new RuntimeException(e);\n }\n }",
"public static byte[] shortToBytes(short s) {\n\n ByteBuffer byteBuffer = ByteBuffer.allocate(NUM_BYTES_IN_SHORT);\n byteBuffer.putShort(s);\n return byteBuffer.array();\n\n }",
"public static byte[] floatToPcm(float[] floats)\n\t{\n\t\treturn fromShort(fromFloat(floats));\n\t}",
"byte[] getBytes();",
"byte[] getBytes();",
"public static byte [] toBytes(final boolean b) {\n return new byte[] { b ? (byte) -1 : (byte) 0 };\n }",
"List<byte[]> asByteArrayList();",
"public static double zettaBytesToBits(double num) { return gigaBitsToBits(zettaBytesToGigaBits(num)); }",
"public static void shortToByteArray(short value, byte[] buffer, int offset) {\n buffer[offset] = (byte) (value >> 8 & 0xFF);\n buffer[offset + 1] = (byte) (value & 0xFF);\n }",
"public static byte [] toBytes(final double d) {\n // Encode it as a long\n return Bytes.toBytes(Double.doubleToRawLongBits(d));\n }",
"public byte[] i2b(int value) {\n byte[] data = new byte[4];\n data[0] = (byte) ((value >> 24) & 0xFF);\n data[1] = (byte) ((value >> 16) & 0xFF);\n data[2] = (byte) ((value >> 8) & 0xFF);\n data[3] = (byte) (value & 0xFF);\n return data;\n }",
"private byte[] short2byte(short[] sData) {\n int shortArrsize = sData.length;\n byte[] bytes = new byte[shortArrsize * 2];\n for (int i = 0; i < shortArrsize; i++) {\n bytes[i * 2] = (byte) (sData[i] & 0x00FF);\n bytes[(i * 2) + 1] = (byte) (sData[i] >> 8);\n sData[i] = 0;\n }\n return bytes;\n\n }",
"public static byte[] intToByte(int i) {\n return new byte[] {(byte)(i>>24), (byte)(i>>16), (byte)(i>>8), (byte)i};\n }",
"public static void longToByteArray(long value, byte[] buffer, int offset) {\n buffer[offset] = (byte) (value >> 56 & 0xFF);\n buffer[offset + 1] = (byte) (value >> 48 & 0xFF);\n buffer[offset + 2] = (byte) (value >> 40 & 0xFF);\n buffer[offset + 3] = (byte) (value >> 32 & 0xFF);\n buffer[offset + 4] = (byte) (value >> 24 & 0xFF);\n buffer[offset + 5] = (byte) (value >> 16 & 0xFF);\n buffer[offset + 6] = (byte) (value >> 8 & 0xFF);\n buffer[offset + 7] = (byte) (value & 0xFF);\n }",
"private static byte[] toByteArray(int[] array) {\n final byte[] res = new byte[array.length];\n for (int i = 0; i < array.length; ++i) {\n final int value = array[i];\n res[i] = (byte) value;\n }\n return res;\n }",
"public int convertToByteArray(int readOffset, int lenInSamples,\n\t\t\tbyte[] buffer, int writeOffset, AudioFormat format) {\n\t\tint byteCount = format.getFrameSize() * lenInSamples;\n\t\tif (writeOffset + byteCount > buffer.length) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"FloatSampleBuffer.convertToByteArray: buffer too small.\");\n\t\t}\n\t\tif (format != lastConvertToByteArrayFormat) {\n\t\t\tif (format.getSampleRate() != getSampleRate()) {\n\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\"FloatSampleBuffer.convertToByteArray: different samplerates.\");\n\t\t\t}\n\t\t\tif (format.getChannels() != getChannelCount()) {\n\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\"FloatSampleBuffer.convertToByteArray: different channel count.\");\n\t\t\t}\n\t\t\tlastConvertToByteArrayFormat = format;\n\t\t\tlastConvertToByteArrayFormatCode = FloatSampleTools.getFormatType(format);\n\t\t}\n\t\tFloatSampleTools.float2byte(channels, readOffset, buffer, writeOffset,\n\t\t\t\tlenInSamples, lastConvertToByteArrayFormatCode,\n\t\t\t\tformat.getChannels(), format.getFrameSize(),\n\t\t\t\tgetConvertDitherBits(lastConvertToByteArrayFormatCode));\n\n\t\treturn byteCount;\n\t}",
"@Test\n public void encodeAsDoubleArray()\n {\n double value = 5;\n final BinaryEncoder encoder = new BinaryEncoder(16);\n double[] result = encoder.encodeAsDoubleArray(value);\n\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + Arrays.toString(result));\n }\n\n assertNotNull(result);\n assertEquals(4, result.length);\n assertThat(result[0], is(0.0));\n assertThat(result[1], is(1.0));\n assertThat(result[2], is(0.0));\n assertThat(result[3], is(1.0));\n\n value = 20; // > 16 outside range\n result = encoder.encodeAsDoubleArray(value);\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + result);\n }\n assertNotNull(result);\n\n // 0100 Best fit into 4 digits; ignores higher bits\n assertEquals(4, result.length);\n assertThat(result[0], is(0.0));\n assertThat(result[1], is(1.0));\n assertThat(result[2], is(0.0));\n assertThat(result[3], is(0.0));\n }",
"public static byte[] getBytes( int flags )\n {\n return new byte[]{\n (byte)( flags >>> 24), \n (byte)( ( flags >> 16 ) & 0x00ff ), \n (byte)( ( flags >> 8 ) & 0x00ff ), \n (byte)( flags & 0x00ff ) };\n }",
"byte[] IntToByte(int i)\r\n {\r\n return Integer.toString(i).getBytes();\r\n }",
"public static double teraBytesToBits(double num) { return (num*8*Math.exp(12)); }",
"private static byte[] getBytes(int val) {\n log.log(Level.FINEST, String.format(\"%d\", val));\n byte[] ret = new byte[NekoIOConstants.INT_LENGTH];\n for (int i = 0; i < NekoIOConstants.INT_LENGTH; i++) {\n if (NekoIOConstants.BIG_ENDIAN) {\n ret[NekoIOConstants.INT_LENGTH - 1 - i] = (byte) val;\n } else {\n ret[i] = (byte) val;\n }\n val >>= 8;\n }\n return ret;\n }",
"public static double exaBytesToBits(double num) { return gigaBitsToBits(exaBytesToGigaBits(num)); }",
"public static byte[] encode(ArrayList<Integer> nums)\n {\n //ArrayList<Byte> byteStream = new ArrayList<Byte>();\n int totalSize = 0;\n for(int i=0;i<nums.size();i++)\n {\n int n = nums.get(i);\n int sizeReq = 1;\n if(n < Math.pow(2, 7))\n sizeReq = 1;\n else if(n < Math.pow(2, 14))\n sizeReq = 2;\n else if(n < Math.pow(2, 21))\n sizeReq = 3;\n else if(n < Math.pow(2, 28))\n sizeReq = 4;\n totalSize += sizeReq;\n }\n byte totalArray[] = new byte[totalSize];\n int c = 0;\n for(int i=0;i<nums.size();i++)\n {\n byte array[] = encode(nums.get(i));\n //byteStream.addAll(array);\n for(int j=0;j<array.length;j++)\n totalArray[c++] = array[j];\n }\n return totalArray;\n }",
"public static float byteArrayToFloat(byte[] bytes, int size, int fpBits) {\n return byteArrayToLong(bytes, size) / (float) (1 << fpBits);\n }",
"private byte[] intToBytes(int i) {\n\t\tb.clear();\n\t\treturn b.order(ByteOrder.LITTLE_ENDIAN).putInt(i).array();\n\t}",
"public byte[] convertIntToByte(int[] intArr) throws IOException {\r\n byte[] byteArr = new byte[intArr.length];\r\n for(int i = 0; i < intArr.length; i++) {\r\n Integer tempInt = intArr[i];\r\n byte tempByte = tempInt.byteValue();\r\n byteArr[i] = tempByte;\r\n }\r\n return byteArr;\r\n }",
"public static float toFloat(byte [] bytes) {\n return toFloat(bytes, 0);\n }",
"public static byte[] convertArrayListToArray(ArrayList<Byte> bytes) {\n // Define an array of size of bytes in array list\n byte[] resultBytes = new byte[bytes.size()];\n\n // Loop through the array list and add each byte to our primitive array\n for (int i = 0; i < bytes.size(); i++) {\n resultBytes[i] = bytes.get(i);\n }\n\n // Return the primitive array\n return resultBytes;\n }",
"public static int[] writeFloat(float f, int[] o){\r\n\t\tint[] a = writeFloat(f);\r\n\t\tint[] n = Arrays.copyOf(o, o.length + a.length);\r\n\t\tfor(int i=0;i<a.length;i++){\r\n\t\t\tn[o.length+i] = a[i];\r\n\t\t}\r\n\t\treturn n;\r\n\t}",
"public byte[] toByteArray()\n {\n // stuff the array\n byte[] array = new byte[4];\n array[0] = majorVersion;\n array[1] = minorVersion;\n array[2] = featureCode;\n array[3] = 0; // reserved\n\n // done\n return array;\n }",
"public static byte[] convertInt32(int v, boolean isLE)\r\n {\r\n byte[] bytes = new byte[4];\r\n if (isLE)\r\n {\r\n bytes[3] = (byte) ((v >>> 24) & 0xFF);\r\n bytes[2] = (byte) ((v >>> 16) & 0xFF);\r\n bytes[1] = (byte) ((v >>> 8) & 0xFF);\r\n bytes[0] = (byte) ((v >>> 0) & 0xFF);\r\n }\r\n else\r\n {\r\n bytes[0] = (byte) ((v >>> 24) & 0xFF);\r\n bytes[1] = (byte) ((v >>> 16) & 0xFF);\r\n bytes[2] = (byte) ((v >>> 8) & 0xFF);\r\n bytes[3] = (byte) ((v >>> 0) & 0xFF);\r\n }\r\n return bytes;\r\n }",
"public byte[] toCompressedBytes() {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tDataOutputStream dos = new DataOutputStream(baos);\n \ttry {\n \t\t// write the type string first\n \t\tdos.writeUTF(Types.GPS);\n \t\tdos.writeLong(this.getTimestamp());\n \t\t// JWS - using flongs to compress\n \t\tdos.writeLong(FixedPointLong.stringToFlong(loc.getLatitudeAsString()));\n \t\tdos.writeLong(FixedPointLong.stringToFlong(loc.getLongitudeAsString()));\n \t\tfor(int i=0;i<gpsTypes.length;i++) {\n \t\t\tString s = (String) entries.get(gpsTypes[i]);\n \t\t\tdos.writeUTF(s);\n \t\t}\n \t\n \tdos.close();\n \t} catch(IOException ioe) {\n \t\t//ioe.printStackTrace();\n \t\treturn null; \n \t} catch(FixedPointLongException fple) {\n \t return null;\n \t}\n \treturn baos.toByteArray();\n }",
"public static byte[] convertIntToByteArray(int toConvert, Boolean... bigEndian) {\n // Get the byte array of the int and return it, little endian style\n if (bigEndian.length > 0 && bigEndian[0]) {\n return ByteBuffer.allocate(4).order(ByteOrder.BIG_ENDIAN).putInt(toConvert).array();\n }\n else {\n return ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(toConvert).array();\n }\n }",
"public static byte[] hex2byte(byte[] b) {\n if ((b.length % 2) != 0)\n throw new IllegalArgumentException(\"hello\");\n byte[] b2 = new byte[b.length / 2];\n for (int n = 0; n < b.length; n += 2) {\n String item = new String(b, n, 2);\n b2[n / 2] = (byte) Integer.parseInt(item, 16);\n }\n return b2;\n }",
"public abstract short[] toShortArray();",
"public static double petaBytesToBits(double num) { return gigaBitsToBits(petaBytesToGigaBits(num)); }",
"public static byte[] intToFourBytes(int val) {\n if (val < 0) throw new IllegalArgumentException(\"Value may not be signed.\");\n byte[] bytes = new byte[4];\n\n for (int i = 3; i >= 0; --i) {\n // unpack a byte\n byte b = (byte)(val & 0xff);\n // shift by 8 bits\n val >>= 8;\n // store the unpacked byte, moving from LSB to MSB (so the MSB ends up in bytes[0])\n bytes[i] = b;\n }\n\n return bytes;\n }",
"public static byte[] intToBinary(int value)\n {\n String tmp = Integer.toBinaryString(value);\n int len = tmp.length();\n int change = 8 - (len % 8);\n\n if(change != 0) len += change;\n\n byte[] res = new byte[len];\n for(int i = 0; i < len; i++) {\n if(i < change){\n // Tag on leading zeroes if needed\n res[i] = 0x00;\n }else{\n char c = tmp.charAt(i - change);\n res[i] = (byte) (c == '0' ? 0x00 : 0x01);\n }\n }\n\n return res;\n }",
"private String m34494b(byte[] bArr) {\n return String.format(\"%032x\", new Object[]{new BigInteger(1, bArr)});\n }",
"byte[] convertTo8Bit(byte[] data, int from, int to)\n {\n // How big?\n int main = ((to - from) / 8) * 8;\n int remainder = (to - from) - main;\n int size = ((to - from) / 8) * 7 + (remainder - 1);\n \n byte[] newd = new byte[size];\n \n int j = 0;\n for(int i = from; i < to; i += 8)\n { \n for(int x = 0; x < 7; x++)\n {\n if (j + x < newd.length)\n newd[j + x] = (byte)(data[i + x + 1] | (byte)(((data[i] >>> x) & 0x1) << 7));\n }\n j += 7;\n }\n return newd;\n }"
] |
[
"0.68649083",
"0.6786925",
"0.63418853",
"0.6304618",
"0.6295404",
"0.6280094",
"0.6264541",
"0.6133633",
"0.6102669",
"0.6100418",
"0.60545194",
"0.60473084",
"0.59713537",
"0.59019023",
"0.5803622",
"0.5784952",
"0.5755267",
"0.5747431",
"0.57113206",
"0.56643736",
"0.56551677",
"0.5627968",
"0.56137425",
"0.5602518",
"0.5597704",
"0.55957246",
"0.5526049",
"0.5516982",
"0.55156875",
"0.5513269",
"0.54965335",
"0.54883516",
"0.5467928",
"0.5466808",
"0.54638046",
"0.5462866",
"0.54600686",
"0.5454362",
"0.5442124",
"0.54390717",
"0.5418712",
"0.54130185",
"0.5406948",
"0.53943413",
"0.53751403",
"0.5360074",
"0.5356044",
"0.53461695",
"0.5333627",
"0.532596",
"0.5324784",
"0.53231883",
"0.53080803",
"0.53043723",
"0.5295899",
"0.5270267",
"0.5270267",
"0.5246156",
"0.52436215",
"0.52188545",
"0.52166516",
"0.521249",
"0.51996046",
"0.51661295",
"0.51661295",
"0.51413447",
"0.5136063",
"0.5128657",
"0.5116795",
"0.5106229",
"0.51043856",
"0.510275",
"0.5101231",
"0.5081973",
"0.50723124",
"0.5064101",
"0.5044019",
"0.5038693",
"0.5028791",
"0.50284535",
"0.5007051",
"0.50034994",
"0.49927512",
"0.49816298",
"0.4972504",
"0.49566734",
"0.49507952",
"0.49503183",
"0.49470854",
"0.493312",
"0.4921358",
"0.49158514",
"0.4891232",
"0.48894417",
"0.48847082",
"0.48772684",
"0.48713383",
"0.4871234",
"0.4867688",
"0.486449"
] |
0.73658127
|
0
|
Turns a double into an array of bytes in LITTLE_ENDIAN format.
|
public static byte[] convertDoubleToByteArray(double toConvert) {
return ByteBuffer.allocate(8).order(ByteOrder.LITTLE_ENDIAN).putDouble(toConvert).array();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static byte [] toBytes(final double d) {\n // Encode it as a long\n return Bytes.toBytes(Double.doubleToRawLongBits(d));\n }",
"public static double bitsToBytes(double num) { return (num/8); }",
"public static byte[] getBytes(long value) {\r\n\t\treturn ByteBuffer.allocate(8).order(ByteOrder.LITTLE_ENDIAN).putLong(value).array();\r\n\t}",
"public static byte[] toBytes(final long number) {\n\t\treturn new byte[] {\n\t\t\t(byte) (number >>> 56),\n\t\t\t(byte) (number >>> 48),\n\t\t\t(byte) (number >>> 40),\n\t\t\t(byte) (number >>> 32),\n\t\t\t(byte) (number >>> 24),\n\t\t\t(byte) (number >>> 16),\n\t\t\t(byte) (number >>> 8),\n\t\t\t(byte) (number)\n\t\t};\n\t}",
"public byte[] l2b(long value) {\n byte[] data = new byte[8];\n data[0] = (byte) ((value >> 56) & 0xFF);\n data[1] = (byte) ((value >> 48) & 0xFF);\n data[2] = (byte) ((value >> 40) & 0xFF);\n data[3] = (byte) ((value >> 32) & 0xFF);\n data[4] = (byte) ((value >> 24) & 0xFF);\n data[5] = (byte) ((value >> 16) & 0xFF);\n data[6] = (byte) ((value >> 8) & 0xFF);\n data[7] = (byte) (value & 0xFF);\n return data;\n }",
"static byte[] long2byteArray(long number, int length, boolean swapHalfWord) {\n }",
"public byte[] readRawDouble() throws IOException {\n byte[] bytes = new byte[9];\n bytes[0] = (byte) Type.DOUBLE.code;\n in.readFully(bytes, 1, 8);\n return bytes;\n }",
"@Test\n public void encodeAsDoubleArray()\n {\n double value = 5;\n final BinaryEncoder encoder = new BinaryEncoder(16);\n double[] result = encoder.encodeAsDoubleArray(value);\n\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + Arrays.toString(result));\n }\n\n assertNotNull(result);\n assertEquals(4, result.length);\n assertThat(result[0], is(0.0));\n assertThat(result[1], is(1.0));\n assertThat(result[2], is(0.0));\n assertThat(result[3], is(1.0));\n\n value = 20; // > 16 outside range\n result = encoder.encodeAsDoubleArray(value);\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + result);\n }\n assertNotNull(result);\n\n // 0100 Best fit into 4 digits; ignores higher bits\n assertEquals(4, result.length);\n assertThat(result[0], is(0.0));\n assertThat(result[1], is(1.0));\n assertThat(result[2], is(0.0));\n assertThat(result[3], is(0.0));\n }",
"private static String DoubleToBinaryString(double data){\n long longData = Double.doubleToLongBits(data);\n //A long is 64-bit\n return String.format(\"%64s\", Long.toBinaryString(longData)).replace(' ', '0');\n }",
"public static byte[] getLongAsBytes(long l) {\n\t\treturn new byte[] {\n\t\t\t\t(byte) (l >> 56),\n\t\t\t\t(byte) (l >> 48),\n\t\t\t\t(byte) (l >> 40),\n\t\t\t\t(byte) (l >> 32),\n\t\t\t\t(byte) (l >> 24),\n\t\t\t\t(byte) (l >> 16),\n\t\t\t\t(byte) (l >> 8),\n\t\t\t\t(byte) l\n\t\t\t};\n\t}",
"public static byte[] longToBytes(long x) {\n\t ByteBuffer buffer = ByteBuffer.allocate(Long.BYTES);\n\t buffer.putLong(x);\n\t return buffer.array();\n\t}",
"public static byte[] toBytes(long val) {\n byte [] b = new byte[8];\n for (int i = 7; i > 0; i--) {\n b[i] = (byte) val;\n val >>>= 8;\n }\n b[0] = (byte) val;\n return b;\n }",
"private static final byte[] longToByteArray(long l) {\n\t\tbyte[] retVal = new byte[8];\n\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tretVal[i] = (byte) l;\n\t\t\tl >>= 8;\n\t\t}\n\n\t\treturn retVal;\n\t}",
"public static byte[] longToBytes(long l) {\n\n ByteBuffer byteBuffer = ByteBuffer.allocate(NUM_BYTES_IN_LONG);\n byteBuffer.putLong(l);\n return byteBuffer.array();\n\n }",
"public static byte[] toBigEndianByteArray(Number number) throws ScriptException\n {\n long n = number.longValue();\n for (int i = 1; i <= 8; i++)\n {\n long maxNum = 1L << (i * 8 - 1);\n if (n <= maxNum && n >= -maxNum)\n {\n byte[] res = new byte[i];\n boolean changeSign = false;\n if (n < 0)\n {\n changeSign = true;\n n = -n;\n }\n for (int j = 0; j < i; j++)\n {\n res[j] = (byte) ((n >> j * 8) & 0xFF);\n }\n // Bitcoin scripts use 1-complement for negative numbers\n if (changeSign)\n {\n res[i - 1] |= 0x80;\n }\n return res;\n }\n }\n throw new ScriptException(\"Number to large to convert to binary: \" + number);\n }",
"public static byte[] toLEBytes(int i) {\n\t\treturn ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(i).array();\n\t}",
"static protected String[] double2String(double[][] d){ // Borrowed from JMatLink\r\nString encodeS[]=new String[d.length]; // String vector\r\n// for all rows\r\nfor (int n=0; n<d.length; n++){\r\nbyte b[] = new byte[d[n].length];\r\n// convert row from double to byte\r\nfor (int i=0; i<d[n].length ;i++) b[i]=(byte)d[n][i];\r\n\r\n// convert byte to String\r\ntry { encodeS[n] = new String(b, \"UTF8\");}\r\ncatch (UnsupportedEncodingException e) { e.printStackTrace(); }\r\n}\r\nreturn encodeS;\r\n}",
"public static byte[] toBytes(final long... numbers) {\n\t\tbyte[] bytes = new byte[numbers.length * 8];\n\t\tfor (int i = 0, j = 0; i < numbers.length; i++, j += 8) {\n\t\t\tSystem.arraycopy(toBytes(numbers[i]), 0, bytes, j, 8);\n\t\t}\n\t\treturn bytes;\n\t}",
"public byte[] toByteArray() {\n/* 510 */ ByteBuffer buff = ByteBuffer.allocate(40).order(ByteOrder.LITTLE_ENDIAN);\n/* 511 */ writeTo(buff);\n/* 512 */ return buff.array();\n/* */ }",
"private byte[] toByte(long address) {\n byte[] addressInBytes = new byte[]{\n (byte) (address >> 40 & 0xff),\n (byte) (address >> 32 & 0xff),\n (byte) (address >> 24 & 0xff),\n (byte) (address >> 16 & 0xff),\n (byte) (address >> 8 & 0xff),\n (byte) (address >> 0 & 0xff)\n };\n return addressInBytes;\n }",
"@Test\n public void decodeDouble()\n {\n final double[] array = new double[4];\n array[0] = 0;\n array[1] = 0;\n array[2] = 1;\n array[3] = 1;\n\n final BinaryEncoder encoder = new BinaryEncoder(16);\n assertEquals(3.0, encoder.decode(array), 0.0);\n }",
"public static double zettaBytesToBits(double num) { return gigaBitsToBits(zettaBytesToGigaBits(num)); }",
"public byte[] getBytes(boolean littleEndian) {\n try {\n String charSet = \"US-ASCII\";\n\n byte[] sysname_buf = (this.sysname + \"\\0\").getBytes(charSet);\n byte[] nodename_buf = (this.nodename + \"\\0\").getBytes(charSet);\n byte[] release_buf = (this.release + \"\\0\").getBytes(charSet);\n byte[] version_buf = (this.version + \"\\0\").getBytes(charSet);\n byte[] machine_buf = (this.machine + \"\\0\").getBytes(charSet);\n byte[] domainname_buf = (this.domainname + \"\\0\").getBytes(charSet);\n\n byte[] buffer = new byte[SIZE_OF];\n\n ByteBuffer byteBuffer = ByteBuffer.wrap(buffer).order(littleEndian ? ByteOrder.LITTLE_ENDIAN : ByteOrder.BIG_ENDIAN);\n\n byteBuffer.position(0);\n byteBuffer.put(sysname_buf);\n\n byteBuffer.position(_SYSNAME_SIZE);\n byteBuffer.put(nodename_buf);\n\n byteBuffer.position(_SYSNAME_SIZE * 2);\n byteBuffer.put(release_buf);\n\n byteBuffer.position(_SYSNAME_SIZE * 3);\n byteBuffer.put(version_buf);\n\n byteBuffer.position(_SYSNAME_SIZE * 4);\n byteBuffer.put(machine_buf);\n\n byteBuffer.position(_SYSNAME_SIZE * 5);\n byteBuffer.put(domainname_buf);\n\n return buffer;\n } catch (UnsupportedEncodingException e) {\n throw new RuntimeException(e);\n }\n }",
"public static double yottaBytesToBits(double num) { return gigaBitsToBits(yottaBytesToGigaBits(num)); }",
"public static double exaBytesToBits(double num) { return gigaBitsToBits(exaBytesToGigaBits(num)); }",
"public static double teraBytesToBits(double num) { return (num*8*Math.exp(12)); }",
"public static byte[] convertLong(long v, boolean isLE)\r\n {\r\n byte[] bytes = new byte[8];\r\n if (isLE)\r\n {\r\n bytes[0] = (byte) (v >>> 0);\r\n bytes[1] = (byte) (v >>> 8);\r\n bytes[2] = (byte) (v >>> 16);\r\n bytes[3] = (byte) (v >>> 24);\r\n bytes[4] = (byte) (v >>> 32);\r\n bytes[5] = (byte) (v >>> 40);\r\n bytes[6] = (byte) (v >>> 48);\r\n bytes[7] = (byte) (v >>> 56);\r\n }\r\n else\r\n {\r\n bytes[0] = (byte) (v >>> 56);\r\n bytes[1] = (byte) (v >>> 48);\r\n bytes[2] = (byte) (v >>> 40);\r\n bytes[3] = (byte) (v >>> 32);\r\n bytes[4] = (byte) (v >>> 24);\r\n bytes[5] = (byte) (v >>> 16);\r\n bytes[6] = (byte) (v >>> 8);\r\n bytes[7] = (byte) (v >>> 0);\r\n }\r\n return bytes;\r\n }",
"public static byte[] longToBytes(float x) {\n int bits = Float.floatToIntBits(x);\n byte[] buffer = new byte[4];\n buffer[0] = (byte)(bits & 0xff);\n buffer[1] = (byte)((bits >> 8) & 0xff);\n buffer[2] = (byte)((bits >> 16) & 0xff);\n buffer[3] = (byte)((bits >> 24) & 0xff);\n\n return buffer;\n }",
"static byte[] toBEBytes(int i) {\n\t\treturn ByteBuffer.allocate(4).order(ByteOrder.BIG_ENDIAN).putInt(i).array();\n\t}",
"ByteOrder byteOrder();",
"@Test\n public void encodeAsDoubleArrayNegative()\n {\n final double value = -5;\n final BinaryEncoder encoder = new BinaryEncoder(-8, 8, 1.0);\n final double[] result = encoder.encodeAsDoubleArray(value);\n\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + Arrays.toString(result));\n }\n\n assertNotNull(result);\n assertEquals(4, result.length);\n assertThat(result[0], is(0.0));\n assertThat(result[1], is(0.0));\n assertThat(result[2], is(1.0));\n assertThat(result[3], is(1.0));\n }",
"public static byte[] getBytes(char value) {\r\n\t\treturn ByteBuffer.allocate(2).order(ByteOrder.LITTLE_ENDIAN).putChar(value).array();\r\n\t}",
"void writeDoubles(double[] d, int off, int len) throws IOException;",
"@Override\n public byte[] getByteArray()\n {\n if(firstTime)\n {\n return new byte[0];\n }\n ByteBuffer buffer = ByteBuffer.allocate(MolapCommonConstants.DOUBLE_SIZE_IN_BYTE);\n buffer.putDouble(aggVal);\n return buffer.array();\n }",
"public static int[] getBytesFromQuadByte(final long longValue) {\n int[] intArray = new int[4];\n\n intArray[0] = (int) ((longValue >>> 3 * BYTE_LENGTH) & BYTE_MASK);\n intArray[1] = (int) ((longValue >>> 2 * BYTE_LENGTH) & BYTE_MASK);\n intArray[2] = (int) ((longValue >>> BYTE_LENGTH) & BYTE_MASK);\n intArray[3] = (int) (longValue & BYTE_MASK);\n\n return intArray;\n }",
"public native static long getConvertBytes();",
"public static byte[] getBytes(short value) {\r\n\t\treturn ByteBuffer.allocate(2).order(ByteOrder.LITTLE_ENDIAN).putShort(value).array();\r\n\t}",
"public final void writeDouble(final double data, final boolean endianess) throws IOException {\r\n\r\n long tmpLong;\r\n\r\n tmpLong = Double.doubleToLongBits(data);\r\n writeLong(tmpLong, endianess);\r\n }",
"public byte[] toBytes () {\n return toTuple().toBytes();\n }",
"public static byte[] convertIntegersToBytes(int[] nums) {\n if (nums != null) {\n byte[] outputBytes = new byte[nums.length * 4];\n for(int i = 0, k = 0; i < nums.length; i++) {\n int integerTemp = nums[i];\n for(int j = 0; j < 4; j++, k++) {\n outputBytes[k] = (byte)((integerTemp >> (8 * j)) & 0xFF);\n }\n }\n return outputBytes;\n } else {\n return null;\n }\n }",
"private byte[] shortToByteArray(short i) {\n ByteBuffer bbf = ByteBuffer.allocate(2)\n .order(ByteOrder.LITTLE_ENDIAN)\n .putShort(i);\n return bbf.array();\n }",
"public static double petaBytesToBits(double num) { return gigaBitsToBits(petaBytesToGigaBits(num)); }",
"List<Byte> getAsBytes();",
"public static byte[] LongToOpaque(long number) { \n long temp = number; \n byte[] b = new byte[16]; //0-7 time stamp, 8-15 customized \n for (int i = 0; i < 8; i++) { \n b[i] = new Long(temp & 0xff).byteValue();\n temp = temp >> 8; // right shift 8\n } \n return b; \n }",
"double[] encodeNetwork();",
"public byte[] getByteArray() {\n long val = getValue();\n return new byte[] {\n (byte)((val>>24) & 0xff),\n (byte)((val>>16) & 0xff),\n (byte)((val>>8) & 0xff),\n (byte)(val & 0xff) };\n }",
"public static Bytes bytes(final double bytes)\n\t{\n\t\treturn bytes(Math.round(bytes));\n\t}",
"public static byte[] convertFloatToByteArray(float toConvert) {\n return ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putFloat(toConvert).array();\n }",
"static byte[] toArray(int value) {\n return new byte[] {\n (byte) (value >> 24),\n (byte) (value >> 16),\n (byte) (value >> 8),\n (byte) value };\n }",
"public static byte[] getShortAsBytes(short s) {\n\t\treturn new byte[] {\n\t\t\t\t(byte) (s >>> 8),\n\t\t\t\t(byte) s\n\t\t};\n\t}",
"public static byte[] getEncodeIntervalNumberByteArray(long intervalNumber) {\n return intToByteLittleEndian((int)getUint32(intervalNumber));\n }",
"private byte[] intToByteArray(int i) {\n ByteBuffer bbf = ByteBuffer.allocate(4)\n .order(ByteOrder.LITTLE_ENDIAN)\n .putInt(i);\n return bbf.array();\n }",
"public static byte[] intToBytesArray(int num) {\r\n\t\tbyte[] byteArr = new byte[4];\r\n\t\t// big endian, low to high\r\n\t\tfor (int i = 0; i < byteArr.length; i++) {\r\n\t\t\tbyteArr[byteArr.length - 1 - i] = (byte) (num & 0xff);\r\n\t\t\tnum >>= 8;\r\n\t\t}\r\n\t\treturn byteArr;\r\n\t}",
"public static byte[] getBytes(int value) {\r\n\t\treturn ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(value).array();\r\n\t}",
"public abstract byte[] toBytes() throws Exception;",
"public static long doubleToLongBits(double value)\n {\n long result = Double.doubleToRawLongBits(value);\n // Check for NaN based on values of bit fields, maximum\n // exponent and nonzero significand.\n if (((result & DOUBLE_EXP_BIT_MASK) == DOUBLE_EXP_BIT_MASK)\n && (result & DOUBLE_SIGNIF_BIT_MASK) != 0L)\n result = 0x7ff8000000000000L;\n return result;\n }",
"byte[] getBytes();",
"byte[] getBytes();",
"@Override\n\tpublic byte[] getBytes() {\n\t\tByteBuffer buf = ByteBuffer.allocate(8);\n\t\tbuf.putDouble(this.riskPremium);\n\t\treturn buf.array();\n\t}",
"public final double getDouble(final boolean endianess) throws IOException {\r\n b1 = (tagBuffer[bPtr] & 0xff);\r\n b2 = (tagBuffer[bPtr + 1] & 0xff);\r\n b3 = (tagBuffer[bPtr + 2] & 0xff);\r\n b4 = (tagBuffer[bPtr + 3] & 0xff);\r\n b5 = (tagBuffer[bPtr + 4] & 0xff);\r\n b6 = (tagBuffer[bPtr + 5] & 0xff);\r\n b7 = (tagBuffer[bPtr + 6] & 0xff);\r\n b8 = (tagBuffer[bPtr + 7] & 0xff);\r\n\r\n long tmpLong;\r\n\r\n if (endianess == FileDicomBaseInner.BIG_ENDIAN) {\r\n tmpLong = ( ((long) b1 << 56) | ((long) b2 << 48) | ((long) b3 << 40) | ((long) b4 << 32)\r\n | ((long) b5 << 24) | ((long) b6 << 16) | ((long) b7 << 8) | b8);\r\n } else {\r\n tmpLong = ( ((long) b8 << 56) | ((long) b7 << 48) | ((long) b6 << 40) | ((long) b5 << 32)\r\n | ((long) b4 << 24) | ((long) b3 << 16) | ((long) b2 << 8) | b1);\r\n }\r\n\r\n bPtr += 8;\r\n\r\n return (Double.longBitsToDouble(tmpLong));\r\n\r\n }",
"public static byte[] b(int... array) {\n if (array == null) {\n return null;\n }\n byte[] ret = new byte[array.length];\n for (int i = 0; i < ret.length; i++) {\n ret[i] = (byte) array[i];\n }\n return ret;\n }",
"public static double[] byteArr2DoubleArr(byte[] b, int length, int bytesPerDouble, double fractionNum)\r\n\t\t\tthrows DataLenUnproperException {\r\n\t\t\r\n\t\tint[] intArr = byteArr2IntArr(b, length, bytesPerDouble);\r\n\t\tif (null == intArr) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tdouble[] floatArr = new double[intArr.length];\r\n\t\tfor (int i = 0; i < intArr.length; i++) {\r\n\t\t\tfloatArr[i] = intArr[i] / Math.pow(2, fractionNum);\r\n\t\t}\r\n\r\n\t\treturn floatArr;\r\n\t}",
"public byte[] i2b(int value) {\n byte[] data = new byte[4];\n data[0] = (byte) ((value >> 24) & 0xFF);\n data[1] = (byte) ((value >> 16) & 0xFF);\n data[2] = (byte) ((value >> 8) & 0xFF);\n data[3] = (byte) (value & 0xFF);\n return data;\n }",
"private byte[] short2byte(short[] sData) {\n int shortArrsize = sData.length;\n byte[] bytes = new byte[shortArrsize * 2];\n for (int i = 0; i < shortArrsize; i++) {\n bytes[i * 2] = (byte) (sData[i] & 0x00FF);\n bytes[(i * 2) + 1] = (byte) (sData[i] >> 8);\n sData[i] = 0;\n }\n return bytes;\n\n }",
"void writeBytes(byte[] value);",
"private static byte[] shortToBytes(short value) {\n ByteBuffer bb = ByteBuffer.allocate(2);\n bb.putShort(value);\n return bb.array();\n }",
"private Data[] getBytes(double value, int npoints, int nattributes)\n\t{\n\t\tData[] data = new Data[npoints];\n\t\tbyte val = (byte) (value * Byte.MAX_VALUE);\n\t\tfor (int i = 0; i < npoints; i++)\n\t\t\tdata[i] = nattributes == 1 ? new DataByte(val)\n\t\t: new DataArrayOfBytes(new byte[] { val, val });\n\t\t\treturn data;\n\t}",
"public abstract double[] toDoubleArray();",
"public static byte[] shortToBytes(short s) {\n\n ByteBuffer byteBuffer = ByteBuffer.allocate(NUM_BYTES_IN_SHORT);\n byteBuffer.putShort(s);\n return byteBuffer.array();\n\n }",
"public abstract byte[] toByteArray();",
"public abstract byte[] toByteArray();",
"public static byte[] intToByte(int i) {\n return new byte[] {(byte)(i>>24), (byte)(i>>16), (byte)(i>>8), (byte)i};\n }",
"public static double kiloBytesToBits(double num) { return (num*8000); }",
"public static byte[] longToByteArray(long value, int valueSize, int length) {\n long val = value;\n // Convert the long to 8-byte BE representation\n byte[] b = new byte[8];\n for (int i = 7; i >= 0 && val != 0L; i--) {\n b[i] = (byte) val;\n val >>>= 8;\n }\n // Then copy the rightmost valueSize bytes\n // e.g., for an integer we want rightmost 4 bytes\n return Arrays.copyOfRange(b, 8 - valueSize, 8 + length - valueSize);\n }",
"private static byte[] toByteArray(int[] array) {\n final byte[] res = new byte[array.length];\n for (int i = 0; i < array.length; ++i) {\n final int value = array[i];\n res[i] = (byte) value;\n }\n return res;\n }",
"public byte[] getDataByte() {\n\t\t\n\t\tif (!isDoubleType)\n\t\t{\n\t\t\treturn ipixel_o;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t}",
"public byte[] getIOPortDoubleWord(int portAddress)\n {\n return null;\n }",
"protected void writeDoubleArray( DataOutput out, double[] array ) throws IOException {\n\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n DataOutputStream dataOut = new DataOutputStream( byteStream );\n\n dataOut.writeInt( array.length );\n for(int i=0; i<array.length; i++)\n dataOut.writeDouble( array[i] );\n dataOut.close();\n\n out.writeInt( byteStream.size() );\n out.write( byteStream.toByteArray() );\n }",
"public static byte[] convertInt8(int v)\r\n {\r\n byte[] bytes = new byte[1];\r\n bytes[0] = (byte) v;\r\n return bytes;\r\n }",
"public static int getHighByteFromDoubleByte(final int intValue) {\n return (intValue >>> BYTE_LENGTH) & BYTE_MASK;\n }",
"byte[] IntToByte(int i)\r\n {\r\n return Integer.toString(i).getBytes();\r\n }",
"public byte[] getFixedSizeBinary(int columnIndex) {\n FixedSizeBinaryVector vector = (FixedSizeBinaryVector) table.getVector(columnIndex);\n return vector.get(rowNumber);\n }",
"public void testGetDoubleLE() {\n byte[] array = new byte[] {\n 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, -0xD, 0x3F,\n 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, -0xA, 0x3F\n };\n // end::noformat\n BytesReference ref = new BytesArray(array, 0, array.length);\n assertThat(ref.getDoubleLE(0), equalTo(1.2));\n assertThat(ref.getDoubleLE(8), equalTo(1.4));\n Exception e = expectThrows(ArrayIndexOutOfBoundsException.class, () -> ref.getDoubleLE(9));\n assertThat(e.getMessage(), equalTo(\"Index 9 out of bounds for length 9\"));\n }",
"public static byte[] toArray(List<Byte> list) {\n byte[] bytes = new byte[list.size()];\n for (int i = 0; i < list.size(); i++)\n bytes[i] = list.get(i);\n return bytes;\n }",
"private static BIG byte_to_BIG(byte [] array){\n BIG result = new BIG();\n long[] long_ = new long[4];\n for(int i=long_.length; i > 0;i--){\n long_[i-1] =\n ((array[i*7-3] & 0xFFL) << 48) |\n ((array[i*7-2] & 0xFFL) << 40) |\n ((array[i*7-1] & 0xFFL) << 32) |\n ((array[i*7] & 0xFFL) << 24) | \n ((array[i*7+1] & 0xFFL) << 16) | \n ((array[i*7+2] & 0xFFL) << 8) | \n ((array[i*7+3] & 0xFFL) << 0) ; \n }\n int int_ = \n (int) (((array[0] & 0xFFL) << 24) |\n\t\t ((array[1] & 0xFFL) << 16) |\n\t\t ((array[2] & 0xFFL) << 8) |\n\t\t ((array[3] & 0xFFL) << 0)) ;\n \n long[] temp = {long_[3],long_[2],long_[1],long_[0],int_};\n\n result = new BIG(temp);\n return result;\n }",
"public byte[] toByteArray()\n {\n // stuff the array\n byte[] array = new byte[4];\n array[0] = majorVersion;\n array[1] = minorVersion;\n array[2] = featureCode;\n array[3] = 0; // reserved\n\n // done\n return array;\n }",
"public byte[] toCompressedBytes() {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tDataOutputStream dos = new DataOutputStream(baos);\n \ttry {\n \t\t// write the type string first\n \t\tdos.writeUTF(Types.GPS);\n \t\tdos.writeLong(this.getTimestamp());\n \t\t// JWS - using flongs to compress\n \t\tdos.writeLong(FixedPointLong.stringToFlong(loc.getLatitudeAsString()));\n \t\tdos.writeLong(FixedPointLong.stringToFlong(loc.getLongitudeAsString()));\n \t\tfor(int i=0;i<gpsTypes.length;i++) {\n \t\t\tString s = (String) entries.get(gpsTypes[i]);\n \t\t\tdos.writeUTF(s);\n \t\t}\n \t\n \tdos.close();\n \t} catch(IOException ioe) {\n \t\t//ioe.printStackTrace();\n \t\treturn null; \n \t} catch(FixedPointLongException fple) {\n \t return null;\n \t}\n \treturn baos.toByteArray();\n }",
"private byte[] intToBytes(int i) {\n\t\tb.clear();\n\t\treturn b.order(ByteOrder.LITTLE_ENDIAN).putInt(i).array();\n\t}",
"public byte[] serialize(Double object, TypeOptions options) {\n\t\treturn null;\n\t}",
"public byte[] getBytes(String columnName) throws SQLException {\n\n try {\n debugCodeCall(\"getBytes\", columnName);\n return get(columnName).getBytes();\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }",
"private double[] b2() {\n double[] r = b;\n for (int j = 0; j < nBinVars2; j++) {\n r = Maths.append(r, 1d);\n }\n return r;\n }",
"private String toBinary( byte[] bytes )\n\t{\n \t\tStringBuilder sb = new StringBuilder(bytes.length * Byte.SIZE);\n\t\tfor( int i = 0; i < Byte.SIZE * bytes.length; i++ )\n\t\t\tsb.append((bytes[i / Byte.SIZE] << i % Byte.SIZE & 0x80) == 0 ? '0' : '1');\n\t\treturn sb.toString();\n\t}",
"public static byte[] encode(ArrayList<Integer> nums)\n {\n //ArrayList<Byte> byteStream = new ArrayList<Byte>();\n int totalSize = 0;\n for(int i=0;i<nums.size();i++)\n {\n int n = nums.get(i);\n int sizeReq = 1;\n if(n < Math.pow(2, 7))\n sizeReq = 1;\n else if(n < Math.pow(2, 14))\n sizeReq = 2;\n else if(n < Math.pow(2, 21))\n sizeReq = 3;\n else if(n < Math.pow(2, 28))\n sizeReq = 4;\n totalSize += sizeReq;\n }\n byte totalArray[] = new byte[totalSize];\n int c = 0;\n for(int i=0;i<nums.size();i++)\n {\n byte array[] = encode(nums.get(i));\n //byteStream.addAll(array);\n for(int j=0;j<array.length;j++)\n totalArray[c++] = array[j];\n }\n return totalArray;\n }",
"public synchronized static byte [] LongToBytes ( long ldata, int n )\n {\n byte buff[] = new byte [ n ];\n\n for ( int i=n-1; i>=0; i--)\n {\n // Keep assigning the right most 8 bits to the\n // byte arrays while shift 8 bits during each iteration\n buff [ i ] = (byte) ldata;\n ldata = ldata >> 8;\n }\n return buff;\n }",
"public byte[] intToBytes(int x) {\n\t\tByteBuffer buffer = ByteBuffer.allocate(Integer.BYTES);\n\t\tbuffer.putInt(x);\n\t\treturn buffer.array();\n\t}",
"public static byte[] ToBytes(AsonValue obj,byte flag) throws java.io.IOException {\n return new AsonSerializer(flag).serialize(obj);\n }",
"public static byte[] convertIntToByteArray(int toConvert, Boolean... bigEndian) {\n // Get the byte array of the int and return it, little endian style\n if (bigEndian.length > 0 && bigEndian[0]) {\n return ByteBuffer.allocate(4).order(ByteOrder.BIG_ENDIAN).putInt(toConvert).array();\n }\n else {\n return ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(toConvert).array();\n }\n }",
"public static byte [] toBytes(final boolean b) {\n return new byte[] { b ? (byte) -1 : (byte) 0 };\n }",
"public static double zettaBitsToBits(double num) { return gigaBitsToBits(zettaBitsToGigaBits(num)); }",
"public byte[] getLargeVarBinary(int columnIndex) {\n LargeVarBinaryVector vector = (LargeVarBinaryVector) table.getVector(columnIndex);\n return vector.get(rowNumber);\n }"
] |
[
"0.7169175",
"0.70644337",
"0.6378125",
"0.6295616",
"0.62434584",
"0.61834276",
"0.6117286",
"0.61016524",
"0.6090251",
"0.59997785",
"0.59898853",
"0.59429985",
"0.58907473",
"0.5831612",
"0.5803376",
"0.57988346",
"0.57938206",
"0.5772432",
"0.5748507",
"0.57353276",
"0.5713513",
"0.5704378",
"0.56972116",
"0.56928706",
"0.5671355",
"0.56072015",
"0.5585743",
"0.55802405",
"0.5579357",
"0.5550307",
"0.5525657",
"0.5504799",
"0.5483825",
"0.54764193",
"0.5456075",
"0.54522157",
"0.54217577",
"0.54190665",
"0.5403808",
"0.5402218",
"0.53857213",
"0.5368221",
"0.5363583",
"0.53603923",
"0.5350981",
"0.5337611",
"0.5335446",
"0.53201705",
"0.5292283",
"0.5289756",
"0.524374",
"0.5240058",
"0.52361",
"0.523082",
"0.5215352",
"0.5170383",
"0.5162602",
"0.5162602",
"0.51403356",
"0.512232",
"0.5114354",
"0.5110104",
"0.5109843",
"0.5106255",
"0.5103039",
"0.5100888",
"0.5084528",
"0.5071389",
"0.5067071",
"0.50367033",
"0.50367033",
"0.50340015",
"0.503097",
"0.5030964",
"0.49929032",
"0.49746832",
"0.4972866",
"0.49646607",
"0.49620968",
"0.49620733",
"0.49537498",
"0.49123493",
"0.4904224",
"0.48994714",
"0.48943496",
"0.48719144",
"0.48681447",
"0.4867734",
"0.48654565",
"0.48439255",
"0.48350137",
"0.48336267",
"0.48189813",
"0.48112768",
"0.4810163",
"0.48086834",
"0.4806903",
"0.48049963",
"0.47997937",
"0.47997206"
] |
0.74145424
|
0
|
Adds the given bytes to the passed ArrayList.
|
public static void addBytesToArray(byte[] bytes, ArrayList<Byte> array) {
// Add each byte to the array
// Array is an object, so passed by reference
for (Byte b: bytes) {
array.add(b);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void addData(ByteArrayList bytes) {\n data.add(bytes);\n if (data.size() == 1) {\n listeners.forEach(DataReceiveListener::hasData);\n }\n listeners.forEach(DataReceiveListener::received);\n }",
"void add(byte[] element);",
"public void add(byte[] bytes) {\r\n\t\tint[] hashes = createHashes(bytes, this.k);\r\n\t\tfor (int hash : hashes)\r\n\t\t\tthis.bitset.set(Math.abs(hash % this.bitSetSize), true);\r\n\t\tthis.numberOfAddedElements++;\r\n\t}",
"public synchronized void addBytes(ByteBuffer bytes) {\n\t _buffers.add(bytes);\n \n }",
"public Builder addListBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureListIsMutable();\n list_.add(value);\n onChanged();\n return this;\n }",
"boolean addAllByteString(Collection<? extends ByteString> c);",
"boolean addAllByteArray(Collection<byte[]> c);",
"void add(ByteString element);",
"List<byte[]> asByteArrayList();",
"void add(byte[] data, int offset, int length);",
"public static byte[] convertArrayListToArray(ArrayList<Byte> bytes) {\n // Define an array of size of bytes in array list\n byte[] resultBytes = new byte[bytes.size()];\n\n // Loop through the array list and add each byte to our primitive array\n for (int i = 0; i < bytes.size(); i++) {\n resultBytes[i] = bytes.get(i);\n }\n\n // Return the primitive array\n return resultBytes;\n }",
"public void add(byte[] arrby) {\n ByteBuffer byteBuffer;\n ByteBuffer byteBuffer2 = byteBuffer = Blob.this.getByteBuffer();\n synchronized (byteBuffer2) {\n byteBuffer.position(Blob.this.getByteBufferPosition() + this.offset() + this.mCurrentDataSize);\n byteBuffer.put(arrby);\n this.mCurrentDataSize += arrby.length;\n return;\n }\n }",
"public void append(byte[] bytes)\n throws IndexOutOfBoundsException {\n if ( le != -1 ) // there exists already an le in byte buffer\n throw new IndexOutOfBoundsException(\"An le value exists in APDU buffer, therefore no append is possible\"); // so appending bytes makes no sense\n super.append(bytes);\n lc += bytes.length;\n }",
"@Override\r\n\tpublic Buffer appendBytes(byte[] bytes) {\n\t\tthis.buffer.put( bytes );\r\n\t\treturn this;\r\n\t}",
"public void append(byte[] bytes)\n\t{\n\t\t// create a new byte array object\n\t\tByteArray combined = combineWith(bytes);\n\t\t\n\t\t// reset the array of bytes\n\t\tthis.bytes = combined.getBytes();\n\t}",
"public static void serializeElement(ArrayList<Byte> arrlist, Element e) {\n\t\tbyte[] arr_e = e.toBytes();\n\t\tserializeUint32(arrlist, arr_e.length);\n\t\tbyteArrListAppend(arrlist, arr_e);\n\t}",
"public static ImmutableList<Byte> createByteList(int... bytes) {\n return ImmutableList.copyOf(Bytes.asList(createByteArray(bytes)));\n }",
"public void addUploadedBytes(long l) {\n\t\tuploadedBytes += l;\n\t}",
"public void addData(byte[] arrby) {\n if (arrby == null) return;\n {\n try {\n if (arrby.length == 0) {\n return;\n }\n if ((int)this.len.get() + arrby.length > this.buf.length) {\n Log.w(TAG, \"setData: Input size is greater than the maximum allocated ... returning! b.len = \" + arrby.length);\n return;\n }\n this.buf.add(arrby);\n this.len.set(this.len.get() + (long)arrby.length);\n return;\n }\n catch (Exception exception) {\n Log.e(TAG, \"addData exception!\");\n exception.printStackTrace();\n return;\n }\n }\n }",
"@SuppressWarnings(\"unchecked\")\n public void arrayAddValue(LinkedList<String> keyList, Object array, Object value) throws IOException {\n if (value instanceof JSONParseEngine.ByteBuffer) {\n value = value.toString();\n }\n ((ArrayList) array).add(value);\n }",
"public void addDatatoArrayList(ArrayList<Object> ar1) {\n\t\tar1.add(1);\n\t\tar1.add(\"anu\");\n\t\tar1.add(1.3);\n\t\tar1.add(true);\n\t\tar1.add('&');\n\t\tar1.add(false);\n\t\tSystem.out.println(\"Data aaded to ArrayList\");\n\t}",
"public void add(byte b) {\n\t\tif (pointer == size)\n\t\t\twriteToFile();\n\t\tstream.set(pointer++, b);\n\t\twrittenBytes++;\n\t}",
"public void Add(String item) {\n byte[] bites = Utils.hexToBytes(item);\n mpBuffer += Utils.bytesToHex(bites);\n mLenght += bites.length;\n mBackOffset = mLenght;\n }",
"public void Add(float[] item) {\n for (int i = 0; i < item.length; i++) {\n String s = String.format(\"%8s\", Integer.toHexString(Float.floatToRawIntBits(item[i])))\n .replace(' ', '0');\n StringBuilder out2 = new StringBuilder();\n String ss = \"\";\n for (int j = s.length() - 1; j > 0; j -= 2) {\n String str = s.substring(j - 1, j + 1);\n out2.append(str);\n ss = out2.toString();\n }\n mpBuffer += ss;\n }\n // mpBuffer+=Utils.bytesToHex(bites);\n mLenght += Long.SIZE / 8 * item.length;\n mBackOffset = mLenght;\n }",
"public void addHarvestContents(ArrayList ist)\r\n/* 100: */ {\r\n/* 101: 80 */ super.addHarvestContents(ist);\r\n/* 102: 81 */ ist.add(new ur(RedPowerMachine.blockFrame, 1));\r\n/* 103: */ }",
"public static void padWithBytes(ArrayList<Byte> array, int padCount) {\n for (int i = 0; i < padCount; i++) {\n array.add((byte)0);\n }\n }",
"private static byte[] toByteArray(Collection<Byte> bytes) {\n\t\tbyte[] result = new byte[bytes.size()];\n\t\t\n\t\tint index = 0;\n\t\t\n\t\tfor (byte b : bytes) {\n\t\t\tresult[index++] = b;\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public int addBytes( final byte[] _bytes, final int _offset, final int _length ) {\n\n // sanity checks...\n if( _bytes == null )\n throw new IllegalArgumentException( \"Missing bytes to append\" );\n if( _length - _offset <= 0 )\n throw new IllegalArgumentException( \"Specified buffer has no bytes to append\" );\n\n // figure out how many bytes we can append...\n int appendCount = Math.min( buffer.capacity() - buffer.limit(), _length - _offset );\n\n // remember our old position, so we can put it back later...\n int pos = buffer.position();\n\n // setup to copy our bytes to the right place...\n buffer.position( buffer.limit() );\n buffer.limit( buffer.capacity() );\n\n // copy our bytes...\n buffer.put( _bytes, _offset, appendCount );\n\n // get our source and limit to the right place...\n buffer.limit( buffer.position() );\n buffer.position( pos );\n\n return appendCount;\n }",
"@Override\n\tpublic boolean add(E item) {\n\t\tif (this.numberOfElements == this.size) {\n\t\t\tE[] newArrayList = (E[]) new Object[this.size * 2];\n\t\t\tint i = 0;\n\t\t\twhile (i < this.size) {\n\t\t\t\tnewArrayList[i] = this.arrayList[i];\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t\tthis.arrayList = newArrayList;\n\t\t\tthis.size = this.size * 2;\n\t\t}\n\t\tthis.arrayList[this.numberOfElements] = item;\n\t\tthis.numberOfElements += 1;\n\t\treturn true;\n\t}",
"public void addMessage(byte[] message) throws RemoteException;",
"public static byte[] toArray(List<Byte> list) {\n byte[] bytes = new byte[list.size()];\n for (int i = 0; i < list.size(); i++)\n bytes[i] = list.get(i);\n return bytes;\n }",
"public boolean contains(ByteList bytes) {\n return this.get(bytes) != -1;\n }",
"protected void addBeats(byte[] buffer, int bytes) {\n\t\tif ((beats == null) || (bytes == 0)) \n\t\t\treturn;\n\t\tint clickLen;\n\t\tif (beatIndex > 0) {\t// complete tail of previous beat if necessary\n\t\t\tclickLen = click[level[beatIndex - 1]].length;\n\t\t\tif (beats[beatIndex-1] + clickLen * currentFile.frameSize > currentPosition) {\n\t\t\t\tint start = (int) (beats[beatIndex-1] - currentPosition);\n\t\t\t\tint len = clickLen + start / currentFile.frameSize;\n\t\t\t\tif (bytes < len)\n\t\t\t\t\tlen = bytes;\n\t\t\t\taddBeat(buffer, start, len, level[beatIndex - 1]);\n\t\t\t}\n\t\t}\n\t\twhile ((beatIndex < beats.length) && (beats[beatIndex] < currentPosition + bytes)) {\n\t\t\tclickLen = click[level[beatIndex]].length;\n\t\t\tint start = (int) (beats[beatIndex] - currentPosition);\n\t\t\tint len;\n\t\t\tif (start < 0)\n\t\t\t\tlen = Math.min(bytes, clickLen * currentFile.frameSize + start);\n\t\t\telse\n\t\t\t\tlen = Math.min(bytes - start, clickLen * currentFile.frameSize);\n\t\t\taddBeat(buffer, start, len, level[beatIndex]);\n\t\t\tbeatIndex++;\n\t\t}\n\t}",
"@Override\n public void putAll(List<KeyValue<Bytes, byte[]>> entries) {\n entries.forEach(bytesKeyValue -> {\n\n this.put(bytesKeyValue.key, bytesKeyValue.value);\n });\n }",
"public void addByteArray(String name, byte[] value) {\n BYTES.add(new SimpleMessageObjectByteArrayItem(name, value));\n }",
"public void setContents(byte bytes[]) throws VlException\n {\n this.streamWrite(bytes,0,bytes.length); \n\n return;\n }",
"public static List<String> createIdListFromBytes(byte[] idListBytes) {\r\n\t\tif(idListBytes == null) throw new IllegalArgumentException(\"idListBytes cannot be null\");\r\n\t\ttry {\r\n\t\t\tList<String> result = new LinkedList<String>();\r\n\t\t\tString string = new String(idListBytes, \"UTF-8\");\r\n\t\t\tif (string.isEmpty()) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tString[] split = string.split(COLUMN_ID_DELIMITER);\r\n\t\t\tfor(String stringId: split){\r\n\t\t\t\t// The value must be a long\r\n\t\t\t\tlong value = Long.parseLong(stringId);\r\n\t\t\t\tresult.add(Long.toString(value));\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t}",
"public void add(byte[] hash) {\n byte[] firstHash = new byte[4];\n added++;\n for (int i = 0; i < 3; i++) {\n System.arraycopy(hash, i * 4, firstHash, 0, 4);\n setBit(firstHash);\n }\n }",
"public Data(ArrayList<Object> list) {\n try {\n int n = list.size();\n if (n == 0) throw new Exception(\"Specified argument for Data constructor is an empty ArrayList\");\n this.data = new ArrayList<Byte>();\n\n for (int i = 0; i < n; i++) {\n Object o = list.get(i);\n if (o instanceof Byte) {\n byte b = (byte) o;\n this.data.add(b);\n } else if (o instanceof Integer) {\n int v = (int) o;\n for (int j = 0; j < 4; j++) {\n int b = 0;\n for (int k = 0; k < 8; k++) {\n b = b << 1;\n int x = (3 - j) * 8 + (7 - k);\n int c = (v >> x) & 1;\n b = b | c;\n }\n byte d = (byte) b;\n this.data.add(d);\n }\n } else // support for other formats (eg. Double) may be added\n {\n throw new Exception(\"Specified argument for Data constructor contains Objects that are not supported yet\");\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n }",
"public void addRow(ArrayList<String> stringList) {\n }",
"int add(InputStream data, int length) throws ContentStoreException;",
"public void addAll(List<ImageContent> items) {\n _data = items;\n }",
"public void Add(int[] item) {\n Add(item.length * 4);\n\n\n for (int i = 0; i < item.length; i++) {\n AddInt(item[i]);\n }\n mLenght += Integer.SIZE / 8 * item.length;\n mBackOffset = mLenght;\n }",
"public static HashSet<Integer> getUniqueBytes(ArrayList<Integer> bytes){\n HashSet<Integer> uniqBites = new HashSet<>();\n uniqBites.addAll(bytes);\n return uniqBites;\n }",
"public String addAddressList(BufferedReader address);",
"private void addMessageToQueue( byte[] buffer ){\n \tsynchronized (this.messages) {\n byte message[] = new byte[buffer.length\n - Constants.MESSAGE_ID_LEN - 1];\n for (int i = Constants.MESSAGE_ID_LEN + 1; i < buffer.length; i++) {\n message[i - Constants.MESSAGE_ID_LEN - 1] = buffer[i];\n }\n messages.add(message);\n }\n }",
"public int addValue(byte[] array) {\n int val = hashCode();\n for (byte i : array) {\n val = addValue(i);\n }\n return val;\n }",
"public PacketBuilder putBytes(byte[] bytes) {\n\t\tbuffer.put(bytes);\n\t\treturn this;\n\t}",
"public boolean add(BufferSlot bs);",
"@Override\n public void add(Object item)\n {\n if (size == list.length)\n {\n Object [] itemInListCurrently = deepCopy();\n list = new Object[size * 2];\n\n System.arraycopy(itemInListCurrently, 0, list, 0, size);\n }\n\n list[size++] = item;\n }",
"public void addToBuffer(byte[] value, boolean isClient) {\n byte[] buffer;\n\n if (isClient) {\n buffer = mClientBuffer;\n } else {\n buffer = mServerBuffer;\n }\n\n if (buffer == null) {\n buffer = new byte[0];\n }\n byte[] tmp = new byte[buffer.length + value.length];\n System.arraycopy(buffer, 0, tmp, 0, buffer.length);\n System.arraycopy(value, 0, tmp, buffer.length, value.length);\n\n if (isClient) {\n mClientBuffer = tmp;\n } else {\n mServerBuffer = tmp;\n }\n }",
"@Override\n default List<FieldElement> deserializeList(byte[] bytes) {\n List<CompT> wrongType = getSerializer().deserializeList(bytes);\n return wrongType.stream().map(x -> (FieldElement) x).collect(Collectors.toList());\n }",
"public abstract void add(String element) throws RemoteException;",
"public void put(ByteList bytes, int code) {\n TrieNode current = this;\n for (int i = 0; i < bytes.size(); i++) {\n final int byteIndex = bytes.get(i) + 128;\n // don't reset the child node if it already exists\n if (current.children[byteIndex] == null) {\n TrieNode newNode = new TrieNode();\n current.children[byteIndex] = newNode;\n current = newNode;\n } else {\n current = current.children[byteIndex];\n }\n\n if (i == bytes.size() - 1) {\n current.code = code;\n }\n }\n }",
"static\n int decodedNumBytes(ArrayList charToBytes, int start, int end) {\n int numBytes = 0;\n for (int i = start; i < end; i++) {\n Integer iobj = (Integer) charToBytes.get(i);\n numBytes += iobj.intValue();\n }\n return numBytes;\n }",
"public static List<Byte> encode(List<Byte> l) {\r\n List<Byte> output = new ArrayList<>();\r\n byte lastByte = 0;\r\n int ocount = 0;\r\n\r\n for (Byte b : l) {\r\n ArgumentChecker.requireNonNegative(b);\r\n\r\n /*\r\n * since we can only use negative byte values as indicator, we can\r\n * only encode 130 consecutive occurrences at once.\r\n */\r\n if (b == lastByte && ocount < LONGEST_RUN)\r\n ocount++;\r\n else {\r\n output.addAll(encodedBytes(ocount, lastByte));\r\n lastByte = b;\r\n ocount = 1;\r\n }\r\n }\r\n output.addAll(encodedBytes(ocount, lastByte));\r\n\r\n return Collections.unmodifiableList(output);\r\n }",
"public void add( Object value )\n\t{\n\t\tint n = size();\n\t\tif (addIndex >= n)\n\t\t{\n\t\t\tif (n == 0)\n\t\t\t\tn = 8;\n\t\t\telse\n\t\t\t\tn *= 2;\n\t\t\tObject narray = Array.newInstance( array.getClass().getComponentType(), n );\n\t\t\tSystem.arraycopy( array, 0, narray, 0, addIndex );\n\t\t\tarray = narray;\n\t\t}\n\t\tArray.set( array, addIndex++, value );\n\t}",
"@Override\n public void extendStream(byte[] bytes) {\n try {\n ByteArrayOutputStream outStream = new ByteArrayOutputStream();\n stream.transferTo(outStream);\n outStream.write(bytes);\n stream = new ByteArrayInputStream(outStream.toByteArray());\n } catch (IOException ex) {\n throw new RuntimeException(\"IO Exception from ByteArrayStream\");\n }\n }",
"public void addTarifs(List<Tarif> list) {\n\t\ttarifs.addAll(list);\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic void add(T item){\n\t\t\n\n\t\tif(currentsize == data.length-1){\n\t\t\tgrow();\n\t\t}\n\n\t\t\n\t\tdata[currentsize] = item;\n\t\tcurrentsize++;\n\n\n\t}",
"public void add(E a)\n {\n if (size == data.length) { // if the list is at capacity...\n // create a new, larger array\n E[] newData = (E[])(new Object[2*data.length]);\n \n // copy over all of the old elements\n for (int i = 0; i < size; i++)\n newData[i] = data[i];\n \n // redirect the old data reference\n data = newData;\n }\n\n // insert the new element\n data[size] = a;\n size++;\n }",
"@SafeVarargs\n public final void add(Item... items) {\n add(asList(items));\n }",
"public void add(Message aMessage) \n { \n elements[tail] = aMessage; \n tail = (tail + 1) % elements.length; \n count++; \n }",
"public void append(byte b)\n throws IndexOutOfBoundsException {\n if ( le != -1 ) // there exists already an le in byte buffer\n throw new IndexOutOfBoundsException(\"An le value exists in APDU buffer, therefore no append is possible\"); // so appending bytes makes no sense\n super.append(b);\n lc++;\n }",
"List<Byte> getAsBytes();",
"int add(ContentInputStream data) throws ContentStoreException;",
"private static void testAdd(ArrayList list, int[] content) {\n System.out.print(\"Adding to the list: \");\n for (int index = 0; index < content[index]; index++) {\n list.addToEnd(content);\n } // end for\n System.out.println();\n displayList(list);\n }",
"public ArrayBackedList(IList list) {\n while (list.size() > stringArray.length) {\n reallocArray();\n }\n for (int i = 0; i < list.size(); i++) {\n stringArray[i] = list.get(i);\n }\n }",
"public void addALl(List<T> list){\n for(int i = 0; i < list.size(); i++){\n add(list.get(i));\n }\n }",
"public synchronized void add(E value) {\n this.array.add(value);\n }",
"public void addAddFiles( String[] addfiles ) {\n if ( addfiles == null ) {\n return ;\n }\n for ( int i = 0; i < addfiles .length; i++ ) {\n addAddFile( addfiles[i] );\n }\n }",
"public void AddData(byte [] data, int size)\n\t{\t\n\t\tif (mBufferIndex + size > mBufferSize)\n\t\t{\n\t\t\tUpgradeBufferSize();\n\t\t}\n\t\t\n\t\tSystem.arraycopy(data, 0, mBuffer, mBufferIndex, size);\n\t\tmBufferIndex += size;\n\t}",
"private void m152570a(List<ByteBuffer> list) {\n synchronized (this.f113322u) {\n for (ByteBuffer byteBuffer : list) {\n m152578e(byteBuffer);\n }\n }\n }",
"public ArrayList<Object> convertAll(byte[] input) {\n record = input;\n ArrayList<Object> result = new ArrayList<Object>();\n result.add(accelConversion());\n result.add(lightConversion());\n result.add(tempConversion());\n result.add(externalConversion());\n\n return result;\n }",
"public void addAll(String[] a)\n {\n\tfor (String s : a)\n\t this.add(s);\n }",
"public void c(byte[] object) {\n synchronized (this) {\n Object object2 = this.A;\n if (object2 != null) {\n long l10;\n object2 = new b$b(this, null);\n ((b$b)object2).a = l10 = TXCTimeUtil.generatePtsMS();\n object = this.e((byte[])object);\n ((b$b)object2).b = object;\n object = this.A;\n ((ArrayList)object).add(object2);\n }\n return;\n }\n }",
"public Builder addHotelImageURLsBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n ensureHotelImageURLsIsMutable();\n hotelImageURLs_.add(value);\n onChanged();\n return this;\n }",
"public void add(List<SermCit> citList){\n //Add one by one\n for (SermCit x : citList){\n add(x);\n }\n }",
"public java.util.List<java.lang.Integer> getByteListList() {\n return java.util.Collections.unmodifiableList(result.byteList_);\n }",
"public void addInventoryList(ArrayList<? extends Item> toAddList){\n\t\tinventoryList.addAll(toAddList);\n\t}",
"public Builder addInviteeIdsBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n ensureInviteeIdsIsMutable();\n inviteeIds_.add(value);\n onChanged();\n return this;\n }",
"public void addAll(String c) {\r\n int[] elements = new int[(c.length() / 2) + 1];\r\n for (int i = 0; i < elements.length; i++) {\r\n if (NumItems == MAX_LIST) {\r\n throw new ListFullException(\"List is Full!\");\r\n }\r\n elements[i] = Integer.parseInt(c.substring(0, c.indexOf(\",\")));\r\n c = c.substring((c.indexOf(\",\") + 1));\r\n items[++NumItems] = elements[i];\r\n }\r\n }",
"public ArrayBackedList(String ... strings) {\n insertArray(Arrays.asList(strings));\n }",
"@SuppressWarnings (\"unchecked\") public void addAll(ItemList list){\n items.addAll(list.items);\n }",
"public boolean addField(Document document, byte[] bytes) {\n boolean result = false;\n\n if (bytes != null) {\n result = true;\n document.add(new Field(label, bytes, store));\n }\n\n return result;\n }",
"public void cbListAddElement() {\n cbWorker.clear();\n cbWorker.add(cbJ);\n cbWorker.add(cbK);\n cbWorker.add(cbM);\n cbWorker.add(cbP);\n cbWorker.add(cbA);\n cbWorker.add(cbS);\n }",
"public void addBytes( final ByteBuffer _buffer ) {\n\n // sanity checks...\n if( isNull( _buffer ) )\n throw new IllegalArgumentException( \"Missing buffer to append from\" );\n if( _buffer.remaining() <= 0)\n throw new IllegalArgumentException( \"Specified buffer has no bytes to append\" );\n\n // figure out how many bytes we can append, and configure the source buffer accordingly...\n int appendCount = Math.min( buffer.capacity() - buffer.limit(), _buffer.remaining() );\n int specifiedBufferLimit = _buffer.limit();\n _buffer.limit( _buffer.position() + appendCount );\n\n // remember our old position, so we can put it back later...\n int pos = buffer.position();\n\n // setup to copy our bytes to the right place...\n buffer.position( buffer.limit() );\n buffer.limit( buffer.capacity() );\n\n // copy our bytes...\n buffer.put( _buffer );\n\n // get the specified buffer's limit back to its original state...\n _buffer.limit( specifiedBufferLimit );\n\n // get our position and limit to the right place...\n buffer.limit( buffer.position() );\n buffer.position( pos );\n }",
"public ArrayList<Integer> addStuff(ArrayList<Integer> list1, ArrayList<Integer> list2) {\n list1.addAll(list2);\n return list1;\n }",
"void addAll(intList list) throws IllegalAccessException;",
"public void putRawData(byte []bytes){\n\t\trawData=bytes;\n\t}",
"public void add(final Object value) {\n\t\tif (value == null) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tif (this.size == this.capacity) {\n\t\t\treallocate();\n\t\t}\n\t\telements[size] = value;\n\t\tsize++;\n\t}",
"public void addElements(List<T> elements) {\n this.elements.addAll(elements);\n }",
"private void addCertificate(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n ensureCertificateIsMutable();\n certificate_.add(value);\n }",
"public void add(final String... acceptMediaTypeStrings) {\n\t\tif (acceptMediaTypeStrings == null) {\n\t\t\treturn;\n\t\t}\n\t\tfor (String temp : acceptMediaTypeStrings) {\n\t\t\tadd(temp);\n\t\t}\n\t}",
"private void addTransactions(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n ensureTransactionsIsMutable();\n transactions_.add(value);\n }",
"@SuppressWarnings(\"rawtypes\")\n void addToArray(Pair<ArrayList<Object>> arr, Pair add)\n {\n arr.parsed.add(add.parsed);\n arr.unparsed = arr.unparsed.substring(0, arr.unparsed.length() - 1);\n if (arr.unparsed.length() > 1)\n arr.unparsed += \",\";\n arr.unparsed += add.unparsed + \"]\";\n }",
"@Override\n public void add(T t) {\n checkIfArrayFull();\n\n arrayList[elementsInArray] = t;\n elementsInArray++;\n }",
"@Override\n public void add(T element) {\n add(size(), element);\n }",
"public void insertNextBytes( byte[] buffer, int byteOffset, int nBytes )\n throws IndexOutOfBoundsException;",
"@Override\n\tpublic void add(Object value) {\n\t\tinsert(value, size);\n\t}"
] |
[
"0.77582264",
"0.69620895",
"0.682179",
"0.67500293",
"0.65584075",
"0.65515685",
"0.6531563",
"0.64893836",
"0.6484329",
"0.6448288",
"0.6338742",
"0.60432696",
"0.5931608",
"0.58385336",
"0.5686515",
"0.5673118",
"0.56147254",
"0.55760974",
"0.55683744",
"0.55221015",
"0.55032885",
"0.54950124",
"0.5423402",
"0.53720313",
"0.530164",
"0.52860576",
"0.5277756",
"0.52656883",
"0.5256517",
"0.52482253",
"0.521622",
"0.52071",
"0.51977146",
"0.5193309",
"0.5187517",
"0.51850426",
"0.51795655",
"0.51697683",
"0.51561856",
"0.51474404",
"0.50972635",
"0.5091981",
"0.508121",
"0.5063918",
"0.5052714",
"0.50515574",
"0.5045793",
"0.5044545",
"0.50412077",
"0.5035966",
"0.5008013",
"0.50075233",
"0.50068885",
"0.5005393",
"0.50043565",
"0.50010556",
"0.4983948",
"0.49832562",
"0.4965875",
"0.49502945",
"0.49459162",
"0.49415287",
"0.49308634",
"0.49252352",
"0.49236912",
"0.4898701",
"0.48910433",
"0.48894328",
"0.48863143",
"0.48737198",
"0.48609164",
"0.48581758",
"0.48536733",
"0.48528767",
"0.48474953",
"0.48468116",
"0.48464686",
"0.48331633",
"0.4827058",
"0.48255953",
"0.48105463",
"0.48030978",
"0.48014382",
"0.47930768",
"0.479298",
"0.47922733",
"0.47830075",
"0.47804868",
"0.47804686",
"0.47760257",
"0.47712147",
"0.476864",
"0.47638893",
"0.47550625",
"0.47530904",
"0.47521004",
"0.47517544",
"0.4751536",
"0.47476542",
"0.47415072"
] |
0.78435075
|
0
|
Converts the given ArrayList of Bytes into a primitive byte array.
|
public static byte[] convertArrayListToArray(ArrayList<Byte> bytes) {
// Define an array of size of bytes in array list
byte[] resultBytes = new byte[bytes.size()];
// Loop through the array list and add each byte to our primitive array
for (int i = 0; i < bytes.size(); i++) {
resultBytes[i] = bytes.get(i);
}
// Return the primitive array
return resultBytes;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"List<byte[]> asByteArrayList();",
"public static byte[] toArray(List<Byte> list) {\n byte[] bytes = new byte[list.size()];\n for (int i = 0; i < list.size(); i++)\n bytes[i] = list.get(i);\n return bytes;\n }",
"private static byte[] toByteArray(Collection<Byte> bytes) {\n\t\tbyte[] result = new byte[bytes.size()];\n\t\t\n\t\tint index = 0;\n\t\t\n\t\tfor (byte b : bytes) {\n\t\t\tresult[index++] = b;\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"List<Byte> getAsBytes();",
"public static ImmutableList<Byte> createByteList(int... bytes) {\n return ImmutableList.copyOf(Bytes.asList(createByteArray(bytes)));\n }",
"public static byte[] createByteForIdList(List<String> idList) {\r\n\t\tif(idList == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tint count = 0;\r\n\t\tfor(String id: idList){\r\n\t\t\tif(count >0){\r\n\t\t\t\tbuilder.append(COLUMN_ID_DELIMITER);\r\n\t\t\t}\r\n\t\t\t// the value must be a long\r\n\t\t\tlong value = KeyFactory.stringToKey(id);\r\n\t\t\tbuilder.append(value);\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\treturn builder.toString().getBytes(\"UTF-8\");\r\n\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t}",
"@ZenCodeType.Caster\n @ZenCodeType.Method\n default byte[] asByteArray() {\n //TODO this is actually sbyte[], but @Unsigned doesn't work on arrays right now\n return notSupportedCast(\"byte[]\");\n }",
"public abstract byte[] toByteArray();",
"public abstract byte[] toByteArray();",
"public static byte[] encode(ArrayList<Integer> nums)\n {\n //ArrayList<Byte> byteStream = new ArrayList<Byte>();\n int totalSize = 0;\n for(int i=0;i<nums.size();i++)\n {\n int n = nums.get(i);\n int sizeReq = 1;\n if(n < Math.pow(2, 7))\n sizeReq = 1;\n else if(n < Math.pow(2, 14))\n sizeReq = 2;\n else if(n < Math.pow(2, 21))\n sizeReq = 3;\n else if(n < Math.pow(2, 28))\n sizeReq = 4;\n totalSize += sizeReq;\n }\n byte totalArray[] = new byte[totalSize];\n int c = 0;\n for(int i=0;i<nums.size();i++)\n {\n byte array[] = encode(nums.get(i));\n //byteStream.addAll(array);\n for(int j=0;j<array.length;j++)\n totalArray[c++] = array[j];\n }\n return totalArray;\n }",
"public static byte[] b(int... array) {\n if (array == null) {\n return null;\n }\n byte[] ret = new byte[array.length];\n for (int i = 0; i < ret.length; i++) {\n ret[i] = (byte) array[i];\n }\n return ret;\n }",
"public static void addBytesToArray(byte[] bytes, ArrayList<Byte> array) {\n // Add each byte to the array\n // Array is an object, so passed by reference\n for (Byte b: bytes) {\n array.add(b);\n }\n }",
"public abstract byte[] toBytes() throws Exception;",
"public native byte[] __byteArrayMethod( long __swiftObject, byte[] arg );",
"boolean addAllByteArray(Collection<byte[]> c);",
"byte[] getBytes();",
"byte[] getBytes();",
"public byte[] int2byteArray(int[] ints){\n ByteBuffer buf = ByteBuffer.allocate(ints.length * Integer.BYTES);\n for (int i = 0; i < ints.length; i++) {\n buf.putInt(ints[i]);\n }\n\n return buf.array();\n }",
"public InputStreamToByteArray(byte buf[]) {\n this(buf, 0, buf.length);\n }",
"public byte[] toBytes () {\n return toTuple().toBytes();\n }",
"public static byte[] bytesToZipBytes(final List<Pair<String, byte[]>> contents) throws IOException {\n\n if (contents == null || contents.isEmpty()) {\n throw new IllegalArgumentException(\"Bytes must not be null\");\n }\n\n // Non zip file, needs to be zipped\n final ByteArrayOutputStream baos = new ByteArrayOutputStream();\n final ZipOutputStream zos = new ZipOutputStream(baos);\n for (final Pair<String, byte[]> content : contents) {\n appendBytes(zos, null, content.getFirst(), content.getSecond());\n }\n zos.close();\n\n return baos.toByteArray();\n\n }",
"private static byte[] toByteArray(int[] array) {\n final byte[] res = new byte[array.length];\n for (int i = 0; i < array.length; ++i) {\n final int value = array[i];\n res[i] = (byte) value;\n }\n return res;\n }",
"public byte[] getBytes() {\r\n\t\treturn mByteList;\r\n\t}",
"public static byte[] convertIntegersToBytes(int[] nums) {\n if (nums != null) {\n byte[] outputBytes = new byte[nums.length * 4];\n for(int i = 0, k = 0; i < nums.length; i++) {\n int integerTemp = nums[i];\n for(int j = 0; j < 4; j++, k++) {\n outputBytes[k] = (byte)((integerTemp >> (8 * j)) & 0xFF);\n }\n }\n return outputBytes;\n } else {\n return null;\n }\n }",
"public byte[] convertIntToByte(int[] intArr) throws IOException {\r\n byte[] byteArr = new byte[intArr.length];\r\n for(int i = 0; i < intArr.length; i++) {\r\n Integer tempInt = intArr[i];\r\n byte tempByte = tempInt.byteValue();\r\n byteArr[i] = tempByte;\r\n }\r\n return byteArr;\r\n }",
"public static List<String> createIdListFromBytes(byte[] idListBytes) {\r\n\t\tif(idListBytes == null) throw new IllegalArgumentException(\"idListBytes cannot be null\");\r\n\t\ttry {\r\n\t\t\tList<String> result = new LinkedList<String>();\r\n\t\t\tString string = new String(idListBytes, \"UTF-8\");\r\n\t\t\tif (string.isEmpty()) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tString[] split = string.split(COLUMN_ID_DELIMITER);\r\n\t\t\tfor(String stringId: split){\r\n\t\t\t\t// The value must be a long\r\n\t\t\t\tlong value = Long.parseLong(stringId);\r\n\t\t\t\tresult.add(Long.toString(value));\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t}",
"public byte[] toByteArray() \r\n {\r\n \tbyte newbuf[] = new byte[count];\r\n \tSystem.arraycopy(buf, 0, newbuf, 0, count);\r\n \treturn newbuf;\r\n }",
"public static byte[] toBytes(final long... numbers) {\n\t\tbyte[] bytes = new byte[numbers.length * 8];\n\t\tfor (int i = 0, j = 0; i < numbers.length; i++, j += 8) {\n\t\t\tSystem.arraycopy(toBytes(numbers[i]), 0, bytes, j, 8);\n\t\t}\n\t\treturn bytes;\n\t}",
"public byte [] createBytesRepresentation(){\n\t\n\t\tLinkedList<Byte> l = new LinkedList<Byte>();\n\t\taddBytesRep(vec[vec.length-1],l);\n\t\tfor (int i=vec.length-2; i>=0; i--){\n\t\t\taddBytesRep(vec[i]-vec[i+1],l);\n\t\t\t\n\t\t}\n\t\t\n\t\tbyte [] bytesRep = new byte[l.size()];\n\t\t\n\t\tListIterator<Byte> iterator = l.listIterator(); \n\t\tint c=0;\n\t\twhile (iterator.hasNext()){\n\t\t\tbytesRep[c++]=iterator.next();\n\t\t}\n\t\treturn bytesRep;\n\t}",
"public static void serializeElement(ArrayList<Byte> arrlist, Element e) {\n\t\tbyte[] arr_e = e.toBytes();\n\t\tserializeUint32(arrlist, arr_e.length);\n\t\tbyteArrListAppend(arrlist, arr_e);\n\t}",
"public byte[] toByteArray() {\n byte[] array = new byte[count];\n System.arraycopy(buf, 0, array, 0, count);\n return array;\n }",
"public byte[] marshall();",
"public static byte[] createByteArray(int... bytes) {\n byte[] array = new byte[bytes.length];\n for (int i = 0; i < array.length; i++) {\n Assertions.checkState(0x00 <= bytes[i] && bytes[i] <= 0xFF);\n array[i] = (byte) bytes[i];\n }\n return array;\n }",
"public byte[] toByteArray() {\n ByteBuffer buf = ByteBuffer.allocate(blockSize);\n for (Record record : records) {\n buf.put(record.isEmpty() ? (byte) 1 : (byte) 0);\n buf.put(new String(record.getTconst()).getBytes(StandardCharsets.US_ASCII));\n buf.putFloat(record.getAvgRating());\n buf.putInt(record.getNumVotes());\n }\n return buf.array();\n }",
"public static byte[] serializeList(List<Tuple> list) throws NullPointerException, ABICodecException {\n if (null == list) {\n throw new NullPointerException();\n }\n try {\n ByteBuffer buffer = ByteBuffer.allocate(BUFFER_SIZE);\n for (Tuple elt : list) {\n writeTupleToBuffer(buffer, elt);\n }\n \n // Convert this into a byte[] of the appropriate size;\n int length = buffer.position();\n byte[] populated = new byte[length];\n System.arraycopy(buffer.array(), 0, populated, 0, populated.length);\n return populated;\n } catch (Throwable t) {\n // If we fail to serialize this data, it is a codec exception.\n throw new ABICodecException(\"Failed to serialize data\", t);\n }\n }",
"public java.util.List<java.lang.Integer> getByteListList() {\n return java.util.Collections.unmodifiableList(result.byteList_);\n }",
"public static void padWithBytes(ArrayList<Byte> array, int padCount) {\n for (int i = 0; i < padCount; i++) {\n array.add((byte)0);\n }\n }",
"private static final byte[] longToByteArray(long l) {\n\t\tbyte[] retVal = new byte[8];\n\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tretVal[i] = (byte) l;\n\t\t\tl >>= 8;\n\t\t}\n\n\t\treturn retVal;\n\t}",
"public IntArr_byteArrArr(int[] integers, byte[][] byteArrArr) {\n\t\tsuper();\n\t\tassert integers.length == byteArrArr.length;\n\t\tint byteLength=byteArrArr[0].length;\n\t\tfor(byte[] onebyteArr:byteArrArr){//each element in byteArrArr should be equal length!\n\t\t\tassert byteLength == onebyteArr.length;\n\t\t}\n\t\tthis.integers = integers;\n\t\tthis.byteArrArr = byteArrArr;\n\t}",
"public byte[] getByteArray() {\n long val = getValue();\n return new byte[] {\n (byte)((val>>24) & 0xff),\n (byte)((val>>16) & 0xff),\n (byte)((val>>8) & 0xff),\n (byte)(val & 0xff) };\n }",
"static byte[] toArray(int value) {\n return new byte[] {\n (byte) (value >> 24),\n (byte) (value >> 16),\n (byte) (value >> 8),\n (byte) value };\n }",
"private static byte[] toBytes(Object sdkBytes) {\n return ((SdkBytes) sdkBytes).asByteArrayUnsafe();\n }",
"public ArrayList<Object> convertAll(byte[] input) {\n record = input;\n ArrayList<Object> result = new ArrayList<Object>();\n result.add(accelConversion());\n result.add(lightConversion());\n result.add(tempConversion());\n result.add(externalConversion());\n\n return result;\n }",
"ByteArray(byte []a) {\n\tdata = a;\n }",
"public native static long getConvertBytes();",
"public List<Byte> getByteList(final String key, final List<Byte> defaultValue) {\n return getList(Byte.class, key, defaultValue);\n }",
"public static byte[] convertInt8(int v)\r\n {\r\n byte[] bytes = new byte[1];\r\n bytes[0] = (byte) v;\r\n return bytes;\r\n }",
"public byte[] getAllBytes() {\n return nativeGetAllBytes(__nativePtr);\n }",
"public static List<Byte> encode(List<Byte> l) {\r\n List<Byte> output = new ArrayList<>();\r\n byte lastByte = 0;\r\n int ocount = 0;\r\n\r\n for (Byte b : l) {\r\n ArgumentChecker.requireNonNegative(b);\r\n\r\n /*\r\n * since we can only use negative byte values as indicator, we can\r\n * only encode 130 consecutive occurrences at once.\r\n */\r\n if (b == lastByte && ocount < LONGEST_RUN)\r\n ocount++;\r\n else {\r\n output.addAll(encodedBytes(ocount, lastByte));\r\n lastByte = b;\r\n ocount = 1;\r\n }\r\n }\r\n output.addAll(encodedBytes(ocount, lastByte));\r\n\r\n return Collections.unmodifiableList(output);\r\n }",
"public byte[] toBytes() {\n return toProtobuf().toByteArray();\n }",
"private static byte[] intArray2ByteArray (int[] src)\n\t{\n\t\tbyte[] dst = new byte [src.length];\n\t\tfor (int i = 0; i < src.length; ++ i)\n\t\t\tdst[i] = (byte) src[i];\n\t\treturn dst;\n\t}",
"public byte[] getBytes() {\n return baos.toByteArray();\n }",
"public static Serializable deserialize(List<Byte> data) throws ClassNotFoundException, IOException {\n\t\tbyte[] bs = new byte[data.size()];\n\t\tfor (int i = 0; i < bs.length; i++) {\n\t\t\tbs[i] = data.get(i);\n\t\t}\n\t\treturn deserialize(bs);\n\t}",
"private static JSONArray arrayFromBytes(ByteBuffer bytes) throws JSONException{\n\t\tJSONArray json = new JSONArray();\n\t\tint length = bytes.getInt();\n\t\tfor (int i = 0; i < length; i++){\n\t\t\t//Object value = valueFromBytes(bytes);\n\t\t\t//json.put(value);\n\t\t\t//Get value\n\t\t\tbyte type = bytes.get();\n\t\t\tswitch(type){\n\t\t\tcase MAP_INDICATOR:\n\t\t\t\tjson.put(mapFromBytes(bytes));\n\t\t\t\tbreak;\n\t\t\tcase ARRAY_INDICATOR:\n\t\t\t\tjson.put(arrayFromBytes(bytes));\n\t\t\t\tbreak;\n\t\t\tcase STRING_INDICATOR:\n\t\t\t\tint lengthString = bytes.getInt();\n\t\t\t\tbyte[] stringBytes = new byte[lengthString];\n\t\t\t\tbytes.get(stringBytes, 0, lengthString);\n\t\t\t\tjson.put(new String(stringBytes));\n\t\t\t\tbreak;\n\t\t\tcase INTEGER_INDICATOR:\n\t\t\t\tjson.put(bytes.getInt());\n\t\t\t\tbreak;\n\t\t\tcase LONG_INDICATOR:\n\t\t\t\tjson.put(bytes.getLong());\n\t\t\t\tbreak;\n\t\t\tcase DOUBLE_INDICATOR:\n\t\t\t\tjson.put(bytes.getDouble());\n\t\t\t\tbreak;\n\t\t\tcase FLOAT_INDICATOR:\n\t\t\t\tjson.put(bytes.getFloat());\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new JSONException(\"Tried to decode unknown type from byte array!\");\n\t\t\t}\n\t\t}\n\t\treturn json;\n\t}",
"@Override // c.d.a.m.w.b.AbstractC0024b\n public ByteBuffer b(byte[] bArr) {\n return ByteBuffer.wrap(bArr);\n }",
"public static String arrayToBinaryString(final byte[] bytes)\n\t{\n\t\tfinal StringBuilder builder = new StringBuilder();\n\t\tbuilder.append(Long.toBinaryString((char)bytes[0]));\n\t\tfor(int i = 1; i < bytes.length; i ++)\n\t\t\tbuilder.append(BYTE_DELIMITER+Long.toBinaryString((char)bytes[i]));\n\t\treturn builder.toString();\n\t}",
"void mo4520a(byte[] bArr);",
"private static byte[] get(ByteIterable bytes, boolean copy) {\n final int len = bytes.getLength();\n final byte[] data = bytes.getBytesUnsafe();\n if (data.length == len && !copy)\n return data;\n final byte[] result = new byte[len];\n System.arraycopy(data, 0, result, 0, len);\n return result;\n }",
"public /*byte[]*/String BinaryCaster(Object item){\n String Sitem = Integer.toBinaryString((int)item);\n //byte[] b = new byte[Sitem.length()];\n //for(int i=0;i<Sitem.length();i++){\n // b[i] = (byte)Sitem.charAt(i);\n //}\n //return b;\n return Sitem;\n }",
"void mo12206a(byte[] bArr);",
"public static HashSet<Integer> getUniqueBytes(ArrayList<Integer> bytes){\n HashSet<Integer> uniqBites = new HashSet<>();\n uniqBites.addAll(bytes);\n return uniqBites;\n }",
"public byte[] toByteArray() {\n byte[] retour;\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n try {\n ObjectOutputStream oos = new ObjectOutputStream(bos);\n oos.writeObject(new String(hostID));\n oos.writeObject(new Integer(hostAddresses.size()));\n for (int i=0; i<hostAddresses.size(); i++) oos.writeObject(new String(hostAddresses.elementAt(i).getNormalizedAddress()));\n oos.writeObject(new Integer(cpuLoad));\n oos.writeObject(new Integer(memoryLoad));\n oos.writeObject(new Integer(batteryLevel));\n oos.writeObject(new Integer(numberOfThreads));\n oos.writeObject(new Integer(numberOfBCs));\n oos.writeObject(new Integer(numberOfConnectors));\n oos.writeObject(new Integer(numberOfConnectorsNetworkInputs));\n oos.writeObject(new Integer(numberOfConnectorsNetworkOutputs));\n oos.writeObject(new Integer(networkPFInputTraffic));\n oos.writeObject(new Integer(networkPFOutputTraffic));\n oos.writeObject(new Integer(networkApplicationInputTraffic));\n oos.writeObject(new Integer(networkApplicationOutputTraffic));\n retour = bos.toByteArray();\n }\n catch (IOException ioe) {\n System.err.println(\"Error converting a host status to byte array\");\n retour = null;\n }\n return retour;\n }",
"@Override\n\tpublic byte[] toByteArray() {\n\t\tComparatorProtos.ByteArrayComparable.Builder builder = ComparatorProtos.ByteArrayComparable.newBuilder();\n\t\tbuilder.setValue(ByteString.copyFrom(getValue()));\n\t\treturn builder.build().toByteArray();\n\t}",
"static private byte[] toBytes(\n ASN1OctetString[] octs)\n {\n ByteArrayOutputStream bOut = new ByteArrayOutputStream();\n\n for (int i = 0; i != octs.length; i++)\n {\n try\n {\n bOut.write(octs[i].getOctets());\n }\n catch (IOException e)\n {\n throw new IllegalArgumentException(\"exception converting octets \" + e.toString());\n }\n }\n\n return bOut.toByteArray();\n }",
"public byte[] toByteArray() {\n\t\treturn baos.toByteArray();\n\t}",
"private String toBinary( byte[] bytes )\n\t{\n \t\tStringBuilder sb = new StringBuilder(bytes.length * Byte.SIZE);\n\t\tfor( int i = 0; i < Byte.SIZE * bytes.length; i++ )\n\t\t\tsb.append((bytes[i / Byte.SIZE] << i % Byte.SIZE & 0x80) == 0 ? '0' : '1');\n\t\treturn sb.toString();\n\t}",
"private PyObject[] listtoarray(ArrayList<PyObject> a)\n {\n PyObject[] results = new PyObject[a.size()];\n int iter = 0;\n for (PyObject pt : a) {\n results[iter] = pt;\n iter++;\n }\n return results;\n }",
"private byte[] decode(ByteBuffer bytes) {\n \treturn bytes.array();\r\n }",
"void writeBytes(byte[] value);",
"public Data(ArrayList<Object> list) {\n try {\n int n = list.size();\n if (n == 0) throw new Exception(\"Specified argument for Data constructor is an empty ArrayList\");\n this.data = new ArrayList<Byte>();\n\n for (int i = 0; i < n; i++) {\n Object o = list.get(i);\n if (o instanceof Byte) {\n byte b = (byte) o;\n this.data.add(b);\n } else if (o instanceof Integer) {\n int v = (int) o;\n for (int j = 0; j < 4; j++) {\n int b = 0;\n for (int k = 0; k < 8; k++) {\n b = b << 1;\n int x = (3 - j) * 8 + (7 - k);\n int c = (v >> x) & 1;\n b = b | c;\n }\n byte d = (byte) b;\n this.data.add(d);\n }\n } else // support for other formats (eg. Double) may be added\n {\n throw new Exception(\"Specified argument for Data constructor contains Objects that are not supported yet\");\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n }",
"public byte[] l2b(long value) {\n byte[] data = new byte[8];\n data[0] = (byte) ((value >> 56) & 0xFF);\n data[1] = (byte) ((value >> 48) & 0xFF);\n data[2] = (byte) ((value >> 40) & 0xFF);\n data[3] = (byte) ((value >> 32) & 0xFF);\n data[4] = (byte) ((value >> 24) & 0xFF);\n data[5] = (byte) ((value >> 16) & 0xFF);\n data[6] = (byte) ((value >> 8) & 0xFF);\n data[7] = (byte) (value & 0xFF);\n return data;\n }",
"public void sendByteObjsByteIds(byte[] objCodes, byte[] ids) {\n\t\tsendByteObjsByteIds(objCodes, ids, clientNames);\n\t}",
"public byte[] getAsBytes() {\n return (byte[])data;\n }",
"public List<Byte> getByteList(final String key) {\n return getByteList(key, new ArrayList<>());\n }",
"public static int readBytesForList(byte[] byteBuffer) {\n List<Integer> message = new ArrayList<>();\n String guess = \"\";\n for (int i = 0; i < byteBuffer.length; i++) {\n guess += byteBuffer[i];\n }\n int decoded = Integer.parseInt(guess);\n return decoded;\n }",
"public Base64Binary(byte[] bytes) throws NumberFormatException {\r\n\t\tif (bytes == null) {\r\n\t\t\tthrow new NumberFormatException(\"parameter can not be null for Base64Binary\");\r\n\t\t}\r\n\r\n\t\t// validate 'base64Binary' type which is defined in W3C schema\r\n\t\t// http://www.w3.org/TR/xmlschema-2/#base64Binary\r\n\t\tif (!W3CSchemaType.isValid(\"base64Binary\", Base64.encode(bytes))) {\r\n\t\t\tthrow new NumberFormatException(\"parameter is invalid for datatype base64Binary\");\r\n\t\t}\r\n\t\tmByteList = bytes;\r\n\t}",
"public static byte[] getBytes(long value) {\r\n\t\treturn ByteBuffer.allocate(8).order(ByteOrder.LITTLE_ENDIAN).putLong(value).array();\r\n\t}",
"@Override\r\n\tpublic byte[] getBytes() {\n\t\treturn buffer.array();\r\n\t}",
"public static byte[] getLongAsBytes(long l) {\n\t\treturn new byte[] {\n\t\t\t\t(byte) (l >> 56),\n\t\t\t\t(byte) (l >> 48),\n\t\t\t\t(byte) (l >> 40),\n\t\t\t\t(byte) (l >> 32),\n\t\t\t\t(byte) (l >> 24),\n\t\t\t\t(byte) (l >> 16),\n\t\t\t\t(byte) (l >> 8),\n\t\t\t\t(byte) l\n\t\t\t};\n\t}",
"byte[] toByteArray(ORecordVersion version);",
"public byte[] toByteArray() throws Exception {\n int size = getSize();\n if (size == 0) {\n return null;\n }\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n CCompatibleOutputStream os = new CCompatibleOutputStream(byteStream);\n write(os);\n return byteStream.toByteArray();\n }",
"public Bytes32Snapshot(byte[] elements) {\n\t\tif (elements == null)\n\t\t\tthrow new IllegalArgumentException(\"Expected a non-null array of elements\");\n\t\tif (elements.length != length)\n\t\t\tthrow new IllegalArgumentException(\"Expected \" + length + \" elements, but got \" + elements.length);\n\n\t\tbyte0 = elements[0];\n\t\tbyte1 = elements[1];\n\t\tbyte2 = elements[2];\n\t\tbyte3 = elements[3];\n\t\tbyte4 = elements[4];\n\t\tbyte5 = elements[5];\n\t\tbyte6 = elements[6];\n\t\tbyte7 = elements[7];\n\t\tbyte8 = elements[8];\n\t\tbyte9 = elements[9];\n\t\tbyte10 = elements[10];\n\t\tbyte11 = elements[11];\n\t\tbyte12 = elements[12];\n\t\tbyte13 = elements[13];\n\t\tbyte14 = elements[14];\n\t\tbyte15 = elements[15];\n\t\tbyte16 = elements[16];\n\t\tbyte17 = elements[17];\n\t\tbyte18 = elements[18];\n\t\tbyte19 = elements[19];\n\t\tbyte20 = elements[20];\n\t\tbyte21 = elements[21];\n\t\tbyte22 = elements[22];\n\t\tbyte23 = elements[23];\n\t\tbyte24 = elements[24];\n\t\tbyte25 = elements[25];\n\t\tbyte26 = elements[26];\n\t\tbyte27 = elements[27];\n\t\tbyte28 = elements[28];\n\t\tbyte29 = elements[29];\n\t\tbyte30 = elements[30];\n\t\tbyte31 = elements[31];\n\t}",
"void mo1751a(byte[] bArr);",
"@Override\n default List<FieldElement> deserializeList(byte[] bytes) {\n List<CompT> wrongType = getSerializer().deserializeList(bytes);\n return wrongType.stream().map(x -> (FieldElement) x).collect(Collectors.toList());\n }",
"public int[] byte2intArray(byte[] bytes){\n ByteBuffer buf = ByteBuffer.wrap(bytes);\n\n int[] result = new int[bytes.length / Integer.BYTES];\n for (int i = 0; i < result.length; i++) {\n result[i] = buf.getInt();\n }\n\n return result;\n }",
"public static byte[] valueToBytes(Object value) throws JSONException, IOException {\n if (value == null || value.equals(null)) {\n return Constants.NullByteMarker;\n }\n \t// return raw bytes is value is byte[] - else use normal json string conversion\n if (value instanceof byte[]) {\n \treturn (byte[])value;\n }\n \n if (value instanceof long[]) {\n \treturn Util.UTF8(longArrayString((long[])value));\n }\n \n if (value instanceof JSONString) {\n Object o;\n try {\n o = ((JSONString)value).toJSONString();\n } catch (Exception e) {\n throw new JSONException(e);\n }\n if (o instanceof String) {\n return Util.UTF8(o);\n }\n throw new JSONException(\"Bad value from toJSONString: \" + o);\n }\n if (value instanceof Number) {\n return Util.UTF8(JSONObject.numberToString((Number) value));\n }\n if (value instanceof Boolean || value instanceof JSONObject ||\n value instanceof JSONArray) {\n return Util.UTF8(value);\n }\n if (value instanceof Map) {\n return Util.UTF8(new JSONObject((Map)value));\n }\n if (value instanceof JSONList) {\n return ((JSONList)value).getBytes().makeExact().bytes();\n }\n if (value instanceof List) {\n return new JSONList((List)value).getBytes().makeExact().bytes();\n }\n if (value instanceof Collection) {\n return Util.UTF8(new JSONArray((Collection)value));\n }\n if (value.getClass().isArray()) {\n return Util.UTF8(new JSONArray(value));\n }\n return Util.UTF8(JSONObject.quote(value.toString()));\n }",
"public List<BigInteger> convertIntegerList(List<Integer> alist){\n\t\tList<BigInteger> blist = new ArrayList<BigInteger>(alist.size());\n\t\tfor(int i=0; i < alist.size(); i++){\n\t\t\tblist.add( BigInteger.valueOf( alist.get(i).intValue() ) );\n\t\t}\n\t\t\n\t\treturn blist;\n\t}",
"public static byte[] longToBytes(long l) {\n\n ByteBuffer byteBuffer = ByteBuffer.allocate(NUM_BYTES_IN_LONG);\n byteBuffer.putLong(l);\n return byteBuffer.array();\n\n }",
"public Object[] toRawArray();",
"byte[] getEByteArray();",
"private byte[] intToByteArray(int i) {\n ByteBuffer bbf = ByteBuffer.allocate(4)\n .order(ByteOrder.LITTLE_ENDIAN)\n .putInt(i);\n return bbf.array();\n }",
"public byte[] toByteArray() {\n/* 510 */ ByteBuffer buff = ByteBuffer.allocate(40).order(ByteOrder.LITTLE_ENDIAN);\n/* 511 */ writeTo(buff);\n/* 512 */ return buff.array();\n/* */ }",
"public void sendByteObjsByteIds(byte[] objCodes, byte[] ids, List<String> clientNames) {\n\t\tServerMessage serverMessage = new ServerMessage(getId(), SpaceProtocol.SET_BYTE_OBJS_BYTE_IDS);\n\t\tbyte numObjs = (byte) objCodes.length;\n\t\tserverMessage.put(numObjs);\n\t\tDGSLogger.log(\"Space.sendByteObjsByteIds num objs: \" + numObjs);\n\t\tfor (byte i = 0; i < numObjs; i++) {\n\t\t\tDGSLogger.log(\"objCode, i: \" + i + \" code: \" + objCodes[i]);\n\t\t\tserverMessage.put(objCodes[i]);\n\t\t}\n\t\tfor (byte i = 0; i < numObjs; i++) {\n\t\t\tDGSLogger.log(\"objId, i: \" + i + \" id: \" + ids[i]);\n\t\t\tserverMessage.put(ids[i]);\n\t\t}\n\t\tserverMessage.sendClientMessage(clientNames);\n\t}",
"byte[] IntToByte(int i)\r\n {\r\n return Integer.toString(i).getBytes();\r\n }",
"public byte[] toArray()\r\n {\r\n return _stream.toByteArray();\r\n }",
"@Override\n public byte [] toArray()\n \n {\n final int size = size();\n final byte [] array = \n new byte [size]; \n \n\n int i = 0;\n for (ByteCursor c : this)\n {\n array[i++] = c.value;\n }\n return array;\n }",
"boolean addAllByteString(Collection<? extends ByteString> c);",
"java.util.List<com.google.protobuf.ByteString> getDataList();",
"java.util.List<com.google.protobuf.ByteString> getDataList();",
"public static String arrayListToString(ArrayList<Integer> arraylist) {\n\t\tString ss = null;\n\t\tbyte [] bb = new byte[arraylist.size()];\n\t\tfor (int i = 0; i < arraylist.size(); i++) {\n\t\t\tbb[i] = (byte) (arraylist.get(i) & 0xff);\n\t\t}\n\t\tss = byteArrayToHexString(bb);\n\t\treturn ss;\n\t}"
] |
[
"0.79652303",
"0.7758023",
"0.73863035",
"0.71525687",
"0.66786873",
"0.6543757",
"0.6219014",
"0.62024623",
"0.62024623",
"0.6186709",
"0.61816835",
"0.6172206",
"0.61600906",
"0.59644985",
"0.592836",
"0.59054744",
"0.59054744",
"0.58770686",
"0.58741134",
"0.5846367",
"0.5807222",
"0.57585263",
"0.5753169",
"0.5738719",
"0.57167053",
"0.5660531",
"0.56515604",
"0.5638589",
"0.56283",
"0.56195855",
"0.56164074",
"0.5610121",
"0.56069386",
"0.56013054",
"0.5601079",
"0.5598867",
"0.55943143",
"0.559226",
"0.558499",
"0.55795556",
"0.55388033",
"0.5537409",
"0.5481852",
"0.5457775",
"0.54281974",
"0.5416051",
"0.54078835",
"0.53978086",
"0.53858274",
"0.53796",
"0.536986",
"0.5320283",
"0.53132063",
"0.53001076",
"0.5269908",
"0.5267008",
"0.5266874",
"0.5258796",
"0.52564234",
"0.5253846",
"0.52457726",
"0.52429163",
"0.5241168",
"0.5234618",
"0.5228942",
"0.5215918",
"0.52056944",
"0.5183943",
"0.51821715",
"0.51756775",
"0.5172845",
"0.5171645",
"0.51660335",
"0.5165755",
"0.5158272",
"0.5156628",
"0.5155567",
"0.5151631",
"0.51514053",
"0.5146306",
"0.51420885",
"0.51366985",
"0.51338273",
"0.51288384",
"0.5128672",
"0.5114957",
"0.5112706",
"0.5111503",
"0.51059186",
"0.5098944",
"0.5097255",
"0.50948685",
"0.50916415",
"0.50913155",
"0.5090854",
"0.5085263",
"0.5084045",
"0.5081362",
"0.5081362",
"0.5077615"
] |
0.8215567
|
0
|
Pads the given array list with the given number of 0s
|
public static void padWithBytes(ArrayList<Byte> array, int padCount) {
for (int i = 0; i < padCount; i++) {
array.add((byte)0);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void pad( int count )\r\n\t{\r\n\t\tfinal int capacity = entities.length;\r\n\t\t\r\n\t\tif ( size + count >= capacity )\r\n\t\t{\r\n\t\t\tint nextSize = capacity + (capacity >> 1);\r\n\t\t\tint minimumSize = size + count;\r\n\t\t\t\r\n\t\t\tentities = Arrays.copyOf( entities, Math.max( nextSize, minimumSize ) );\r\n\t\t}\r\n\t}",
"private static void PushZerosToEnd(int[] arr, int n) {\n\t\n\t\tint count=0;\n\t\tfor(int i=0;i<n;i++) \n\t\t\tif(arr[i]!=0)\n\t\t\t\tarr[count++]=arr[i];\n\t\t\n\t\twhile(count<n)\n\t\t{\n\t\t\tarr[count++]=0;\n\t\t}\n\t}",
"static void moveZerosToEnd(int[] arr) {\n // Write your code here\n int n = arr.length;\n int count=0;\n for (int i = 0; i < n; i++)\n if (arr[i] != 0)\n arr[count++] = arr[i];\n while (count < n)\n arr[count++] = 0;\n }",
"private String padZeros(String binary, int size) {\n String outString = binary;\n for (int i = 0; i < size - binary.length(); i++) {\n outString = \"0\" + outString;\n }\n return outString;\n }",
"private String pad(String s, int l){ String p=\"\"; for(int i=0; i<l-s.length();i++)p+=\" \"; return \" \"+p+s; }",
"private static String leftPadZeroes(String s, int nZeroes){\r\n if (s.indexOf(\".\") == -1) {\r\n s = String.format(\"%\" + String.valueOf(nZeroes) +\"s\", s);\r\n } else {\r\n s = String.format(\"%\" + String.valueOf(s.length() - s.indexOf(\".\") + nZeroes) +\"s\", s);\r\n }\r\n s = s.replace(\" \", \"0\");\r\n\r\n return s;\r\n }",
"public void moveZeroes2(int[] nums) {\n int zeroCount = 0;\n int lastZeroIndex = 0;\n for(int i = 0; i < nums.length; i++) {\n if( nums[i] != 0 && zeroCount > 0) {\n nums[lastZeroIndex++] = nums[i];\n nums[i] = 0; //lazy swap, just making it 0\n zeroCount--;\n }\n if( nums[i] == 0 ) {\n if(zeroCount == 0)\n lastZeroIndex = i;\n zeroCount++;\n }\n }\n }",
"public void makeEmpty() {\r\n\t\tArrays.fill(list, -1);\r\n\t}",
"public void fillSorted()\n {\n for (int i=0; i<list.length; i++)\n list[i] = i + 2;\n }",
"private static String padWithZeros(int i, int len) {\r\n\t\tString s = Integer.toString(i);\r\n\t\tif (s.length() > len) {\r\n\t\t\treturn s.substring(0, len);\r\n\t\t}\r\n\t\telse if (s.length() < len) {\t// pad on left with zeros\r\n\t\t\treturn \"000000000000000000000000000\".substring(0, len - s.length()) + s;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn s;\r\n\t\t}\r\n\t}",
"public static void moveZeroesDFP(int[] nums) {\n int l = 0;\n int r = nums.length - 1;\n while (l < r) {\n if (nums[l] == 0) {\n int temp = nums[l];\n nums[l] = nums[r];\n nums[r] = temp;\n r--;\n } else {\n l++;\n }\n }\n }",
"public void moveZeroes(int[] nums) \n {\n if ( nums == null || nums.length < 2 ) return;\n \n int pivot = nums.length - 1;\n int curr = 0;\n while ( curr < pivot )\n {\n if ( nums[curr] == 0 )\n {\n shiftLeft(nums, curr);\n pivot--;\n }\n else\n {\n curr++;\n }\n }\n }",
"public void moveZeroes(int[] nums) {\n int current = 0, last = 0;\n int temp = 0;\n while(current < nums.length){\n if(nums[current] != 0){\n if(nums[last] != 0){\n last++;\n }\n else{\n if(current != last){\n nums[last] = nums[current];\n nums[current] = 0;\n last++;\n }\n }\n }\n current++;\n }\n}",
"static void move_1 (int[] nums) {\n\t\t\n\t\tint j = 0;\n\t\t\n\t\t// Copy all non 0 numbs to start of arry \n\t\t// j will keep count of nums of zeros \n\t\tfor(int i=0; i< nums.length; i++) {\n\t\t\t\n\t\t\tif(nums[i] != 0) {\n\t\t\t\tnums[j] = nums[i];\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// add j number of zeros to end of array\n\t\tfor(int i=j ; i<nums.length; i++) {\n\t\t\t\n\t\t\tnums[i] = 0;\n\t\t}\n\t\t\n\t}",
"public void moveZeroes(int[] nums) {\n\t\tint savePoint = nums.length, temp = 0;\n\n\t\tfor (int i = 0; i < savePoint;) {// 1\n\t\t\tif (nums[i] == 0) {\n\t\t\t\ttemp = i; // 0 1 2 3 4\n\t\t\t\twhile (temp < savePoint - 1) {// 0<4\n\t\t\t\t\tnums[temp] = nums[temp + 1];// {1,0,3,12}\n\t\t\t\t\ttemp++;\n\t\t\t\t}\n\t\t\t\tnums[temp] = 0;\n\t\t\t\tsavePoint--;\n\t\t\t} else {\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t}",
"public static void setZero() {\r\n\t\tint i = 0;\r\n\t\twhile(i < memSize / 4) {\r\n\t\t\tbank0[i] = \"000000000000000000000000\";\r\n\t\t\tbank1[i] = \"000000000000000000000000\";\r\n\t\t\tbank2[i] = \"000000000000000000000000\";\r\n\t\t\tbank3[i] = \"000000000000000000000000\";\r\n\t\t\ti++;\r\n\t\t}\r\n\t}",
"public void moveZeroes(int[] nums) {\n if (nums == null || nums.length == 0) {\n return;\n }\n\n int point = 0;\n for (int i = 0; i < nums.length; i++) {\n if (nums[i] != 0) {\n nums[point++] = nums[i];\n }\n }\n\n while (point < nums.length) {\n nums[point++] = 0;\n }\n }",
"public void moveZeroes(int[] nums) {\n\n if (nums == null || nums.length == 0 || nums.length == 1) {\n return;\n }\n\n int pos = 0;\n\n int i = 0;\n while (i < nums.length) {\n if (nums[i] != 0) {\n nums[pos] = nums[i];\n if (pos != i) {\n nums[i] = 0;\n }\n pos++;\n }\n i++;\n }\n\n\n }",
"void makeZero(){\n nnz = 0;\n for(int i=0; i<this.matrixSize; i++){\n this.rows[i] = new List();\n }\n }",
"private void removeLeadingZeroes() {\n // Iterate the number until that appears a number greater than 0\n while (number.size() > 0 && number.get(number.size() - 1) == 0) {\n number.remove(number.size() - 1);\n }\n\n // If the list is empty so the number is zero\n if (number.isEmpty()) {\n number.add(0);\n isPositive = true;\n }\n }",
"private static List<Integer> addOnePlus(List<Integer> input) {\n\n\t\tint size = input.size();\n\t\tinput.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && input.get(i)==10; i--) {\n\t\t\tinput.set(i, 0);\n\t\t\tinput.set(i-1, input.get(i-1)+1);\n\t\t}\n\n\t\tif(input.get(0) == 10) {\n\t\t\tinput.set(0, 0);\n\t\t\tinput.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn input;//this modifies the original input\n\t}",
"private static void zero(int[] x)\n {\n for (int i = 0; i != x.length; i++)\n {\n x[i] = 0;\n }\n }",
"public void shiftLeft(int[] nums, int zeroIndex)\n {\n // shift everything 1 to the left\n for ( int i = zeroIndex; i < nums.length - 1; i++)\n {\n nums[i] = nums[i+1];\n }\n \n // put zero at last\n nums[nums.length-1] = 0;\n }",
"public static void sort(int[] arr)\n {\n // count number of 0's\n int count = 0;\n for (int value: arr)\n {\n if (value == 0) {\n count++;\n\n }\n }\n //System.out.println(count);\n // put 0's at the beginning\n int i = 0;\n while (count-- != 0) {\n arr[i] = 0;\n i++;\n }\n //System.out.println(i);\n\n // fill all remaining elements by 1\n while (i < arr.length) {\n arr[i] = 1;\n i++;\n }\n }",
"public static void pad(TimeSeriesTable table, int numRowsToPrependAndAppend) {\n opensimCommonJNI.TableUtilities_pad(TimeSeriesTable.getCPtr(table), table, numRowsToPrependAndAppend);\n }",
"public static void updatePaddingRow(List<String> list) {\n for (int i = 0; i < list.size(); i++) {\n updatePaddingItem(list.get(i), i + 1);\n }\n }",
"public static void makeBlanks(char[] list) {\n\t\tfor (int i = 0; i < list.length; i++) {\n\t\t\tlist[i] = '*';\n\t\t}\n\t}",
"public static String addLeadingZeros(Number numeric,int nbLength)\n {\n Double theNumerDbl = toDoubleObj(numeric);\n Integer theNumerInt = theNumerDbl.intValue();\n String thePattern = \"%0\"+nbLength+\"d\";\n return String.format(thePattern, theNumerInt);\n }",
"public static void makeRowsCols0(int [][]input) {\n\t\tint previ=-1,prevj=-1;\n\t\tfor(int i=0;i<input.length;i++)\n\t\t{\n\t\t\tfor(int j=0;j<input[0].length;j++)\n\t\t\t{\n\t\t\t\tif(input[i][j]==0)\n\t\t\t\t{\t\n\t\t\t\t\tif(i!=previ&&j!=prevj)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int k=0;k<input.length;k++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinput[k][j]=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(int k=0;k<input[0].length;k++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinput[i][k]=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tprevi=i;\n\t\t\t\t\t\tprevj=j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static int[] moveZero(int[] nums) {\n int j = 0; // This pointer is similar to quick sort?\n for (int i = 0; i < nums.length; i++) {\n if (nums[i] != 0) {\n int tmp = nums[i];\n nums[i] = nums[j];\n nums[j] = tmp;\n j++;\n }\n System.out.println(Arrays.toString(nums));\n }\n return nums;\n }",
"public static void moveZeroes(int[] nums) {\n\t\tint zeroPointer = -1;\n \n for(int i = 0; i < nums.length; i++)\n {\n \t//zero is occurring the first time\n \tif(nums[i] == 0 && zeroPointer == -1){\n zeroPointer = i;\n }\n \t//non zero is occurring, swap and increment the tracker\n \telse if(nums[i] != 0 && zeroPointer != -1)\n {\n nums[zeroPointer] = nums[i];\n nums[i] = 0;\n zeroPointer++;\n \t}\t\n }\n }",
"void fillList(List<String> toFill) {\n for (int i = 0; i < number; i++) {\n toFill.add(i + \"\");\n }\n }",
"private static void test() {\n\t\tint i = 0;\n\t\tArrays.fill(arr, -1);\n\t\tarr[++i] = 0;\n\t\tprintArray(arr);\n\t\ti = 0;\n\t\tArrays.fill(arr, -1);\n\t\tarr[i++] = 0;\n\t\tprintArray(arr);\n\t\t\n\t}",
"public void moveZeroes(int[] nums) {\n for(int i=0; i<nums.length-1; i++) {\n if(nums[i] == 0) {\n int j=i+1;\n while(j < nums.length) {\n if(nums[j] != 0) {\n break;\n }\n j++;\n }\n //switch\n if(j < nums.length) {\n nums[i] = nums[j];\n nums[j] = 0;\n \n }\n }\n }\n }",
"public static void main(String[] args){\n\t\t int[] input = {1,3,0,3,0,6,0,9,23,45};\n\t\t int[] output = new ShiftAllZero().shiftZero(input);\n\t\t for (int index = 0; index < input.length; index++) {\n\t\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(output[index]);\n\t\t\t\n\t\t\t}\n\t\t \n\t\t \n\t\t \n\t \n\t }",
"private void fillContentListWithDefaultValues(List<Content> contentList, Integer start, Integer prevLastIndex) {\n\n\t\tfor (int i = start; i < prevLastIndex; i++)\n\t\t\tcontentList.add(null);\n\t}",
"public static int[] exe1(int[] arr){ // Solution O(n) in time and constant in Memory\n int nzeros=0;\n\n for (int i=0; i<arr.length; i++) {\n arr[i-nzeros] = arr[i];\n if (arr[i] == 0) {\n nzeros++;\n }\n }\n for (int i=arr.length-1; i>arr.length-nzeros-1; i--) {\n arr[i] = 0;\n }\n\n return arr;\n }",
"private static List<Integer> addOne(List<Integer> input) {\n\n\t\tList<Integer> copy = new ArrayList<>();\n\t\tcopy.addAll(input);\n\n\t\tint size = copy.size();\n\t\tcopy.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && copy.get(i)==10; i--) {\n\t\t\tcopy.set(i, 0);\n\t\t\tcopy.set(i-1, copy.get(i-1)+1);\n\t\t}\n\n\t\tif(copy.get(0) == 10) {\n\t\t\tcopy.set(0, 0);\n\t\t\tcopy.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn copy;//this NOT modifies the original input\n\t}",
"public static void main(String[] args) {\n\t\tint arr[]=new int[5];\r\n\t\tfor(int i=0;i<5;i++){\r\n\t\t\tarr[i]=i;\r\n\t\t}\r\n\t\tArrays.fill(arr,1,4,9);\r\n\t\r\nfor(int i=0;i<5;i++){\r\n\tSystem.out.println(arr[i]);\r\n}\r\n}",
"public void Add(int[] item) {\n Add(item.length * 4);\n\n\n for (int i = 0; i < item.length; i++) {\n AddInt(item[i]);\n }\n mLenght += Integer.SIZE / 8 * item.length;\n mBackOffset = mLenght;\n }",
"public static void main(String args[]) {\n Scanner in = new Scanner(System.in);\n int n=in.nextInt();\n int a[]=new int[n];\n int c=0,e=0;\n for(int i=0;i<n;i++)\n a[i]=in.nextInt();\n int b[]=new int[10];\n int d[]=new int[10];\n for(int j=0;j<n;j++)\n {\n if(a[j]==0)\n {\n b[c++]=a[j];\n }\n else\n {\n d[e++]=a[j];\n }\n }\n for(int k=0;k<=e;k++)\n a[k]=d[k];\n int f=(n-e)-1;\n for(int l=1;l<=f;l++)\n a[e+l]=0;\n for(int m=0;m<n;m++)\n System.out.print(a[m]+\" \");\n \n }",
"private static int[][] AddToArr(int[][] arr, int[][] symbol, int length, int offset) {\n\r\n\t\tfor (int i = 0; i < 5; i++) {\r\n\t\t\tfor (int j = 0; j < length; j++) {\r\n\t\t\t\tif (symbol[i][j] > 0) {\r\n\r\n\t\t\t\t\tarr[i][j + offset] = 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn arr;\r\n\t}",
"public int addFixedLengthData(int[] data) {\n // remember where we store the data\n int oldIndex = curIndex;\n addInts(data);\n // after storing, the new index is now moved by the length of the data\n curIndex += data.length;\n return oldIndex;\n }",
"private byte[] gapEncode (List<Integer> list) {\n\t if (list == null || list.size() == 0) {\n\t return null;\n }\n\t\tIterator<Integer> p = list.iterator();\n\t\tInteger docId = popNextOrNull(p);\n\t\tbyte[] firDocId = vBNumber(docId);\n\t\tbyte[] bytes = new byte[VBNUM_SIZE * list.size()];\n int index;\n for (index = 0; index < firDocId.length; index++) {\n bytes[index] = firDocId[index];\n }\n\n\t while (docId != null) {\n\t Integer nextDocId = popNextOrNull(p);\n\t if (nextDocId == null) {\n\t break;\n }\n\t byte[] gap = vBNumber(nextDocId - docId);\n\t for (int i = 0; i < gap.length; i++) {\n\t bytes[index] = gap[i];\n\t index++;\n }\n\t docId = nextDocId;\n }\n\n byte[] result = new byte[index];\n for (int i = 0; i < index; i++) {\n result[i] = bytes[i];\n }\n\n\n\n /*System.out.println(\"......gap encode inside......\");\n\n for (byte t : result) {\n for (int i = 0; i < Byte.SIZE; i++) {\n int n = t & (1 << (7 - i));\n n = n >> (7 - i);\n System.out.print(n);\n }\n System.out.println();\n }*/\n\n return result;\n\t}",
"private void arrayIncreaaseSize(MyArrayList myArrayList, Results results) {\r\n int old_size = myArrayList.length();\r\n int value;\r\n Random rand = new Random();\r\n \r\n for(int i=0; i<50; i++) {\r\n value = rand.nextInt(10000);\r\n if(value < 0) {\r\n value = value * -1;\r\n }\r\n myArrayList.insertSorted(value);\r\n }\r\n if(myArrayList.length() == old_size + 25) {\r\n results.storeNewResult(\"ArrayIncrease test case: PASSED\");\r\n }\r\n else {\r\n results.storeNewResult(\"ArrayIncrease test case: FAILED\");\r\n }\r\n }",
"private void insertZeros(int zerosToInsert)\n\t{\n\t\t/* Difficulty is defined(read from one wikipedia article):\n\t\t\tEasy: 32+ clues (49 or fewer zeros)\n\t\t\tMedium: 27-31 clues (50-54 zeros)\n\t\t\tHard: 26 or fewer clues (54+ zeros)\n\t\t */\n\t\tdouble remainingSquares = 81;\n\t\tdouble remainingZeros = (double)zerosToInsert;\n\n\t\tfor(int i=0;i<9;i++)\n\t\t\tfor(int j=0;j<9;j++)\n\t\t\t{\n\t\t\t\tdouble zeroChance = remainingZeros/remainingSquares;\n\t\t\t\tif(Math.random() <= zeroChance)\n\t\t\t\t{\n\t\t\t\t\tsudokuMatrix[i][j] = 0;\n\t\t\t\t\tremainingZeros--;\n\t\t\t\t}\n\t\t\t\tremainingSquares--;\n\t\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tint nums[] = {1,0,2,4,0,1, 0,0,0};\n\t\tint index = 0;\n\t\tfor (int i= 0; i <= nums.length -1; i++) {\n\t\t\tif (nums[i] != 0) {\n\t\t\t\tnums[index] = nums[i];\n\t\t\t\tindex++;\n\t\t\t} else {\n\t\t\t}\n\t\t}\n\t\tfor (int j=index; j <nums.length; j++) {\n\t\t\tnums[j] = 0;\n\t\t}\n\t\tfor (int i=0; i < nums.length; i++) {\n\t\t\tSystem.out.print(nums[i] + \" \");\n\t\t}\n\t}",
"public String padSpace(int n) {\n\t\tif (n < 0) { n = 0; }\n\t\tString s = \"\";\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ts = s + \" \";\n\t\t}\n\t\treturn s;\n\t}",
"private static byte[] leftTruncateOrPadByteArray(byte[] b, int n) {\n if (b.length > n) {\n return Arrays.copyOfRange(b, Math.max(b.length - n, 0), b.length);\n } else if (b.length < n) {\n byte[] bPadded = new byte[n];\n System.arraycopy(b, 0, bPadded, Math.max(0, n - b.length), b.length);\n return bPadded;\n }\n return b;\n }",
"public void clearInitialize(){\n index=0;\n for(int i =0; i < list.length;i++){\n list[i]=0;\n }\n hasFilled = false;\n\n }",
"public static void main(String[] args) {\n\t\tint arr[]= {6,0,-3,0,0,4};\n\t\tint n=arr.length;\n\t\tPushZerosToEnd(arr,n);\n\t\tSystem.out.println(\"Arrays after pushing zeros at back\");\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tSystem.out.println(arr[i]+\"\");\n\t\t}\n\n\t}",
"private double[][][] getPaddedInputs(double[][][] input, int padding) {\n int rows = input[0].length + 2 * padding;\n int cols = input[0][0].length + 2 * padding;\n double[][][] newInputs = new double[input.length][rows][cols];\n for (int depth = 0; depth < input.length; depth++) {\n for (int row = 0; row < input[0].length; row++) {\n for (int col = 0; col < input[0][0].length; col++) {\n newInputs[depth][row + padding][col + padding] =\n input[depth][row][col];\n }\n }\n }\n return newInputs;\n }",
"public void rotateNoSpace(int[] nums, int k){\n //in case k is greater than the length\n k = k % nums.length;\n \n for(int i = 0; i < k; i++){\n int last = nums[nums.length-1];\n for(int j = nums.length - 1; j >= 1; j--){\n nums[j] = nums[j-1];\n }\n nums[0] = last;\n }\n }",
"private static int[] createRandomFilledArrayOfLength(int n) {\n int[] list = new int[n];\n Random rand = new Random();\n for (int i = 0; i < n; i++) {\n list[i] = rand.nextInt(2*MAX_VALUE) - MAX_VALUE;\n }\n return list;\n }",
"public void addPadding(int nucleotides) {\n\t\tstart -= nucleotides;\n\t\tif (start < 0) start = 0;\n\t\tstop += nucleotides;\n\t}",
"private void countAndPadding(int type, int fill) {\n if ( sealed ) return;\n \n final Buffer dest;\n final boolean dSigned;\n final int e;\n \n switch (type) {\n case VERTEX:\n dest = vertexArray;\n dSigned = vDataTypeSigned;\n e = 4 == vComps ? 1 : 0;\n vElems++;\n break;\n case COLOR:\n dest = colorArray;\n dSigned = cDataTypeSigned;\n e = 4 == cComps ? 1 : 0;\n cElems++;\n break;\n case NORMAL:\n dest = normalArray;\n dSigned = nDataTypeSigned;\n e = 0;\n nElems++;\n break;\n case TEXTCOORD:\n dest = textCoordArray;\n dSigned = tDataTypeSigned;\n e = 0;\n tElems++;\n break;\n default: throw new InternalError(\"Invalid type \"+type);\n }\n \n if ( null==dest ) return;\n \n while( fill > e ) {\n fill--;\n Buffers.putNf(dest, dSigned, 0f); \n }\n if( e > 0 ) {\n Buffers.putNf(dest, dSigned, 1f);\n }\n }",
"private int padWithEmptyCells(Composite parent, int col) {\n for (; col < NUM_COL; ++col) {\n emptyCell(parent);\n }\n col = 0;\n return col;\n }",
"private void autoExpand(long toLength) {\n \t\tlist.ensureCapacity((int) toLength);\n \t\tfor (int i = getLength(); i < toLength; i++) {\n \t\t\tlist.add(getRuby().getNil());\n \t\t}\n \t}",
"private byte[] getPadded(byte[] bytes) {\n\t\tbyte[] padded = new byte[20];\n\t\tpadded[16] = 0; // right pad\n\t\tpadded[17] = 0; // right pad\n\t\tpadded[18] = 0; // right pad\n\t\tpadded[19] = 0; // right pad\n\t\tSystem.arraycopy(bytes, 0, padded, 0, 16);\n\t\treturn padded;\n\t}",
"private void ensureCapacity(int index) {\n\t\t\tint overflow = index - list.size();\n\t\t\twhile (overflow-- >= 0) {\n\t\t\t\tlist.add(null);\n\t\t\t}\n\t\t}",
"private String padded(int i, int length) {\n String current = Integer.toString(i);\n int size = Integer.toString(length).length();\n current = String.format(\"%\" + size + \"s\", current);\n return current;\n }",
"public static ArrayList<Integer> setZerosList(int numFiles){\n ArrayList<Integer> zerosList = new ArrayList<>();\n for(int i = 0; i < numFiles; i++)\n zerosList.add(0);\n\n return zerosList;\n\n }",
"public static String[] keypad(int n)\n\t{\n\t\t// Write your code here\n\t\tString[]map ={\"\",\"\",\"abc\",\"def\",\"ghi\",\"jkl\",\"mno\",\"pqrs\",\"tuv\",\"wxyz\"};\n\t\treturn keypad1(n,map);\n\t}",
"public void initialize(int size);",
"@Test\n public void addPastInitialCapacity() {\n for (int iteration = 0; iteration < 20; iteration++) {\n testList.add(42);\n }\n assertEquals(20, testList.count());\n }",
"private static void testAdd(ArrayList list, int[] content) {\n System.out.print(\"Adding to the list: \");\n for (int index = 0; index < content[index]; index++) {\n list.addToEnd(content);\n } // end for\n System.out.println();\n displayList(list);\n }",
"OrderedIntList(int size)\n\t{\n\t\tdata = new int[size];\n\t\tcount = 0;\n\t}",
"private void grow()\n\t{\n\t\tint temp[] = new int[count * 2];\n\t\tfor(int index = 0; index < count; index = index + 1)\n\t\t\ttemp[index] = array1[index];\n\t\tarray1 = temp;\n\t}",
"public static String addLeadingZeros(String number, int length){\n\t\t\n\t\tString SaleOrderStr = number;\n\t\tif(SaleOrderStr.length() < length){\n\t\t\tint MissingDigits = length - SaleOrderStr.length();\n\t\t\tfor(int i = 0; i < MissingDigits; i++){\n\t\t\t\tSaleOrderStr = \"0\"+SaleOrderStr;\n\t\t\t}\n\t\t}\n\t\treturn SaleOrderStr;\n\t\t\n\t}",
"public void addAll(T[] arr, int from, int length);",
"static ArrayList runLengthEncodingSequence(List<List> lists){\r\n\t\t\r\n\t\tArrayList encodinglist=new ArrayList<>();\r\n\t\t\r\n\t\tfor(List a: lists)\r\n\t\t{\r\n\t\t\tArrayList encodinglistinner=new ArrayList<>();\r\n\t\t\tencodinglistinner.add(a.size());\r\n\t\t\tencodinglistinner.add(a.get(0));\r\n\t\t\tencodinglist.add(encodinglistinner);\r\n\t\t}\r\n\t\treturn encodinglist;\r\n\t\r\n\t}",
"private byte[] padMsg(byte[] msg) {\n int messageLength = msg.length;\n int overflow = messageLength % 64; // overflow bytes are not in a 64-byte/512-bit block\n int paddingLength;\n\n if (64 - overflow >= 9) { // we need min. 72 bit (9 * 8 bit) space: 1 byte for the \"1\"-bit directly after the message, 8 byte for message length\n paddingLength = 64 - overflow;\n } else { // if we have less than 72 bit of space between the message and the next full 512-bit block, add another 512-bit block\n paddingLength = 128 - overflow;\n }\n\n byte[] padding = new byte[paddingLength];\n\n padding[0] = (byte) 0x80; // byte with leading 1-bit (1000 0000)\n\n long lenInBit = messageLength * 8; // message length as number of bits. This needs to be filled into the trailing 64 bit of the last block\n\n // bitwise copy of length-integer into padding[] byte array\n // 8 iterations, one byte per iteration, to fill 64 bit\n for (int i = 0; i < 8; i++) {\n // shift right i byte\n long shiftRight = lenInBit >>> (8 * i);\n // truncate the rightmost byte\n byte b = (byte) (shiftRight & 0xFF);\n // highest index in the array gets the lowest value bit\n padding[padding.length - 1 - i] = b;\n }\n\n // construct output array including padding, with length (in bit) divisible by 512\n byte[] paddedMsg = new byte[messageLength + paddingLength];\n // copy original message\n System.arraycopy(msg, 0, paddedMsg, 0, messageLength);\n // copy padding\n System.arraycopy(padding, 0, paddedMsg, messageLength, padding.length);\n\n return paddedMsg;\n }",
"private void ensureCapacity(int count) {\n\t\tint capacity = getCapacity();\n\t\t\n\t\tint newLength = length + count;\n\t\tif (capacity >= newLength)\n\t\t\treturn;\n\n\t\t// Double capacity\n\t\tcapacity <<= 1;\n\t\t\n\t\tif (newLength > capacity)\n\t\t\tcapacity = newLength;\n\n\t\tchar[] newBuffer = new char[capacity];\n\t\tSystem.arraycopy(buffer, 0, newBuffer, 0, length);\n\t\tbuffer = newBuffer;\n\t}",
"public String padLeft(String s, int n) {\n\t\t\tif (n < 0) { n = 0; }\n\t\t\tif (s.equals(null)) { s = \"\"; }\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\ts = \" \" + s;\n\t\t\t}\n\t\treturn s;\n\t\t}",
"int fillCount();",
"private static StringBuffer Pad(int depth) {\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tfor (int i = 0; i < depth; i++)\r\n\t\t\tsb.append(\" \");\r\n\t\treturn sb;\r\n\t}",
"public String padRight(String s, int n) {\n\t\tif (n < 0) { n = 0; }\n\t\tif (s.equals(null)) { s = \"\"; }\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ts = s + \" \";\n\t\t}\n\t\treturn s;\n\t}",
"public static void initializeCount(int[] count){\n\t\tif (count != null){\n\t\t\tfor (int i = 0; i < count.length; i++)\n\t\t\t\tcount[i] = 0;\n\t\t}\n\t}",
"private ArrayIntList buildList(int size) {\n\t\tArrayIntList list = new ArrayIntList();\n\t\tfor (int i=1;i<=size;i++)\n\t\t\tlist.add(i);\n\t\treturn list; \n\t}",
"public static IntArrayList zero(int size) {\n IntArrayList result = new IntArrayList(size);\n result.elementsCount = size;\n return result;\n }",
"private int[] leftrotate(int[] arr, int times) {\n assert (arr.length == 4);\n if (times % 4 == 0) {\n return arr;\n }\n while (times > 0) {\n int temp = arr[0];\n System.arraycopy(arr, 1, arr, 0, arr.length - 1);\n arr[arr.length - 1] = temp;\n --times;\n }\n return arr;\n }",
"public static void Sort(int A[], int n)\n {\n int k = 0;\n \n // do for each element\n for (int i = 0; i < n; i++)\n {\n // if current element is zero, put 0 at next free\n // position in the array\n if (A[i] == 0)\n A[k++] = 0;\n }\n \n // fill all remaining indexes by 1\n for (int i = k; i < n; i++)\n A[k++] = 1;\n }",
"public int addPadding() {\n\t\tCodeItem codeItem = getCodeItem();\n\t\tint padding = codeItem.getSize() % 4;\n\t\tif (padding != 0) {\n\t\t\tif (padding == 2) {\n\t\t\t\tcodeItem.addInstruction(new InstructionFormat10X(0));\n\t\t\t} else {\n\t\t\t\tthrow new RuntimeException(\"Padding can only be 0 or 2 ! (\" + method.getMethodName() + \" \" + method.getClassName() + \" \" + codeItem.getSize() + \" \" + padding + \")\");\n\t\t\t}\n\t\t}\n\t\treturn padding;\n\t}",
"private void fillList(final int offset)\n\t{\n\t\t// Log.v(TAG, \".fillList: offset = \" + offset);\n\n\t\tfinal int rightEdge = getChildAt(getChildCount() - 1).getRight();\n\t\tfillListRight(rightEdge, offset);\n\n\t\tfinal int leftEdge = getChildAt(0).getLeft();\n\t\tfillListLeft(leftEdge, offset);\n\t}",
"public void zero() {\n fill(0);\n }",
"private void makeRoom(int givenPosition) {\n int newIndex = givenPosition;\n int lastIndex = numberOfElements;\n\n// Move each entry to next higher index, starting at end of\n// list and continuing until the entry at newIndex is moved\n for (int index = lastIndex; index >= newIndex; index--)\n listArray[index + 1] = listArray[index];\n }",
"static void fillArray(int[] array) {\n\t\tint i = 0;\r\n\t\tint number = 1;\r\n\t\twhile (i < array.length) {\r\n\t\t\tif ((int) Math.floor(Math.random() * Integer.MAX_VALUE) % 2 == 0) {\r\n\t\t\t\tnumber = number + (int) Math.floor(Math.random() * 5);\r\n\t\t\t\tarray[i] = number;\r\n\r\n\t\t\t} else {\r\n\t\t\t\tnumber++;\r\n\t\t\t\tarray[i] = number;\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}",
"private static int[] fix23(int[] arr) {\n int[] output = new int[3];\n for (int i = 0; i < arr.length-1; i++) {\n if (arr[i]==2 && arr[i+1]==3) {\n arr[i+1]=0;\n }\n\n }\n return arr;\n }",
"private static <T extends RealType<T>> RandomAccessibleInterval<T>\n\t\taddLeadingZeros(final RandomAccessibleInterval<T> input)\n\t{\n\t\tfinal long[] min = Intervals.minAsLongArray(input);\n\t\tfinal long[] max = Intervals.maxAsLongArray(input);\n\n\t\tfor (int i = 0; i < max.length; i++) {\n\t\t\tmin[i]--;\n\t\t}\n\n\t\tfinal T realZero = Util.getTypeFromInterval(input).copy();\n\t\trealZero.setZero();\n\n\t\tfinal ExtendedRandomAccessibleInterval<T, RandomAccessibleInterval<T>> extendedImg =\n\t\t\tViews.extendValue(input, realZero);\n\t\tfinal IntervalView<T> offsetInterval = Views.interval(extendedImg, min,\n\t\t\tmax);\n\n\t\treturn Views.zeroMin(offsetInterval);\n\t}",
"public byte[] pad(byte[] message)\n {\n final int blockBits = 512;\n final int blockBytes = blockBits / 8;\n\n // new message length: original + 1-bit and padding + 8-byte length\n int newMessageLength = message.length + 1 + 8;\n int padBytes = blockBytes - (newMessageLength % blockBytes);\n newMessageLength += padBytes;\n\n // copy message to extended array\n final byte[] paddedMessage = new byte[newMessageLength];\n System.arraycopy(message, 0, paddedMessage, 0, message.length);\n\n // write 1-bit\n paddedMessage[message.length] = (byte) 0b10000000;\n\n // skip padBytes many bytes (they are already 0)\n\n // write 8-byte integer describing the original message length\n int lenPos = message.length + 1 + padBytes;\n ByteBuffer.wrap(paddedMessage, lenPos, 8).putLong(message.length * 8);\n\n return paddedMessage;\n }",
"public void makeEmpty() {\n for (int i = 0; i < buckets.length; i++) {\n buckets[i] = new SList();\n }\n size = 0;\n }",
"private static int[] stripLeadingZeroInts(int val[]) {\n int vlen = val.length;\n int keep;\n\n // Find first nonzero byte\n for (keep = 0; keep < vlen && val[keep] == 0; keep++)\n ;\n return java.util.Arrays.copyOfRange(val, keep, vlen);\n }",
"public void copyAndZeroOut(Integer[][] next, Integer[][] current) {\n for (int i = 0; i < dimension; i++) {\n for (int j = 0; j < dimension; j++) {\n current[i][j] = next[i][j];\n next[i][j] = 0;\n }\n }\n }",
"private void addToEmptyList(T data) {\n this.first = this.last = new Node(data);\n this.nrOfElements++;\n }",
"public int replaceFixedLengthData(int index, int[] data) {\n for(int i = 0; i<data.length; i++) {\n theList.set(index+i,data[i]);\n }\n return index;\n }",
"public ListArrayBasedPlus(int size)\n {\n items = new Object[size];\n numItems = 0;\n }",
"public FixedSizeList(int capacity) {\n // YOUR CODE HERE\n }",
"public static ArrayList<Integer> removeZeros(ArrayList<Integer> p)\n\t{ The best way: Create a new empty integer array list and\n\t // only copy the non-zero numbers of parameter array list p into it. \n\t\t // Use a for loop\n\t\t //-----------Start below here. To do: approximate lines of code = 5\n\t\t //\n\t\t ArrayList<Integer> helo = new ArrayList<Integer>();\n\t\t for (Integer number:p){\n\t\t\t if (number!=0){\n\t\t\t helo.add(number);\n\t\t }\n\t\t}\n\t\t return helo;\n\t\t }",
"public static int[] createZeroBasedSequence(int length) {\n\t\tint[] sequence = new int[length];\n\t\tfor (int i = 0; i < sequence.length; i++) {\n\t\t\tsequence[i] = i;\n\t\t}\n\t\treturn sequence;\n\t}",
"public static int[] removeZeros(int[] input)\n {\n int targetIndex = 0;\n for(int sourceIndex = 0; sourceIndex < input.length; sourceIndex++ )\n {\n if( input[sourceIndex] != 0 )\n input[targetIndex++] = input[sourceIndex];\n }\n\n int[] newArray = new int[targetIndex];\n System.arraycopy( input, 0, newArray, 0, targetIndex );\n\n return newArray;\n }"
] |
[
"0.61240906",
"0.5935992",
"0.584706",
"0.575458",
"0.57203114",
"0.5547595",
"0.5526835",
"0.5519933",
"0.5492224",
"0.54822165",
"0.54306513",
"0.54029566",
"0.54026586",
"0.5402277",
"0.5350072",
"0.53335255",
"0.5328227",
"0.5324296",
"0.52968407",
"0.52724695",
"0.52480084",
"0.52422535",
"0.5237775",
"0.521514",
"0.5196733",
"0.51763916",
"0.5134163",
"0.5095822",
"0.50895834",
"0.5069525",
"0.5066544",
"0.50574523",
"0.5050874",
"0.5046593",
"0.5033819",
"0.4987775",
"0.49810946",
"0.49518463",
"0.4934425",
"0.49163675",
"0.48974368",
"0.4891231",
"0.4870696",
"0.4859987",
"0.48584333",
"0.48575446",
"0.4852131",
"0.4841652",
"0.48282963",
"0.48110238",
"0.48101988",
"0.48050877",
"0.48020005",
"0.47966895",
"0.47894096",
"0.47875717",
"0.47633448",
"0.4759696",
"0.47527",
"0.47495177",
"0.47381753",
"0.47076905",
"0.4702393",
"0.4687588",
"0.46755174",
"0.46565923",
"0.46499863",
"0.46489826",
"0.46457794",
"0.4644973",
"0.46403384",
"0.4639217",
"0.46383682",
"0.46298718",
"0.4629618",
"0.46273896",
"0.4623014",
"0.46175978",
"0.45968777",
"0.45858788",
"0.45836297",
"0.45764658",
"0.45757803",
"0.4575415",
"0.4574909",
"0.4574859",
"0.45724067",
"0.45529243",
"0.4552199",
"0.45470995",
"0.4544711",
"0.4540151",
"0.45290044",
"0.4525202",
"0.4524401",
"0.4518",
"0.45149168",
"0.4512352",
"0.45079988",
"0.45078206"
] |
0.64910555
|
0
|
demarrer l'etape de jeu
|
@Override
public synchronized void demarrer(){
if(modele.getQuiterJeu()){return;}
modele.getMoteurJeu().setEtapeJeu(this);
// apercu dans le termial pour debuger
System.out.println("-----------------nom joueur: "+modele.getJoueurCourant().getNom());
System.out.print(" humain: "+modele.getJoueurCourant().estHumain());
System.out.print(" stand: "+modele.getJoueurCourant().getMainCourant().getStand());
System.out.print(" perdu: "+modele.getJoueurCourant().getMainCourant().estPerdu());
System.out.print(" blackjack: "+modele.getJoueurCourant().getMainCourant().estBlackJack());
System.out.println(" jeu: "+modele.getJoueurCourant().getMainCourant().getJeu().toString());
//-------------------------------------------------
// On ne fait pas une boucle ici pour que l'observer
// puisse acceder a son observé et se mettre a jour
//-------------------------------------------------
new Thread(){
@Override
public void run() {
try {
// si plus de carte
if(modele.getPioche().getCartes().size() < 1){
for(Carte carte:modele.getDefausse().getCartes()){
carte.setFaceCarte(Face.VERSO);
modele.getPioche().ajouterDessous(carte);
}
modele.getDefausse().vider();
modele.getPioche().melanger();
}
// si il peut plus jouer
if(modele.getJoueurCourant().getMainCourant().estBlackJack() || modele.getJoueurCourant().getMainCourant().estPerdu()
|| modele.getJoueurCourant().getMainCourant().getStand() || modele.getJoueurCourant().getMainCourant().est21()
|| modele.getJoueurCourant().getMainCourant().getAAbandonner() || modele.getJoueurCourant().getAPerduJeu()){
// si le joueur a une autre main
if(modele.getJoueurCourant().mainSuivant()){
Thread.sleep(2000);
demarrer();
}
// sinon si il y a un joueur suivant on fait joueur suivant
else if(modele.joueurSuivant()){
Thread.sleep(2000);
demarrer();
}else{
modele.getMoteurJeu().setEtapeJeu(etapeSuivant);
Thread.sleep(2000);
modele.setMessage(modele.getCroupier().getNom()+" plays");
// on affiche les carte du croupier
for(Carte carte: modele.getCroupier().getMainCourant().getJeu().getCartes()){
carte.setFaceCarte(Face.RECTO);
}
System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++");
Thread.sleep(3000);
demarrerEtapeSuivant();
}
}
// sinon
else{
modele.setMessage(modele.getJoueurCourant().getNom()+" plays");
if(!modele.getJoueurCourant().estHumain()){
modele.getJoueurCourant().jouer(modele.getPioche(),modele.getDefausse());
Thread.sleep(3000);
demarrer();
}
}
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}.start();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public int getEnJeu(){\n\t\treturn MusiqueFiducial.enJeu;\n\t}",
"private String elaboraIncipit() {\n String testo = VUOTA;\n\n if (usaHeadIncipit) {\n testo += elaboraIncipitSpecifico();\n testo += A_CAPO;\n }// fine del blocco if\n\n return testo;\n }",
"public IJoueur quiEstMonMaitre();",
"public Etat(Jeu jeu){\r\n this.jeu=jeu;\r\n }",
"public java.lang.String getHora_desde();",
"protected String decrisToi(){\r\n return \"\\t\"+this.nomVille+\" est une ville de \"+this.nomPays+ \", elle comporte : \"+this.nbreHabitants+\" habitant(s) => elle est donc de catégorie : \"+this.categorie;\r\n }",
"public Jeu(){\n Saisie.Initialiser();\n this.premierJoueur = CreationDePersonnage(\"joueur1\");\n this.secondJoueur = CreationDePersonnage(\"joueur2\");\n Combat();\n Saisie.Terminer();\n }",
"public void lancerJeu () {\n switch (choixModeJeu) {\n case \"C\":\n Jeu jeuJoueC = new JeuChallenger(modeDev, choixJeu, nbdeCouleur, nbessaiPossible, longueurduSecret);\n jeuJoueC.unJeu();\n break;\n case \"U\":\n Jeu jeuJoueU = new JeuDuel(modeDev, choixJeu, nbdeCouleur, nbessaiPossible, longueurduSecret);\n jeuJoueU.unJeu();\n break;\n case \"D\":\n Jeu jeuJoueD = new JeuDefenseur(modeDev, choixJeu, nbdeCouleur, nbessaiPossible, longueurduSecret);\n jeuJoueD.unJeu();\n break;\n default:\n LOG.error(\"Cas du choix du mode de jeu non géré\");\n break;\n }\n }",
"public void choixduJeu() {\n afficheMessage(\"*- Choisissez le jeu auquel vous voulez jouer : \\n- R pour Recherche +/-\\n- M pour Mastermind\");\n choixJeu = Console.saisieListeDeChoix(\"R|M\");\n afficheMessage(\"*- Choisissez le mode de jeu auquel vous voulez jouer :\\n- C pour Challenger,\\n- U pour Duel\\n- D pour Defense\");\n choixModeJeu = Console.saisieListeDeChoix(\"C|U|D\");\n }",
"public int jogadorAtual() {\n return vez;\n }",
"public boolean jeu() {\n int k;\n\n String compJoueur = \"\";\n String compOrdi = \"\";\n String reponse;\n\n boolean victoireJoueur = false;\n boolean victoireOrdi = false;\n String mystJoueur = challenger.nbMystere(); /**nb que le joueur doit trouver*/\n String mystOrdi = defenseur.nbMystere(); /**nb que l'ordinateur doit trouver*/\n String propOrdi = defenseur.proposition(); /**ordinateur genere un code aleatoire en premiere proposition*/\n log.info(\"Proposition ordinateur : \" + propOrdi); /**afficher proposition ordinateur*/\n String propJoueur = \"\";\n String goodResult = MethodesRepetitives.bonResultat();\n\n\n for (k = 1; !victoireJoueur && !victoireOrdi && k <= nbEssais; k++) { /**si ni le joueur ou l'ordinateur n'ont gagne et si le nombre d'essais n'est pas atteind, relancer*/\n\n compOrdi = MethodesRepetitives.compare(mystOrdi, propOrdi); /**lancer la methode de comparaison du niveau defenseur*/\n log.info(\"Reponse Ordinateur :\" + compOrdi); /**afficher la comparaison*/\n propJoueur = challenger.proposition(); /**demander une saisie au joueur selon le mode challenger*/\n compJoueur = MethodesRepetitives.compare(mystJoueur, propJoueur); /**comparer selon le mode challenger*/\n log.info(\"Reponse Joueur :\" + compJoueur); /**afficher la comparaison*/\n\n if (compOrdi.equals(goodResult)) { /**si l'ordinateur a gagne, changement de la valeur victoireOrdi*/\n victoireOrdi = true;\n }else if(compJoueur.equals(goodResult)) {/**si le joueur a gagne changement de la valeur victoireJoeur*/\n victoireJoueur = true;\n } else if (k < nbEssais) { /**sinon redemander un code a l'ordinateur selon les symboles de comparaison*/\n propOrdi = defenseur.ajuste(propOrdi, compOrdi);\n log.info(\"Proposition Ordinateur :\" + propOrdi);\n }\n }\n\n if (victoireOrdi || !victoireJoueur)/**si l'ordinateur ou le joueur perdent alors perdu sinon gagne*/\n victoireJoueur = false;\n else\n victoireJoueur = true;\n\n return victoireJoueur;\n\n\n }",
"public void jugar_con_el() {\n System.out.println(nombre + \" esta jugando contigo :D\");\n }",
"public Farbe fuehrendesKamel();",
"@Test\n\tpublic void testAjouteHeures() {\n\t\tuntel.ajouteEnseignement(uml, 0, 10, 0);\n\n\t\tassertEquals(10, untel.heuresPrevuesPourUE(uml),\n \"L'enseignant doit maintenant avoir 10 heures prévues pour l'UE 'uml'\");\n\n // 20h TD pour UML\n untel.ajouteEnseignement(uml, 0, 20, 0);\n \n\t\tassertEquals(10 + 20, untel.heuresPrevuesPourUE(uml),\n \"L'enseignant doit maintenant avoir 30 heures prévues pour l'UE 'uml'\");\t\t\n\t\t\n\t}",
"public FaseDescartes faseJuego();",
"public String getPuntoEmision()\r\n/* 124: */ {\r\n/* 125:207 */ return this.puntoEmision;\r\n/* 126: */ }",
"public String toString() {\r\n return nom + \" \" + dateEmbauche;\r\n }",
"private String formulerMonNom() {\n\t return \"Je m'appelle \" + this.nom; // appel de la propriété nom\n\t }",
"private void atualizarTela() {\n\t\tif(this.primeiraJogada == true) {//SE FOR A PRIMEIRA JOGADA ELE MONTA O LABEL DOS NUMEROS APOS ESCOLHER A POSICAO PELA PRIMEIRA VEZ\r\n\t\t\tthis.primeiraJogada = false;\r\n\t\t\tthis.montarLabelNumeros();\r\n\t\t}\r\n\r\n\t\tthis.esconderBotao();\r\n\t\t\r\n\t\tthis.acabarJogo();\r\n\t}",
"public jugador(){\n\t\tnombre=\"Dave\";\n\t\ttipo=\"jugador\";\n\t\tpoderataque=6;\n\t\tpuntosvida=20;\n\t}",
"public abstract java.lang.String getAcma_cierre();",
"public int[] jouer(int[] dernierJeu, boolean ordiCommence)\r\n {\r\n System.out.println(\"dJ : \"+dernierJeu[0]+\" \"+dernierJeu[1]);\r\n\r\n //System.out.println(\"Ordinateur va jouer\");\r\n int[] res = new int[3]; //tableau a rendre\r\n if (!ordiCommence)\r\n {\r\n actualiser(dernierJeu);\r\n }\r\n\r\n res = chercher(dernierJeu[0], dernierJeu[1], 3);\r\n if (res == tabVide)\r\n {\r\n res = chercher(dernierJeu[0], dernierJeu[1], 1);\r\n if (res == tabVide)\r\n {\r\n res = chercher(dernierJeu[0], dernierJeu[1], 0);\r\n if (res == tabVide)\r\n {\r\n res = chercher(dernierJeu[0], dernierJeu[1], 2);\r\n }\r\n }\r\n }\r\n return res;\r\n }",
"public String getNiveauEtude() {\n\t\treturn niveauEtude;\n\t}",
"public String getAPELLIDONombreDelAlumno() {\r\n\t\tString nombre = \"SUREDA José\";\r\n\t\treturn nombre;\r\n\t}",
"public java.lang.String getHora_hasta();",
"public Farbe letztesKamel();",
"@Override\n\tpublic String maju() {\n\t\tif (gigiMasuk) {\n\t\t\treturn super.maju();\n\t\t}else {\n\t\t\treturn \"..............\";\n\t\t}\n\t}",
"private static void eligeJuego() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Elige el tipo de juego\\n1-\"\r\n\t\t\t\t\t+ optionsTiposJuegos[0]/*\r\n\t\t\t\t\t\t\t\t\t\t\t * + \"\\n2-\" + optionsTiposJuegos[1]\r\n\t\t\t\t\t\t\t\t\t\t\t */);\r\n\t\t\tSystem.out.print(\"Opcion: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion != 1 /* && eleccion != 2 */);\r\n\t\tif (eleccion == 1)\r\n\t\t\tjuego = new PPT(jugadores, jugadores.length);\r\n\t\telse\r\n\t\t\tjuego = new Chinos(jugadores, jugadores.length);\r\n\t}",
"@Override\r\n\tpublic void hacerSonido() {\n\t\tSystem.out.print(\"miau,miau -- o depende\");\r\n\t\t\r\n\t}",
"private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}",
"private static void tourJeu(){\n\n\t\twhile(true){\n\t\t\tconsole.afficherEtatJoueurs();\n\t\t\tpasserTour();\n\t\t\tconsole.quelJoueurJoue(tour);\n\t\t\tconsole.afficherJeu();\n\t\t\tconsole.afficherDirectionAssam();\n\n\t\t\tint n;\n\t\t\twhile ((n = console.demanderNbDeplacement()) == -1 );\n\n\t\t\tconsole.afficherDirectionChoisie(n);\n\t\t\tdemanderDeplacerAssam(n);\n\n\n\t\t\tif(joueurElimine == jeu.getJoueurs().length-1){\n\t\t\t\tpasserTour();\n\t\t\t\tconsole.afficherGagnant(tour);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(verifTapis()){\n\t\t\t\tstatistique();\n\t\t\t\treturn;\n\t\t\t}\n\n\n\t\t}\n\t}",
"public static void afficherJeu(Zoe Zoe, Niveau niveau){\n // Affiche les coeurs et les hexaforces\n String attributZoe = Zoe.affichageZoe(Zoe.viesActuels);\n System.out.println(attributZoe);\n // Affiche le niveau avec tous les symbols\n System.out.println(niveau.afficherCarte());\n }",
"public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}",
"private String elaboraRitorno() {\n String testo = VUOTA;\n String titoloPaginaMadre = getTitoloPaginaMadre();\n\n if (usaHeadRitorno) {\n if (text.isValid(titoloPaginaMadre)) {\n testo += \"Torna a|\" + titoloPaginaMadre;\n testo = LibWiki.setGraffe(testo);\n }// fine del blocco if\n }// fine del blocco if\n\n return testo;\n }",
"private static void eligeJugadores() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.print(\"Elige el numero de jugadores [2,6]: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion < 2 || eleccion > 6);\r\n\t\tnJugadores = eleccion;\r\n\t\tjugadores = new JugadorM[nJugadores];\r\n\t\tjugadores[0] = new JugadorM(\"Jugador\", true);\r\n\t\tfor (int i = 1; i < jugadores.length; i++)\r\n\t\t\tjugadores[i] = new JugadorM(\"Maquina\" + i, false);\r\n\t}",
"public String ecritSansExemple(){\n\n\t\tNF = new KMADToSentenceStructure(nomFichierTemp.toString());\n\t\tNF.ecritureMdT(false);\n\t\treturn(NF.getTextMdT());\n\t}",
"public void ParcoursSuffixe() {\r\n if (getGauche() != null) {\r\n getGauche().ParcoursSuffixe();\r\n }\r\n if (getDroite() != null) {\r\n getDroite().ParcoursSuffixe();\r\n }\r\n System.out.print(getElement() + \",\");\r\n }",
"public void ende() {\r\n\t\tSystem.out.println(dasSpiel.getSieger().getName() + \" hat gewonnen\"); \r\n\t}",
"public void muere() {\n System.out.println(\"Ugh... Llegó mi hora... Adios.\");\n }",
"public double getHauteurDuMonde(){\n\t\treturn HAUTEUR_DU_MONDE;\n\t}",
"public void jeu() {\n\n }",
"@Override\n\tpublic String parler() {\n\t\treturn \"Je suis un Orc\";\n\t}",
"private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }",
"private UsineJoueur() {}",
"private String elaboraAvvisoScrittura() {\n String testo = VUOTA;\n\n if (usaHeadNonScrivere) {\n testo += TAG_NON_SCRIVERE;\n testo += A_CAPO;\n }// end of if cycle\n\n return testo;\n }",
"@SuppressWarnings(\"SuspiciousMethodCalls\")\n private int houve_estouro()\n {\n int retorno = 0;\n boolean checar = false;\n for (Map.Entry i: janela.entrySet())\n {\n if (janela.get(i.getKey()).isEstouro())\n {\n janela.get(i.getKey()).setEstouro(false);\n retorno =(int) i.getKey();\n checar = true;\n break;\n }\n }\n for(Map.Entry i2: janela.entrySet()) janela.get(i2.getKey()).setEstouro(false);\n if(checar) return retorno;\n else return -69;\n }",
"public String toString () {\n return nom + \" \" + dateEmbauche;\n }",
"public Date getDateDembauche() {\r\n return dateEmbauche.copie();\r\n }",
"public void cumplirAños(){\n this.setEdad(((byte)(this.getEdad()+1)));\n }",
"public Jefatura(String nom,double sue, int agno,int mes,int dia){\r\n \r\n super(nom,sue,agno,mes,dia); \r\n \r\n }",
"public void duerme() {\n System.out.println(\"Duerme profundamentZzZzZz...\");\n }",
"public void erzaehlWas() {\n // Das Gleiche was jedes Tier sagt.\n super.erzaehlWas();\n\n // Zusaetzliche Aussage des Affen\n System.out.println(\"Affen sind einfach die besten Tiere.\");\n }",
"public void niveauSuivant() {\n niveau = niveau.suivant();\n }",
"public String getEtiquetas(){\n\t\tString s = \"\";\n\t\tfor(int x=0; x<livre; x++){\n\t\t\tif(x == MAX_ETIQUETAS-1 || x==livre-1)\n\t\t\t\ts = s+etiquetas[x];\n\t\t\telse\n\t\t\t\ts = s+etiquetas[x]+\" - \";\n\t\t}\n\t\treturn s;\n\t}",
"public void usar(Jugador jugador){\n System.out.println(\"\\n\" + jugador.masHambreIVitales(this.calorias) + \"\\n\");\n }",
"private void affichageDateFin() {\r\n\t\tif (dateFinComptage!=null){\r\n\t\t\tSystem.out.println(\"Le comptage est clos depuis le \"+ DateUtils.format(dateFinComptage));\r\n\t\t\tif (nbElements==0){\r\n\t\t\t\tSystem.out.println(\"Le comptage est clos mais n'a pas d'éléments. Le comptage est en anomalie.\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"Le comptage est clos et est OK.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Le compte est actif.\");\r\n\t\t}\r\n\t}",
"double kalkuliereZeit();",
"protected static String getmodoJuego() {\n return modoJuego;\n }",
"public String getnom ()\n {\n return nom_et;\n }",
"public String getErjiguanlianzd() {\n return erjiguanlianzd;\n }",
"String getVorlesungKennung();",
"public Date getDateEmbauche() {\r\n return dateEmbauche;\r\n }",
"static void cetak_data(String nama, int usia) {\n int tahun_sekarang = 2020, tahun_lahir = tahun_sekarang - usia;\r\n System.out.println(\"---------\\nNama Saya : \" + nama + \"\\nUsia Saya : \" + usia + \"\\nTahun Lahir : \" + tahun_lahir);\r\n }",
"public Nodo_Bodega ultimaAgregada(){\n return Nodo_bodega_final;\n }",
"private static void obterNumeroLugar(String nome) {\n\t\tint numero = gestor.obterNumeroLugar(nome);\n\t\tif (numero > 0)\n\t\t\tSystem.out.println(\"O FUNCIONARIO \" + nome + \" tem LUGAR no. \" + numero);\n\t\telse\n\t\t\tSystem.out.println(\"NAO EXISTE LUGAR de estacionamento atribuido a \" + nome);\n\t}",
"public void actualiser(int[] dernierJeu)\r\n {\r\n if (dernierJeu[2] == 0)\r\n {\r\n lignesHor[dernierJeu[0]][dernierJeu[1]] = true;\r\n }\r\n else\r\n {\r\n lignesVert[dernierJeu[0]][dernierJeu[1]] = true;\r\n }\r\n balayer();\r\n }",
"public Date getDateDembauche () {\n return dateEmbauche.copie();\n }",
"public Jugador obtenerJugador();",
"public void orina() {\n System.out.println(\"Que bien me quedé! Deposito vaciado.\");\n }",
"public void changerJoueur() {\r\n\t\t\r\n\t}",
"public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}",
"public RuimteFiguur() {\n kleur = \"zwart\";\n }",
"public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}",
"public String turno(enemigo enem){\n\t\tString tur;\n\t\ttur=atacar(enem);\n\t\treturn tur;\n\t}",
"public Persoon(){\n geboorteDag = 0;\n geboorteMaand = 0;\n geboorteJaar = 0;\n nieuweGeslacht = 'x';\n }",
"public String getEstablecimiento()\r\n/* 114: */ {\r\n/* 115:188 */ return this.establecimiento;\r\n/* 116: */ }",
"private void asignaNombre() {\r\n\r\n\t\tswitch (this.getNumero()) {\r\n\r\n\t\tcase 1:\r\n\t\t\tthis.setNombre(\"As de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tthis.setNombre(\"Dos de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tthis.setNombre(\"Tres de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tthis.setNombre(\"Cuatro de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tthis.setNombre(\"Cinco de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tthis.setNombre(\"Seis de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tthis.setNombre(\"Siete de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tthis.setNombre(\"Diez de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tthis.setNombre(\"Once de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tthis.setNombre(\"Doce de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"public static void main (String [] args){\r\n Jefatura jefe_RR=new Jefatura(\"Jeanpool\",55000,2006,9,25);\r\n jefe_RR.estableceIncentivo(2570);\r\n Empleado [] misEmpleados=new Empleado[6];\r\n misEmpleados[0]=new Empleado(\"Paco Gomez\",85000,1990,12,17);\r\n misEmpleados[1]=new Empleado(\"Ana Lopez\",95000,1995,06,02);\r\n misEmpleados[2]=new Empleado(\"Maria Martin\",105000,2002,03,15);\r\n misEmpleados[3]=new Empleado(\"Jeanpool Guerrero\");\r\n misEmpleados[4]=jefe_RR;/**--Polimorfismo: Prinicipio de sustitucion*/\r\n misEmpleados[5]=new Jefatura(\"Maria\",95000,1999,5,26);\r\n Jefatura jefa_Finanzas=(Jefatura)misEmpleados[5];/** CASTING CONVERTIR UN OBJETO A otro */\r\n jefa_Finanzas.estableceIncentivo(55000);\r\n \r\n \r\n \r\n /** for(int i=0;i<3; i++){\r\n misEmpleados[i].subeSueldo(5);\r\n \r\n }\r\n \r\n for(int i=0;i<3;i++){\r\n System.out.println(\"Nombre \"+misEmpleados[i].dimeNombre() + \"Sueldo: \"+misEmpleados[i].dimeSueldo()+ \"Fecha Alta: \"+misEmpleados[i].dameFechaContrato());\r\n }\r\n */\r\n\r\n for(Empleado elementos:misEmpleados){\r\n \r\n elementos.subeSueldo(5);\r\n \r\n }\r\n \r\n for(Empleado elementos:misEmpleados){\r\n System.out.println(\"Nombre: \"+elementos.dimeNombre()+ \" Sueldo: \"+elementos.dimeSueldo()+ \" Alta Contrato: \"+elementos.dameFechaContrato());\r\n }\r\n \r\n }",
"public static void main(String[] args) {\n\t\tint posIndi = 1;\n\t\tint posLara = 4;\n\n\t\t// Position de la bague\n\t\tint posBague = 7;\n\t\tboolean laraEstSurLaBague = false;\n\t\tboolean indiEstSurLaBague = false;\n\n\t\t// Position de la bombe, le joueur qui tombe sur cette case, voit sa partie\n\t\t// renitialisée\n\t\tint posBombe = 11;\n\n\t\t// Position du passage secret, si un joueur atteint cette case il est direct\n\t\t// propulsé à la case 14\n\t\tint posPassageSecret = 6;\n\n\t\t// Etat du jeu, vrai si personne n'a encore atteint le trésor\n\t\tboolean estEnCours = true;\n\n\t\t// Joueur Courant Indi --> 1 Lara --> 2\n\t\tint joueurCourant = 1;\n\n\t\tPlateauJeu jeu = new PlateauJeu();\n\t\tjeu.placerIndi(posIndi);\n\t\tjeu.placerLara(posLara);\n\t\tjeu.placerBague(posBague);\n\t\tjeu.placerPassage(posPassageSecret);\n\t\tjeu.placerBombe(posBombe);\n\n\t\t// Jeu\n\t\twhile (estEnCours) {\n\t\t\tif (joueurCourant == 1) {\n\t\t\t\tjeu.afficherInformation(\"Tour d'Indi!\");\n\t\t\t\tint de = jeu.lancerDe();\n\t\t\t\tposIndi += de;\n\t\t\t\tif (posIndi == posLara) {\n\t\t\t\t\tposIndi++;\n\t\t\t\t}\n\t\t\t\t// Si Indi est sur la case du passage, on supprime le passage et on empêche tout autre personne de marcher sur le passage\n\t\t\t\tif (posIndi == posPassageSecret) {\n\t\t\t\t\tjeu.afficherInformation(\n\t\t\t\t\t\t\t\"Indi a pris le passage secret, il sera à la case 14, cliquez \\\"suivant\\\" pour continuer\");\n\t\t\t\t\tposIndi = 14;\n\t\t\t\t\tjeu.supprimerPassage();\n\t\t\t\t\tposPassageSecret = -1;\n\t\t\t\t\tjeu.suivant();\n\t\t\t\t}\n\t\t\t\t// Si Indi est sur la case de la bombe, on supprime la bombe et on empêche tout autre personne de marcher sur une bombe\n\t\t\t\tif (posIndi == posBombe) {\n\t\t\t\t\tjeu.supprimerIndi();\n\t\t\t\t\tposIndi = 1;\n\t\t\t\t\tjeu.placerIndi(posIndi);\n\t\t\t\t\tjeu.supprimerBombe();\n\t\t\t\t\tposBombe = -1;\n\t\t\t\t\tjeu.afficherInformation(\n\t\t\t\t\t\t\t\"Indi a pris la bombe, sa partie est renitialisée, cliquez \\\"suivant\\\" pour continuer\");\n\t\t\t\t\tjeu.suivant();\n\t\t\t\t}\n\t\t\t\t// Si Indi est sur la case de la bague, on supprime la bague et on empêche tout autre personne de marcher sur une bague\n\t\t\t\tif (posIndi == posBague) {\n\t\t\t\t\tindiEstSurLaBague = true;\n\t\t\t\t\tjeu.supprimerBague();\n\t\t\t\t\tjeu.placerIndi(posIndi);\n\t\t\t\t\tposBague = -1;\n\t\t\t\t\tjeu.afficherInformation(\n\t\t\t\t\t\t\t\"Indi a pris la bague, il perd un tour, cliquez \\\"suivant\\\" pour continuer\");\n\t\t\t\t\tjeu.suivant();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tposIndi = (posIndi > 16) ? 16 : posIndi;\n\t\t\t\tjeu.deplacerIndi(posIndi);\n\t\t\t\t\n\t\t\t\t// Si Lara n'a pas marché sur la bague, le tour prochain est le sien\n\t\t\t\tif (!laraEstSurLaBague) {\n\t\t\t\t\tjoueurCourant = 2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Si Lara a marché sur la bague, elle perd un tour\n\t\t\t\tif (laraEstSurLaBague) {\n\t\t\t\t\tlaraEstSurLaBague = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tjeu.afficherInformation(\"Tour de Lara!\");\n\t\t\t\tint de = jeu.lancerDe();\n\t\t\t\tposLara += de;\n\t\t\t\tif (posLara == posIndi) {\n\t\t\t\t\tposLara++;\n\t\t\t\t}\n\t\t\t\t// Si Lara est sur la case du passage, on supprime le passage et on empêche tout autre personne de marcher sur le passage\n\t\t\t\tif (posLara == posPassageSecret) {\n\t\t\t\t\tjeu.afficherInformation(\n\t\t\t\t\t\t\t\"Lara a pris le passage secret, elle sera à la case 14, cliquez \\\"suivant\\\" pour continuer\");\n\t\t\t\t\tposLara = 14;\n\t\t\t\t\tjeu.supprimerPassage();\n\t\t\t\t\tposPassageSecret = -1;\n\t\t\t\t\tjeu.suivant();\n\t\t\t\t}\n\t\t\t\t// Si Lara est sur la case de la bombe, on supprime la bombe et on empêche tout autre personne de marcher sur une bombe\n\t\t\t\tif (posLara == posBombe) {\n\t\t\t\t\tjeu.supprimerLara();\n\t\t\t\t\tposLara = 4;\n\t\t\t\t\tjeu.placerLara(posLara);\n\t\t\t\t\tjeu.supprimerBombe();\n\t\t\t\t\tposBombe = -1;\n\t\t\t\t\tjeu.afficherInformation(\n\t\t\t\t\t\t\t\"Lara a pris la bombe, sa partie est renitialisée, cliquez \\\"suivant\\\" pour continuer\");\n\t\t\t\t\tjeu.suivant();\n\t\t\t\t}\n\t\t\t\t// Si Lara est sur la case de la bague, on supprime la bague et on empêche tout autre personne de marcher sur une bague\n\t\t\t\tif (posLara == posBague) {\n\t\t\t\t\tlaraEstSurLaBague = true;\n\t\t\t\t\tjeu.supprimerBague();\n\t\t\t\t\tjeu.placerLara(posLara);\n\t\t\t\t\tposBague = -1;\n\t\t\t\t\tjeu.afficherInformation(\n\t\t\t\t\t\t\t\"Lara a pris la bague, elle perd un tour, cliquez \\\"suivant\\\" pour continuer\");\n\t\t\t\t\tjeu.suivant();\n\t\t\t\t}\n\t\t\t\tposLara = (posLara > 16) ? 16 : posLara;\n\t\t\t\tjeu.deplacerLara(posLara);\n\t\t\t\t\n\t\t\t\t// Si Indi n'a pas marché sur la bague, le tour prochain est le sien\n\t\t\t\tif (!indiEstSurLaBague) {\n\t\t\t\t\tjoueurCourant = 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Si Indi a marché sur la bague, il perd un tour\n\t\t\t\tif (indiEstSurLaBague) {\n\t\t\t\t\tindiEstSurLaBague = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Condition de continuation du jeu\n\t\t\testEnCours = posLara < 16 && posIndi < 16;\n\t\t}\n\n\t\tif (posLara == 16) {\n\t\t\tjeu.afficherInformation(\"Lara a gagné! La partie est terminée\");\n\t\t} else {\n\t\t\tjeu.afficherInformation(\"Indi a gagné! La partie est terminée\");\n\t\t}\n\n\t}",
"public void toonFiguur() {\n System.out.format(\"kleur: %-5s oppervlakte: %5.3f inhoud: %5.3f\\n\",\n kleur, oppervlakte(), inhoud());\n }",
"private static void mostrarEmpateRonda() {\r\n\t\tSystem.out.println(\"¡RONDA \" + juego.getNRonda()\r\n\t\t\t\t+ \" EMPATADA!\\n Se repite la ronda \" + juego.getNRonda());\r\n\t}",
"public String obtenerNombreAtaque(){\n\treturn nombreAtaque;\n }",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"public int usaAtaque() {\n\t\treturn dano;\n\t}",
"public final String deu() {\n String str;\n AppMethodBeat.i(26738);\n String str2 = \"\";\n synchronized (this) {\n try {\n if (this.iPr == null || this.iPr.size() <= 0) {\n str = \"\";\n } else {\n int i = 0;\n while (i < this.iPr.size()) {\n com.tencent.mm.plugin.wenote.model.a.c cVar = (com.tencent.mm.plugin.wenote.model.a.c) this.iPr.get(i);\n switch (cVar.getType()) {\n case -1:\n str = str2 + \"<hr/>\";\n break;\n case 1:\n i iVar = (i) cVar;\n if (!bo.isNullOrNil(iVar.content)) {\n str2 = str2 + iVar.content;\n if (i + 1 < this.iPr.size() && ((com.tencent.mm.plugin.wenote.model.a.c) this.iPr.get(i + 1)).getType() == 1 && !bo.isNullOrNil(((i) this.iPr.get(i + 1)).content)) {\n str = str2 + \"<br/>\";\n break;\n }\n }\n str = str2 + \"<br/>\";\n break;\n case 2:\n str = str2 + dO(((f) cVar).uOo, 2);\n break;\n case 3:\n str = str2 + dO(((g) cVar).uOo, 3);\n break;\n case 4:\n l lVar = (l) cVar;\n str = str2 + dO(lVar.uOo, lVar.getType());\n break;\n case 5:\n str = str2 + dO(((d) cVar).uOo, 5);\n break;\n case 6:\n str = str2 + dO(((k) cVar).uOo, 6);\n break;\n case 20:\n str = str2 + dO(((com.tencent.mm.plugin.wenote.model.a.b) cVar).uOo, 20);\n break;\n default:\n str = str2;\n break;\n }\n i++;\n str2 = str;\n }\n str = str2.replaceAll(IOUtils.LINE_SEPARATOR_UNIX, \"<br/>\");\n AppMethodBeat.o(26738);\n }\n } finally {\n while (true) {\n AppMethodBeat.o(26738);\n }\n }\n }\n return str;\n }",
"void verEnPantalla() {\r\n\t\tSystem.out.println( numEnPantalla );\r\n\t}",
"public static void main(String[] args) {\n Pasien Dam = new Pasien(\"Puspaningsyas\");\r\n Dam.setTanggalLahir(1974, 1, 12);\r\n// String str = Dam.getNama();\r\n \r\n \r\n\r\n System.out.println(\"Umur = \" + Dam.getUsia());\r\n Dam.NomorRekamMedis();\r\n // System.out.println(str.substring(0, 3));\r\n\r\n// Pasien Dam2 = new Pasien(\"Dam\");\r\n// Dam2.setTanggalLahir(1999,3,13);\r\n// System.out.println(\"Umur = \" +Dam2.getUsia());\r\n }",
"java.lang.String getNume();",
"java.lang.String getNume();",
"public abstract String dohvatiKontakt();",
"public String creerDureeJtable(String chaine){\r\n\t\tif(chaine.length() == 1){\r\n\t\t\treturn chaine+\"h00\";\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn chaine.substring(0, 1)+\"h\"+chaine.substring(1, chaine.length());\r\n\t\t}\r\n\t\t\r\n\t}",
"public void comienzo(Jugador jugador, Estado estado) {\r\n\t\tthis.jugador = jugador;\r\n }",
"protected String elaboraIncipitSpecifico() {\n return VUOTA;\n }",
"public void afficher (UneCommande22<Integer> cde){ //POURQUOI CETTE MÉTHODE EST STATIQUE??? LA DEPLACER PE DANS COMMANDE\n\t\t\t\tif(cde.taille()==0) {ClientJava1DateUser.affiche(\"\\n\\t\\t COMMANDE EST VIDE\");\n\t\t\t\t}\n\t\t\t\telse {ClientJava1DateUser.affiche(cde.toString());}\t\n\t\t\t}",
"@Test\n public void bateauAtNoBateau() {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n Grille g = new Grille(10, 10, j, p);\n\n Bateaux ba = new ContreTorpilleur(new Place[]{new Place(\"A5\")}, j, p, true);\n g.setListBateaux(Collections.singletonList(ba));\n\n Bateaux b = j.bateauAt(new Place(\"A6\"), g);\n\n assertNull(\"Il n'y a pas de bateau ici\", b);\n }",
"public int verifierHoraire(String chaine){\r\n\t\t//System.out.println(\"chaine : \"+chaine);\r\n\t\tString tabHoraire[] = chaine.split(\":\");\r\n\t\t\r\n\t\tif((Integer.parseInt(tabHoraire[0]) < AUTO_ECOLE_OUVERTURE ) || (Integer.parseInt(tabHoraire[0])> AUTO_ECOLE_FERMETURE)){\r\n\t\t\treturn -6;\r\n\t\t}\r\n\t\tif((Integer.parseInt(tabHoraire[1]) < 0 ) || (Integer.parseInt(tabHoraire[1]) >= 60 )){\r\n\t\t\treturn -7;\r\n\t\t}\r\n\t\t\r\n\t\t return 0;\r\n\t}",
"public String getAchterNaam(){\n return achternaam;\n }",
"protected String elaboraTemplateAvviso() {\n String testo = VUOTA;\n String dataCorrente = date.get();\n String personeTxt = \"\";\n personeTxt = text.format(numVoci);\n\n if (usaHeadTemplateAvviso) {\n testo += tagHeadTemplateAvviso;\n testo += \"|bio=\";\n testo += personeTxt;\n testo += \"|data=\";\n testo += dataCorrente.trim();\n testo += \"|progetto=\";\n testo += tagHeadTemplateProgetto;\n testo = LibWiki.setGraffe(testo);\n }// end of if cycle\n\n return testo;\n }",
"public void parler() {\n\t System.out.println(this.formulerMonNom()); // appel d'une méthode de l'objet\n\t System.out.println(\"Je suis un animal et j'ai \" + this.nombreDePatte + \" pattes\");\n\t }",
"@Override\n public String toString() {\n return \"Ultima Manutencao em: \"+this.ultimaManun+\" km's.\";\n }"
] |
[
"0.66130817",
"0.65901345",
"0.6481653",
"0.6434715",
"0.6386727",
"0.63612115",
"0.6350422",
"0.63212097",
"0.6319634",
"0.6254032",
"0.62450564",
"0.6204608",
"0.617293",
"0.61436456",
"0.6131047",
"0.61185557",
"0.61108273",
"0.61104363",
"0.6098737",
"0.60894996",
"0.60851616",
"0.60848594",
"0.6055846",
"0.6044921",
"0.60428536",
"0.6030871",
"0.6028646",
"0.60210496",
"0.6016235",
"0.60152835",
"0.6005506",
"0.59960127",
"0.5971502",
"0.59594554",
"0.5942217",
"0.5930675",
"0.59234935",
"0.592186",
"0.5909848",
"0.5907192",
"0.59024405",
"0.5901891",
"0.58873427",
"0.588722",
"0.5886474",
"0.5885329",
"0.58809376",
"0.58755773",
"0.5875249",
"0.5874701",
"0.5874636",
"0.5872118",
"0.58644843",
"0.5845318",
"0.58421415",
"0.5827663",
"0.582519",
"0.58237785",
"0.5811826",
"0.58085537",
"0.5802036",
"0.5800651",
"0.57987237",
"0.57782096",
"0.5776816",
"0.5776789",
"0.57764477",
"0.5775369",
"0.5775339",
"0.5769163",
"0.5768958",
"0.5767987",
"0.57647264",
"0.5762378",
"0.5757384",
"0.57514167",
"0.57501537",
"0.57442504",
"0.57425046",
"0.5741744",
"0.57390475",
"0.5738095",
"0.5737938",
"0.57349247",
"0.57338196",
"0.57219535",
"0.570905",
"0.57082087",
"0.57082087",
"0.5703592",
"0.570257",
"0.5696361",
"0.56925195",
"0.5688937",
"0.56831783",
"0.5675893",
"0.56755525",
"0.5672807",
"0.567194",
"0.56663936"
] |
0.5948196
|
34
|
TODO: Warning this method won't work in the case the id fields are not set
|
@Override
public boolean equals(Object object) {
if (!(object instanceof Destino)) {
return false;
}
Destino other = (Destino) object;
if ((this.idDestino == null && other.idDestino != null) || (this.idDestino != null && !this.idDestino.equals(other.idDestino))) {
return false;
}
return true;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void setId(Integer id) { this.id = id; }",
"private Integer getId() { return this.id; }",
"public void setId(int id){ this.id = id; }",
"public void setId(Long id) {this.id = id;}",
"public void setId(Long id) {this.id = id;}",
"public void setID(String idIn) {this.id = idIn;}",
"public void setId(int id) { this.id = id; }",
"public void setId(int id) { this.id = id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public void setId(long id) { this.id = id; }",
"public void setId(long id) { this.id = id; }",
"public int getId(){ return id; }",
"public int getId() {return id;}",
"public int getId() {return Id;}",
"public int getId(){return id;}",
"public void setId(long id) {\n id_ = id;\n }",
"private int getId() {\r\n\t\treturn id;\r\n\t}",
"public Integer getId(){return id;}",
"public int id() {return id;}",
"public long getId(){return this.id;}",
"public int getId(){\r\n return this.id;\r\n }",
"@Override public String getID() { return id;}",
"public Long id() { return this.id; }",
"public Integer getId() { return id; }",
"@Override\n\tpublic Integer getId() {\n return id;\n }",
"@Override\n public Long getId () {\n return id;\n }",
"@Override\n public long getId() {\n return id;\n }",
"public Long getId() {return id;}",
"public Long getId() {return id;}",
"public String getId(){return id;}",
"@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}",
"public Integer getId() { return this.id; }",
"@Override\r\n public int getId() {\n return id;\r\n }",
"@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}",
"public int getId() {\n return id;\n }",
"public long getId() { return _id; }",
"public int getId() {\n/* 35 */ return this.id;\n/* */ }",
"public long getId() { return id; }",
"public long getId() { return id; }",
"public void setId(Long id) \n {\n this.id = id;\n }",
"@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}",
"public void setId(String id) {\n this.id = id;\n }",
"@Override\n\tpublic void setId(Long id) {\n\t}",
"public Long getId() {\n return id;\n }",
"public long getId() { return this.id; }",
"public int getId()\n {\n return id;\n }",
"public void setId(int id){\r\n this.id = id;\r\n }",
"@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}",
"protected abstract String getId();",
"@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}",
"public String getId() { return id; }",
"public String getId() { return id; }",
"public String getId() { return id; }",
"public int getID() {return id;}",
"public int getID() {return id;}",
"public int getId ()\r\n {\r\n return id;\r\n }",
"@Override\n public int getField(int id) {\n return 0;\n }",
"public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }",
"public int getId(){\r\n return localId;\r\n }",
"void setId(int id) {\n this.id = id;\n }",
"@Override\n public Integer getId() {\n return id;\n }",
"@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"@Override\n public int getId() {\n return id;\n }",
"@Override\n public int getId() {\n return id;\n }",
"public void setId(int id)\n {\n this.id=id;\n }",
"@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }",
"@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}",
"public int getId()\r\n {\r\n return id;\r\n }",
"public void setId(Long id){\n this.id = id;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"final protected int getId() {\n\t\treturn id;\n\t}",
"private void clearId() {\n \n id_ = 0;\n }",
"public abstract Long getId();",
"public void setId(Long id) \r\n {\r\n this.id = id;\r\n }",
"@Override\n public long getId() {\n return this.id;\n }",
"public String getId(){ return id.get(); }",
"@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }",
"public void setId(long id){\n this.id = id;\n }",
"public void setId(long id){\n this.id = id;\n }",
"public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }",
"public Long getId() \n {\n return id;\n }",
"@Override\n\tpublic void setId(int id) {\n\n\t}",
"public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }",
"@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}",
"public int getId()\n {\n return id;\n }",
"public int getID(){\n return id;\n }",
"public String getID(){\n return Id;\n }"
] |
[
"0.6897049",
"0.6839498",
"0.67057544",
"0.66417086",
"0.66417086",
"0.6592169",
"0.6579292",
"0.6579292",
"0.6575263",
"0.6575263",
"0.6575263",
"0.6575263",
"0.6575263",
"0.6575263",
"0.656245",
"0.656245",
"0.65447694",
"0.65251684",
"0.6516205",
"0.6487982",
"0.6477638",
"0.6428175",
"0.64196116",
"0.6418121",
"0.64022696",
"0.6367566",
"0.6355691",
"0.6352598",
"0.6348783",
"0.6325491",
"0.63200915",
"0.63026214",
"0.62942576",
"0.62942576",
"0.62838596",
"0.62720686",
"0.6267314",
"0.62664306",
"0.62634486",
"0.626002",
"0.6256922",
"0.6251961",
"0.6248661",
"0.6248661",
"0.6245221",
"0.62398785",
"0.62398785",
"0.62326866",
"0.62245816",
"0.6220949",
"0.6220645",
"0.6212643",
"0.6210262",
"0.62027115",
"0.62024575",
"0.6193926",
"0.61905754",
"0.61905754",
"0.61905754",
"0.6190146",
"0.6190146",
"0.618559",
"0.61844486",
"0.61750674",
"0.61745095",
"0.6168598",
"0.6167194",
"0.6161174",
"0.61578095",
"0.61578095",
"0.61578095",
"0.61578095",
"0.61578095",
"0.61578095",
"0.61578095",
"0.6156709",
"0.6156709",
"0.6143479",
"0.6135095",
"0.6129762",
"0.6129127",
"0.61063343",
"0.61055714",
"0.61055714",
"0.6104239",
"0.61037016",
"0.6102918",
"0.61012363",
"0.6100267",
"0.6094533",
"0.60939157",
"0.60936975",
"0.60936975",
"0.60916936",
"0.60904694",
"0.6077306",
"0.6073186",
"0.60725886",
"0.60711926",
"0.60707015",
"0.6070076"
] |
0.0
|
-1
|
method for adding a new movie
|
public void save(View view){
try{
if(!(Text1.getText().toString().isEmpty()||Text2.getText().toString().isEmpty()||Text3.getText().toString().isEmpty()||Text4.getText().toString().isEmpty()||Text5.getText().toString().isEmpty()||Text6.getText().toString().isEmpty())){
int rates=Integer.parseInt(String.valueOf(Text5.getText()));
int yr=Integer.parseInt(String.valueOf(Text2.getText()));
if(rates<=10 && yr>1895) {
boolean insert = db.insert_movies(Text1.getText().toString(), Text2.getText().toString(), Text3.getText().toString(), Text4.getText().toString(), Integer.parseInt(String.valueOf(Text5.getText())), Text6.getText().toString());
Cursor movies = db.get_movies();
if (insert) {
Log.d("xyz", String.valueOf(movies.getCount()));
Log.d("xyz", "Added a new Movie");
Toast.makeText(RegisterMovie.this, "A movie is added to watched movies list", Toast.LENGTH_SHORT).show();
Text1.setText("");
Text2.setText("");
Text3.setText("");
Text4.setText("");
Text5.setText("");
Text6.setText("");
}
}else{
Toast.makeText(this,"Give Valid year and rate",Toast.LENGTH_SHORT).show();
}
}else{
Toast.makeText(this, "Fill all the textFields", Toast.LENGTH_SHORT).show();
}
}catch (Exception ex){
Toast.makeText(this,"Give valid Values",Toast.LENGTH_SHORT).show();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"Movie addMovie(final Movie movie);",
"public void addMovie(ArrayList<Movie> movies)\n {\n String title = \"\";\n String director = \"\";\n String actor1 = \"\";\n String actor2 = \"\";\n String actor3 = \"\";\n int rating = 0;\n \n title = insertTitle();\n boolean checkResult = checkMovieRedundancyByTitle(movies, title);\n if (checkResult == true)\n return;\n \n director = insertDirector();\n actor1 = insertActor(1);\n actor2 = insertActor(2);\n if (actor2.length() != 0)\n actor3 = insertActor(3);\n \n rating = insertRating();\n \n Movie film = createNewMovie(title,director,actor1,actor2,actor3,rating);\n movies.add(film);\n displayOneFilm(film);\n System.out.println(\"\\n\\t\\t\\t >>>>> Yeayy, \" + title.toUpperCase() + \" successfully ADD to database! <<<<< \");\n }",
"private static void addMovie(){\n\t\tscanner = new Scanner(System.in);\n\t\t\n\t\tStringBuilder parameters = new StringBuilder();\n\t\tSystem.out.println(\"Enter movie name\");\n\t\tparameters.append(\"?name=\");\n\t\tparameters.append(Operations.scanner.nextLine().replaceAll(\" \",\"+\"));\n\t\tSystem.out.println(\"\\nEnter movie release year\");\n\t\tparameters.append(\"&year=\");\n\t\tparameters.append(Operations.scanner.nextLine().replaceAll(\" \",\"+\"));\n\t\tSystem.out.println(\"\\nEnter movie director\");\n\t\tparameters.append(\"&director=\");\n\t\tparameters.append(Operations.scanner.nextLine().replaceAll(\" \",\"+\"));\n\t\tSystem.out.println(\"\\nEnter movie production country\");\n\t\tparameters.append(\"&country=\");\n\t\tparameters.append(Operations.scanner.nextLine().replaceAll(\" \",\"+\"));\n\t\t\n\t\t\n\t\tString finalURL = \"http://localhost:8080/addMovie\"+parameters.toString();\n\t\t//System.out.println(finalURL);\n\t\t\n\t\t\n\t\ttry{\n\t\t\tURL url = new URL(finalURL);\n\t\t\tString rawJSONObject = getHTTPResponse(url);\n\t\t\tJSONObject addedMovie = new JSONObject(rawJSONObject);\n\t\t\tStringBuilder info = new StringBuilder();\n\t\t\t\n\t\t\tinfo.append(\"Movie: \");\n\t\t\tinfo.append(addedMovie.getString(\"name\"));\n\t\t\tinfo.append(\"/\");\n\t\t\tinfo.append(addedMovie.getInt(\"year\"));\n\t\t\tinfo.append(\"/\");\n\t\t\tinfo.append(addedMovie.getString(\"director\"));\n\t\t\tinfo.append(\"/\");\n\t\t\tinfo.append(addedMovie.getString(\"country\"));\n\t\t\tinfo.append(\" added successfully with ID \");\n\t\t\tinfo.append(addedMovie.getInt(\"id\"));\n\t\t\t\n\t\t\tSystem.out.println(info.toString());\n\t\t}catch(Exception e){System.out.println(\"Error - wrong input or service down\");}\n\t}",
"public String insertMovie(Movie movie)\r\n\t{\n\t\tthis.mongo.insert(movie);\r\n\t\treturn null;\r\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n Movies movie = new Movies(nameField.getText(),genreField.getText(),durationField.getText(),\n dateField.getText(),Integer.parseInt(seatsField.getText()),Integer.parseInt(priceField.getText()), imageField.getText());\n\n /**\n * Connexion et requete à la BDD\n */\n try{\n String query = \"INSERT INTO MOVIES(movie_name, movie_genre, movie_duration, movie_releasedate, movie_numberofseats, movie_price, image) VALUES (?,?,?,?,?,?,?)\";\n Connection con = DriverManager.getConnection(\"jdbc:h2:./default\");\n PreparedStatement pst = con.prepareStatement(query);\n pst.setString(1, movie.getName());\n pst.setString(2, movie.getGenre());\n pst.setString(3, movie.getDuration());\n pst.setString(4, movie.getReleaseDate());\n pst.setInt(5, movie.getNumberOfSeats());\n pst.setInt(6, movie.getPrice());\n pst.setString(7, movie.getImage());\n pst.executeUpdate();\n JOptionPane.showMessageDialog(null, \"Movie added\");\n\n //Redirection vers la page d'accueil des admins\n new AdminPage();\n dispose();\n\n\n }catch (Exception ex){\n JOptionPane.showMessageDialog(null, ex);\n\n }\n\n }",
"@Override\n\tpublic void addFilm(com.dutproject.cinemaproject.model.bean.Film film) {\n\t\t\n\t}",
"private void addMovieToDb() {\n ContentValues contentValues = new ContentValues();\n\n contentValues.put(MovieColumns.ADULT,mMovie.getAdult());\n contentValues.put(MovieColumns.BACKDROP_PATH,mMovie.getBackdropPath());\n contentValues.put(MovieColumns.GENRE,Utils.arrayToString(mMovie.getGenreIds()));\n contentValues.put(MovieColumns.MOV_ID,mMovie.getMovieId());\n contentValues.put(MovieColumns.ORIGINAL_LANGUAGE,mMovie.getOrigLanguage());\n contentValues.put(MovieColumns.ORIGINAL_TITLE,mMovie.getOrigTitle());\n contentValues.put(MovieColumns.OVERVIEW,mMovie.getOverview());\n contentValues.put(MovieColumns.RELEASE_DATE,mMovie.getReleaseDate());\n contentValues.put(MovieColumns.POSTER_PATH,mMovie.getPosterPath());\n contentValues.put(MovieColumns.POPULARITY,mMovie.getPopularity());\n contentValues.put(MovieColumns.TITLE,mMovie.getTitle());\n contentValues.put(MovieColumns.VIDEO, mMovie.getVideo());\n contentValues.put(MovieColumns.VOTE_AVERAGE, mMovie.getVoteAverage());\n contentValues.put(MovieColumns.VOTE_COUNT, mMovie.getVoteCount());\n\n try {\n getActivity().getContentResolver().insert(MoviesProvider.Movies.MOVIES_URI, contentValues);\n Toast.makeText(getContext(),getString(R.string.movie_added_as_favorite),Toast.LENGTH_SHORT).show();\n }catch (Exception ex){\n if(ex instanceof SQLiteConstraintException){\n Toast.makeText(getContext(), getString(R.string.movie_already_added_as_favorite), Toast.LENGTH_SHORT).show();\n }else {\n Toast.makeText(getContext(), getString(R.string.movie_added_as_favorite_problem), Toast.LENGTH_SHORT).show();\n }\n }\n }",
"public boolean addVideo(Video newVideo)throws NullPointerException;",
"@Override\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\tOperation.addMovie(movies,name.getText(),Integer.parseInt(priceField.getText()),(Integer)length.getValue(),(String)kind.getSelectedItem());\n\t\t\t\t\t\t\tlistModel.removeAllElements();\n\t\t\t\t\t\t\tfor (int i = 0; i < movies.size(); i++) {\n\t\t\t\t\t\t\t\tlistModel.addElement(movies.get(i).name);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taddFrame.dispose();\n\t\t\t\t\t\t}",
"@Override\r\n\tpublic boolean addMovie(String actor1, String actor2, String movieName)\r\n\t{\r\n\t\tActor act1 = new Actor(actor1);\r\n\t\tActor act2 = new Actor(actor2);\r\n\t\t\r\n\t\tif(graph.containsVertex(act1) && graph.containsVertex(act2))\r\n\t\t{\r\n\t\t\tif(graph.containsEdge(act1,act2 ) == false)\r\n\t\t\t{\r\n\t\t\t\tgraph.addEdge(act1, act2, 1, movieName);\r\n\t\t\t\t\r\n\t\t\t\tMovieEdge movieTitle = graph.addEdge(act1, act2, 1, movieName);\r\n\r\n\t\t\t\tmovieTitles.add(movieTitle.getMovieName());\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public void addMovieToFavorites(Movie movie) {\n movie.setFavorite(true);\n isFavorite = true;\n //change the star from gray to yellow\n star.setImageResource(R.drawable.ic_grade_yellow_36px);\n //save the poster in local storage\n String imageName = saveMoviePoster();\n\n //load the necessary movie fields into the ContentValues object\n ContentValues values = new ContentValues();\n values.put(FavoriteMoviesContract.MovieEntry.MOVIEDB_ID, movie.getId());\n values.put(FavoriteMoviesContract.MovieEntry.AVERAGE_VOTE, movie.getVoteAverage());\n values.put(FavoriteMoviesContract.MovieEntry.ORIGINAL_TITLE, movie.getOriginalTitle());\n values.put(FavoriteMoviesContract.MovieEntry.RELEASE_YEAR, movie.getReleaseYear());\n values.put(FavoriteMoviesContract.MovieEntry.RUNTIME, movie.getRuntime());\n values.put(FavoriteMoviesContract.MovieEntry.SYNOPSIS, movie.getSynopsis());\n values.put(FavoriteMoviesContract.MovieEntry.POSTER_IMAGE_NAME, imageName);\n\n //insert the movie into the Favorites db\n Uri uri = getActivity().getContentResolver().\n insert(FavoriteMoviesContract.MovieEntry.CONTENT_URI, values);\n\n if (uri != null) {\n String successMessage = \"You have successfully added \" + movie.getOriginalTitle() +\n \" to the Favorites collection\";\n Toast.makeText(getActivity(), successMessage, Toast.LENGTH_LONG).show();\n }\n }",
"public void addMovieDetails(MovieDetails movieDetails) {\n if (movieDetails != null) {\n if (!isMovieDetailsExists(movieDetails.getId())) {\n SQLiteDatabase sqLiteDatabase = this.getWritableDatabase();\n // Insert movie details data\n ContentValues values = insertMovieDetailsInCntnValues(movieDetails);\n sqLiteDatabase.insert(MoviesDetailsEntry.TABLE_NAME, null, values);\n // Insert genres data into genres table\n for (int i = 0; i < movieDetails.getGenres().size(); i++) {\n // If such genre doesn't exist, put into database\n if (!isGenreExist(movieDetails.getGenres().get(i).getGenreId())) {\n ContentValues genreValues = insertMovieGenresInCntnValues(movieDetails.getGenres().get(i));\n sqLiteDatabase.insert(GenreEntry.TABLE_NAME, null, genreValues);\n }\n // Insert genre_id and movie_id into movie_genre table\n ContentValues movieGenreValues = insertMovieGenreValues(movieDetails.getId(), movieDetails.getGenres().get(i).getGenreId());\n sqLiteDatabase.insert(MovieGenreEntry.TABLE_NAME, null, movieGenreValues);\n }\n sqLiteDatabase.close();\n }\n } else {\n throw new IllegalArgumentException(\"Passed movie object is null or already exist\");\n }\n }",
"@Override\r\n \t\t\tpublic void onClick(ClickEvent event) {\n \t\t\t\tmovieProvider.getList().add(new Movie(\"\", 0, Language.English, \"\", \"\"));\r\n \t\t\t\tmovieTable.redraw();\r\n \t\t\t\t//movieProvider.refresh();\r\n \t\t\t\tWindow.alert(\"Added\");\r\n \t\t }",
"@Override\n\tpublic int addMovie(Movie movie) {\n\t\tfinal String sql=\"Insert into movie(MOVIE_ID,MOVIE_NAME,LANGUAGE,GENERE,TYPE,DURATION) values(\"+movie.getMovieId()+\",'\"+movie.getMovieName()+\"','\"+movie.getLanguage()+\"','\"+movie.getGenere()+\"','\"+movie.getType()+\"',\"+movie.getDuration()+\")\";\n\t\t\n\t\tJdbcTemplate jdbcTemplate=JdbcTemplateFactory.getJdbcTemplate();\n\t\tKeyHolder keyHolder= new GeneratedKeyHolder();\n\t\t\n\t\tjdbcTemplate.update(new PreparedStatementCreator(){\n\n\t\t\t@Override\n\t\t\tpublic PreparedStatement createPreparedStatement(Connection connection)\n\t\t\t\t\tthrows SQLException {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\n\t\t\t}\n\t\t\t\n\t\t},keyHolder);\n\t\treturn keyHolder.getKey().intValue();\n\t}",
"public void addMovie(String t, int r) throws IllegalArgumentException\n\t{\n\t\tif(this.containsMovie(t))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif( r < 0 || r > 100)\n\t\t{\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\t\n\t\tlist_of_movies.add(new Movie(t,r));\n\t}",
"public void setMovie(Movie movie) {\n this.movie = movie;\n }",
"@Override\n\tpublic MovieBean addMovie(MovieBean bean) {\n\n\t\treturn dao.addMovie(bean);\n\t}",
"public void addFilm(Film film){\r\n this.cinema_film_list.add(film);\r\n }",
"private void addMovieToArray(ArrayList<Movie> movies, String movieName, String directorName, String act1, String act2, String act3, int star)\n {\n Movie clip = new Movie(movieName, directorName, act1, act2, act3, star);\n movies.add(clip);\n }",
"@Override\n\tpublic Movie createMovie(Movie movie) throws MovieAlreadyExistsException {\n\t\tMovie existing;\n\t\ttry {\n\t\t\texisting = repository.findMovieByTitle(movie.getTitle());\n\t\t\tif(existing!=null){\n\t\t\t\tthrow new MovieAlreadyExistsException();\n\t\t\t}\n\t\t} catch (MovieNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\treturn repository.createMovie(movie);\n\t}",
"@POST\n public JsonMovie createUpdateOne(JsonMovie movie) {\n \tJsonMovie jmovie = movie;\n \tif (movie.getId() == null) {\n \t\tMovie m = new Movie();\n \t\tm.setTitle(movie.getTitle());\n \t\tm.setDescription(movie.getDescription());\n \t\tm.setReleasedate(movie.getReleaseDate());\n \t\tm.setLength(movie.getLength());\n \t\tm.setIscollector(movie.getIsCollector());\n \t\tm.setSupportBean(supportDAO.getSupport(movie.getSupportId()));\n \t\tm.setStorygenre(storygenreDAO.getStorygenre(movie.getGenreId()));\n \t\tmovieDao.saveMovie(m);\n\t \tjmovie.setId(m.getId());\n \t} else {\n \tMovie m = movieDao.getMovie(movie.getId());\n \t\tm.setTitle(movie.getTitle());\n \t\tm.setDescription(movie.getDescription());\n \t\tm.setReleasedate(movie.getReleaseDate());\n \t\tm.setLength(movie.getLength());\n \t\tm.setIscollector(movie.getIsCollector());\n \t\tm.setSupportBean(supportDAO.getSupport(movie.getSupportId()));\n \t\tm.setStorygenre(storygenreDAO.getStorygenre(movie.getGenreId()));\n \t\tmovieDao.updateMovie(m);\n \t}\n \treturn jmovie;\n }",
"public void saveUserMovie(UserMovie userMovie);",
"void onLoadMovie(Movie movie);",
"@Override\n\tpublic MovieDTO createMovie(CreateMovieRequest request) {\n\t\treturn null;\n\t}",
"public void addMovie(String name, String[] actors) {\n\t\t\n\t\tArrayList<Actor> movieActors = new ArrayList<>(); // list of actors in the movie\n\t\tMovie newMovie = new Movie(name, movieActors);\n\t\tboolean addedMovie = false;\n\t\tfor(Movie movie : this.movieList) {\n\t\t\tif(movie.getName().equals(newMovie.getName())) {\n\t\t\t\taddedMovie = true;\n\t\t\t}\n\t\t}\n\t\tif(addedMovie == false) {\n\t\t\tArrayList<Movie> actorMovies = new ArrayList<>(); //list of movies with actor in\n\t\t\tthis.movieList.add(newMovie);\n\t\t\tactorMovies.add(newMovie);\n\t\t\tfor(String actorName: actors) {\n\t\t\t\tActor newActor = new Actor(actorName, actorMovies);\n\t\t\t\tmovieActors.add(newActor);\n\t\t\t\tboolean added = false;\n\t\t\t\tfor(Actor actor : this.actorList) {\n\t\t\t\t\tif (actor.getName().equals(newActor.getName())) {\n\t\t\t\t\t\tadded = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(added == false) this.actorList.add(newActor);\n\t\t\t}\n\t\t}\n\t}",
"private Movie createNewMovie(String movieName, String directorName, String act1, String act2, String act3, int star)\n {\n Movie clip = new Movie(movieName, directorName, act1, act2, act3, star);\n return clip;\n }",
"@GetMapping(\"/movieForm/{id}\") // This is Director ID\n public String addMovies(@PathVariable(\"id\") long id, Model model) {\n\n Director d = directorRepo.findOne(id);\n model.addAttribute(\"newDirector\", d);\n Movie m = new Movie();\n m.setDirector(d);\n model.addAttribute(\"newMovie\", m);\n// movieRepo.save(m); // save only director_id here, all other movie fields: nulls\n return \"movieForm\";\n }",
"public Movie() {\n\n }",
"private long addMovie(String cp_id, String title, String status, Integer year, String quality, String tagline, String plot, String imdb, String runtime, String poster_original, String backdrop_original, ArrayList<String> genreStringArray) {\r\n\r\n // First, check if the location with this city name exists in the db\r\n Cursor cursor = mContext.getContentResolver().query(\r\n MovieContract.WantedEntry.CONTENT_URI,\r\n new String[]{MovieContract.WantedEntry.COLUMN_CP_ID},\r\n MovieContract.WantedEntry.COLUMN_CP_ID + \" = ?\",\r\n new String[]{cp_id},\r\n null);\r\n\r\n if (cursor.moveToFirst()) {\r\n\r\n int wantedMovieIdIndex = cursor.getColumnIndex(MovieContract.WantedEntry.COLUMN_CP_ID);\r\n Log.v(LOG_TAG, \"Found \" + title + \" in the database!\" );\r\n return cursor.getLong(wantedMovieIdIndex);\r\n } else {\r\n Log.v(LOG_TAG, \"Didn't find it in the database, inserting now!\");\r\n ContentValues wantedMovieValues = new ContentValues();\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_CP_ID, cp_id);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_TITLE, title);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_YEAR, year);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_STATUS, status);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_QUALITY, quality);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_RUNTIME, runtime);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_TAGLINE, tagline);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_PLOT, plot);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_IMDB, imdb);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_POSTER_ORIGINAL, poster_original);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_BACKDROP_ORIGINAL, backdrop_original);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_GENRES, Utility.convertArrayToString(genreStringArray));\r\n\r\n Uri wantedMovieInsertUri = mContext.getContentResolver()\r\n .insert(MovieContract.WantedEntry.CONTENT_URI, wantedMovieValues);\r\n\r\n Bitmap mIcon11 = null;\r\n String thumbnailFilename;\r\n String fullsizeFilename;\r\n if(poster_original != null) {\r\n try {\r\n InputStream in = new java.net.URL(poster_original).openStream();\r\n mIcon11 = BitmapFactory.decodeStream(in);\r\n Bitmap thumbnail = Bitmap.createScaledBitmap(mIcon11, 160, 240, false);\r\n thumbnailFilename = cp_id+\"_thumb\";\r\n fullsizeFilename = cp_id+\"_full\";\r\n String path = saveToInternalStorage(thumbnail, thumbnailFilename);\r\n String fullsizePath = saveToInternalStorage(mIcon11, fullsizeFilename);\r\n } catch (Exception e) {\r\n Log.e(\"Error\", e.getMessage());\r\n// e.printStackTrace();\r\n }\r\n }\r\n else{\r\n mIcon11 = BitmapFactory.decodeResource(mContext.getResources(),\r\n R.drawable.movie_placeholder);\r\n Bitmap thumbnail = Bitmap.createScaledBitmap(mIcon11, 160, 240, false);\r\n thumbnailFilename = cp_id+\"_thumb\";\r\n fullsizeFilename = cp_id+\"_full\";\r\n String thumbPath = saveToInternalStorage(thumbnail, thumbnailFilename);\r\n String fullsizePath = saveToInternalStorage(mIcon11, fullsizeFilename);\r\n }\r\n\r\n\r\n return ContentUris.parseId(wantedMovieInsertUri);\r\n }\r\n }",
"public void add(String t, int y, double r){\n\t//checks if all parameters are valid. If not, throws exception\n\ttry{\t\n\t//if needed increases then movie already exists and if statement to add movie won't be valid\n\tint needed = 0;\n\t//for loop to compare all movie titles and years of release in the list\n\tfor(int x=0; x < list.size();x++){\n\t//if title and year of release already exist in inventory\n\tif (list.get(x).getTitle().equals(t) && list.get(x).getYearReleased() == y) {\n\tneeded=1;\n\t//get old quantity \n\tint newQuantity = list.get(x).getQuantity();\n\t//increase it's value by one\n\tnewQuantity++;\n\t//update quantity for that movie by one\n\tlist.get(x).setQuantity(newQuantity);\n\t//update rating of movie to new one\n\tlist.get(x).setRating(r);\n\t} \n\t}\n\t//if needed is still 0\n\tif(needed == 0){\t\n\t//add new movie with all the parameters provided\n\tMovie movie = new Movie(t,y,r,0);\t\n\tlist.add(movie);\n\t//since it's a new movie quantity is set to 1\n\tlist.get((list.size())-1).setQuantity(1);\n\t}\n\t}\n catch(IllegalArgumentException e){\n \tSystem.out.println(\"One of the parameters is invalid so the film was not added to the inventory! \\n\");\n }\n\n\t}",
"public static void addMovie(String id, String title, MovieCode code) {\n\t\tif (movieList.stream().noneMatch(movie -> movie.getId().equals(id))) {\n\t\t\tmovieList.add(new Movie(id, title, code));\n\t\t}\n\t}",
"public Movie(int IDmovie) {\n super(IDmovie);\n }",
"public void addMovie(final Movie movie) {\n if (!this.getMovieNames().contains(movie.getName())) {\n this.movies.add(movie);\n }\n }",
"public Movie() { }",
"public Movie() {}",
"public Movie() {}",
"public static boolean addMovie(SQLiteDatabase db, ContentValues cv){\n long _id;\n try{\n _id = db.insert(\"MOVIE\", null, cv);\n //Log.v(TAG, \"Movie Added with ID \"+_id);\n /*\n if(context != null){\n Toast.makeText(context, \"Movie added to Favorites\", Toast.LENGTH_SHORT).show();\n }\n */\n return true;\n }catch (Exception e){\n Log.e(TAG, e.getMessage());\n return false;\n }\n }",
"public static void addMovie(){\r\n System.out.println('\\n'+\"Please enter the name of the Movie you would like to add \");\r\n String name = s.nextLine();\r\n System.out.println(\"Please enter the rating between 1 and 5 \");\r\n int r = s.nextInt();\r\n s.nextLine();\r\n if (r >= 1 && r <= 5){\r\n m = new Movie(name,r);\r\n movies.add(m);\r\n System.out.println(m.name +\" has been added\"+ '\\n');\r\n }\r\n else{\r\n System.out.println(\"That rating is not between 1 and 5. Please try again\");\r\n }\r\n }",
"@POST\r\n\t@Path(\"/createMovie\")\r\n\t@Produces(MediaType.TEXT_HTML)\r\n\t@Consumes(MediaType.APPLICATION_FORM_URLENCODED)\r\n\tpublic void newMovie(@FormParam(\"name\") String name, @FormParam(\"rate\") String rate,\r\n\t\t\t@FormParam(\"type\") String type, @FormParam(\"actor\") String actor, @FormParam(\"producer\") String producer,\r\n\t\t\t@FormParam(\"length\") String length, @FormParam(\"country\") String country,\r\n\t\t\t@FormParam(\"on_screen_date\") Date on_screen_date, @FormParam(\"language\") String language,\r\n\t\t\t@FormParam(\"file\") String file,\r\n\t\t\t@FormParam(\"description\") String description, @Context HttpServletResponse servletResponse,\r\n\t\t\t@Context HttpServletRequest request) throws IOException, ServletException {\r\n\t\tSystem.out.println(\"name : \" + name);\r\n\t\tSystem.out.println(\"rate : \" + rate);\r\n\t\tSystem.out.println(\"type : \" + type);\r\n\t\tSystem.out.println(\"actor : \" + actor);\r\n\t\tSystem.out.println(\"producer : \" + producer);\r\n\t\tSystem.out.println(\"length : \" + length);\r\n\t\tSystem.out.println(\"country : \" + country);\r\n\t\tSystem.out.println(\"on_screen_date\" + on_screen_date);\r\n\t\tSystem.out.println(\"language : \" + language);\r\n\t\tSystem.out.println(\"file : \" + file);\r\n\t\tSystem.out.println(\"description : \" + description);\r\n\r\n\t\t//collect data from Database\r\n\t Connection con;\r\n\t\tString driver = Constants.driver;\r\n\t\tString url = Constants.url;\r\n\t\tString user = Constants.user;\r\n\t\tString password = Constants.password;\r\n\r\n\t\t//begin adding\r\n\t\ttry {\r\n\t\t\t //Load driver\r\n\t\t\t Class.forName(driver);\r\n\t\t\t //Connect to the MySQL database! !\r\n\t\t\t con = DriverManager.getConnection(url,user,password);\r\n\r\n\t\t\t PreparedStatement ps=con.prepareStatement(\"insert into movie(name,rate,type,actor,producer,length,country,on_screen_date,language,image,description) values(?,?,?,?,?,?,?,?,?,?,?)\");\r\n\t\t\t //ps.setInt(1,4);\r\n\t\t\t ps.setString(1,name);\r\n\t\t\t ps.setInt(2, Integer.parseInt(rate));\r\n\t\t\t ps.setString(3, type);\r\n\t\t\t ps.setString(4, actor);\r\n\t\t\t ps.setString(5, producer);\r\n\t\t\t ps.setInt(6, Integer.parseInt(length));\r\n\t\t\t ps.setString(7, country);\r\n\t\t\t //SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t\t ps.setDate(8,on_screen_date);\r\n\t\t\t ps.setString(9,language);\r\n\t\t\t ps.setString(10, file);\r\n\t\t\t ps.setString(11, description);\r\n\t\t\t ps.executeUpdate();\r\n\r\n\t\t\t con.close();\r\n\r\n\t //driver Exception & connection Exception\r\n\t\t}catch(ClassNotFoundException e) {\r\n\t\t\tSystem.out.println(\"Sorry,can`t find the Driver!\"); \r\n\t\t\te.printStackTrace(); \r\n\t\t}catch(SQLException e) {\r\n\t\t\t e.printStackTrace(); \r\n\t\t}catch (Exception e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t}finally{\r\n\t\t\t//System.out.println(\"Success access to Database£¡£¡\");\r\n\t\t}\r\n\r\n\t\trequest.getRequestDispatcher(\"/WEB-INF/administration.html\").forward(request, servletResponse);\r\n\t}",
"public ResponseEntity<Movie> addMovie(Movie movie) {\n if (!movieRepository.existsById(movie.getId()))\n return new ResponseEntity<>(movieRepository.save(movie), HttpStatus.CREATED);\n else\n return new ResponseEntity<>(null, HttpStatus.BAD_REQUEST);\n }",
"public void insertMovie(int movieID)\n\t{\n\t\t\n\t\tPreparedStatement \tpstatement;\n\t\tint\t\t \t\t\tresult;\n\t\t\n\t\tpstatement = null;\n\t\t//resultSet = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnection connection = ConnectionManager.getConnection();\n\t\t\t\t\n\t\t\tpstatement = connection.prepareStatement(\"INSERT INTO Movies (movieID) VALUES (?)\");\n\n\t\t\t// instantiate parameters\n\t\t\tpstatement.clearParameters();\n\t\t\tpstatement.setInt(1, movieID);\n\t\t\t\n\t\t\tresult = pstatement.executeUpdate();\n\t\t\t\t\n\t\t\t//System.out.println(\"3\");\n\t\t\t\n\t\t\tpstatement.close(); \n\t\t\tconnection.close(); \n\t\t\n\t\t}\n\t\t\n\t\tcatch(SQLException sqle)\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(\"SQLState = \" + sqle.getSQLState() + \"\\n\" + sqle.getMessage());\n\t\t\t\n\t\t}\n\t\t\n\t}",
"@PostMapping(\"/movies\")\n @Timed\n public ResponseEntity<Movie> createMovie(@RequestBody Movie movie) throws URISyntaxException {\n log.debug(\"REST request to save Movie : {}\", movie);\n if (movie.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"movie\", \"idexists\", \"A new movie cannot already have an ID\")).body(null);\n }\n Movie result = movieRepository.save(movie);\n return ResponseEntity.created(new URI(\"/api/movies/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"movie\", result.getId().toString()))\n .body(result);\n }",
"public long addMovieToWatchlist(long movieId) {\n if (!isMovieInWatchlist(movieId)) {\n SQLiteDatabase database = this.getWritableDatabase();\n ContentValues values = insertMovieInWatchlist(movieId);\n long rowId = database.insert(WatchlistMoviesEntry.TABLE_NAME, null, values);\n database.close();\n return rowId;\n } else return 0;\n }",
"public void createMovie(int id, String title, int statusChoice, int typeChoice, int ratingChoice, \n\t\t\tString synopsis, String director, ArrayList<String> cast, int duration) {\n\t\tMovie movie = new Movie(id, title, statusChoice, typeChoice, ratingChoice, synopsis, director, cast, duration);\n\t\t\n\t\tthis.create((T)movie);\n\t}",
"public void newMovie()\n {\n // Checks if the input is null\n while (again) {\n movieName = UI.askString(\"Movie title: \");\n if (movieName.length() == 0)\n {\n UI.println(\"Please enter a movie name\");\n } \n else\n {\n // Converts the title to lower case (Learnt on w3 Schools)\n movieName = movieName.toLowerCase();\n this.movieName = movieName;\n again = false;\n }\n }\n again = true;\n // Checks if the year is valid (between 1880 and 2030)\n while (again) \n {\n movieYear = UI.askInt(\"Release Year: \");\n try\n {\n if (movieYear < 1880 || movieYear > 2030) \n {\n throw new ArithmeticException();\n } \n else if (movieYear == 0)\n {\n throw new ArithmeticException();\n } \n else \n {\n this.movieYear = movieYear;\n again = false;\n }\n }\n \n catch (ArithmeticException ae) \n {\n UI.println(\"Please enter a year 1880-2030\");\n }\n \n catch (Exception e) \n {\n UI.println(\"Please enter a year 1880-2030\");\n }\n }\n again = true;\n // Checks if the input is null\n while (again)\n {\n movieDirector = UI.askString(\"Director: \");\n if (movieDirector.length() == 0)\n {\n UI.println(\"Please enter a director\");\n } \n else\n {\n // Converts the director to lower case (Learnt on w3 Schools)\n movieDirector = movieDirector.toLowerCase();\n this.movieDirector = movieDirector;\n again = false;\n }\n }\n again = true;\n // Checks if the input is null\n while (again)\n {\n movieGenre = UI.askString(\"Genre: \");\n if (movieGenre.length() == 0)\n {\n UI.println(\"Please enter a genre\");\n } \n else\n {\n // Converts the genre to lower case (Learnt on w3 Schools)\n movieGenre = movieGenre.toLowerCase();\n this.movieGenre = movieGenre;\n again = false;\n }\n }\n again = true;\n // Sends the details to the addMovie class to be added to hashmap\n r.addMovie(movieName, movieDirector, \n movieGenre, movieYear, movieNumber);\n this.movieNumber++;\n }",
"@ApiOperation(value = \"Add a movie\", notes = \"Adding a new movie\")\n @ApiResponses(value = {\n @ApiResponse(code = 201, message = \"Created\", response = MovieDto.class),\n @ApiResponse(code = 400, message = \"Bad request\"),\n @ApiResponse(code = 404, message = \"Not found\"),\n @ApiResponse(code = 409, message = \"Conflict\"),\n })\n @CrossOrigin\n @PostMapping(value = \"/add\", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n public ResponseEntity add(\n @Valid @RequestBody MovieDto movie) {\n if ( bugService.findByBugKey(\"bug_204\").getBugEnabled()) {\n movie.setHomepage(\"\");\n movie.setOriginalTitle(\"\");\n movie.setTagline(\"\");\n }\n if (bugService.findByBugKey(\"bug_207\").getBugEnabled()) {\n movie.setRuntime(movie.getRuntime() * 60);\n }\n if (bugService.findByBugKey(\"bug_208\").getBugEnabled()) {\n Set<GenreDto> tmpGenres = new HashSet<>();\n //Onderstaande is zo bedoeld! Afblijven\n for (GenreDto genre : movie.getGenres()) {\n tmpGenres.add(genre);\n movie.setGenres(tmpGenres);\n break;\n }\n }\n if (bugService.findByBugKey(\"bug_203\").getBugEnabled()) {\n //Onderstaande is zo bedoeld! Afblijven\n MovieDto noShowMovie = movieService.add(movie);\n noShowMovie = null;\n return new ResponseEntity<>(noShowMovie, HttpStatus.CREATED);\n }\n\n if (bugService.findByBugKey(\"bug_209\").getBugEnabled()) {\n return new ResponseEntity<>(movieService.add(movie), HttpStatus.I_AM_A_TEAPOT);\n }\n\n return new ResponseEntity<>(movieService.add(movie), HttpStatus.CREATED);\n }",
"@POST\n\t@Path(\"addtocollec\")\n\tpublic Response addToCollection(JsonMyMovie movie) {\n\t\tUsermovie um = new Usermovie();\n\t\tUsermoviePK umid = new UsermoviePK();\n\t\tumid.setMovie(movie.getMovieId().intValue());\n\t\tumid.setUser(movie.getUserId().intValue());\n\t\tum.setId(umid);\n\t\tum.setMovieBean(movieDao.getMovie(movie.getMovieId()));\n\t\tum.setUserBean(userDAO.getUser(movie.getUserId()));\n\t\tum.setComment(movie.getComment());\n\t\tum.setRating(movie.getRating());\n\t\tusermovieDAO.saveUsermovie(um);\n\t\treturn Response.ok(new JsonSimpleResponse(true),\n\t\t\t\tMediaType.APPLICATION_JSON).build();\n\t}",
"void setMovieId(int movieID) {\n this.movieID = movieID;\n }",
"public Movie()\n\t{\n\t\tsuper();\n\t}",
"public void insertMovie(MovieInfo data) {\n\t\t\troot = insertMovie(data, this.root);\n\t\t}",
"public Movie(int ID, String mTitle, String mGenre, int mRelease)\n {\n id = ID;\n title = mTitle;\n genre = mGenre;\n release = mRelease;\n }",
"public void Adding(String t, int y, int d, double r){\n\t//checks if all parameters are valid. If not, throws exception\n\ttry{\n\t//if needed increases then movie already exists and if statement to add movie won't be valid\n\tint needed = 0;\n\t//for loop to compare all movie titles and years of release in the list\n\tfor(int x=0; x < list.size();x++){\n\t//if title and year of release already exist in inventory\n\tif (list.get(x).getTitle().equals(t) && list.get(x).getYearReleased() == y) {\n\tneeded=1;\n\t//get old quantity \n\tint newQuantity = list.get(x).getQuantity();\n\t//increase it's value by one\n\tnewQuantity++;\n\t//update quantity for that movie by one\n\tlist.get(x).setQuantity(newQuantity);\n\t//update rating of movie to new one\n\tlist.get(x).setRating(r);\n\t} \n\t}\n\t//if needed is still 0\n\tif(needed == 0){\n\t//add new movie with all the parameters provided\n\tMovie movie = new Movie(t,y,r,d);\t\n\t//location of arraylist where movie is added\n\tlist.add(list.size(),movie);\n\t//since it's a new movie quantity is set to 1\n\tlist.get((list.size())-1).setQuantity(1);\n\t}\n\t}\n\t// \n\tcatch(IllegalArgumentException e){\n \tSystem.out.println(\"One of the parameters is invalid so the film was not added to the inventory! \\n\");\n\t}\n\t}",
"public void addSimilarMovie(Movie movie){\n\t \tsimilarMovies.add(movie);\n\t }",
"Movie getMovieById(final int movieId);",
"public Movie save(Movie movie) {\n log.debug(\"Request to save Movie : {}\", movie);\n return movieRepository.save(movie);\n }",
"public long saveMovie(Movie movie) {\n ContentValues values = new ContentValues();\n values.put(MovieContract.COLUMN_NAME_ID, movie.id);\n values.put(MovieContract.COLUMN_NAME_TITLE, movie.title);\n values.put(MovieContract.COLUMN_NAME_YEAR, movie.year);\n values.put(MovieContract.COLUMN_NAME_POSTER, movie.poster);\n values.put(MovieContract.COLUMN_NAME_STARRED, movie.starred ? 1 : 0);\n\n // Insert the movie data and return the new row id\n return getWriteableDatabase().insert(MovieContract.TABLE_NAME, null, values);\n }",
"Builder addVideo(VideoObject value);",
"public void addData(Movie movieToAdd, View view)\n {\n /* Creating a DatabaseHelper Instance to access the getData Method in order to get the\n * Title (Index 1 in terms of Columns) of all the saved Movies in the Database and to make\n * sure that the Title of the Movie to be registered isn't equals to any of the existing movies\n */\n DatabaseHelper databaseHelper = new DatabaseHelper(context);\n Cursor c = databaseHelper.getData();\n\n ArrayList<String> listLabels = new ArrayList<>();\n\n while(c.moveToNext())\n {\n //get the value from the database in column 1\n //then add it to the ArrayList\n listLabels.add(c.getString(1));\n }\n\n // Error Message if the Title of the Movie to Add Already is found\n if (listLabels.contains(movieToAdd.getTitle()))\n\n Snackbar.make(view, \"Movie Already has already been Registered !!!\",Snackbar.LENGTH_SHORT)\n .setBackgroundTint(context.getResources().getColor(R.color.transparent_yellow))\n .setTextColor(context.getResources().getColor(R.color.grey_black))\n .show();\n\n else\n {\n int favorite = 0;\n\n if (movieToAdd.isFavorite())\n\n favorite = 1;\n\n /* the execSQL Method simply executes this query on the Database, in this Query UPDATE is\n * used to specify the Table Name to Update, SET specifies the Column name to Update in this\n * case COL8 contains favorites and WHERE is the condition in this case it is to make sure\n * that the Movie Title Matches with the given title\n */\n this.getWritableDatabase().execSQL(\n \"INSERT INTO \" + TABLE_NAME +\n \" (title, year, director, actor_actress, rating, review, favorite)\" +\n \" values('\"\n + movieToAdd.getTitle() + \"', '\" + movieToAdd.getYear() + \"', '\"\n + movieToAdd.getDirector() + \"', '\" + movieToAdd.getActorActress() + \"', \"\n + movieToAdd.getRating() + \", '\" + movieToAdd.getReview() + \"', \" + favorite\n + \")\");\n\n Snackbar.make(view, \"Successfully Registered !\",Snackbar.LENGTH_SHORT)\n .setBackgroundTint(context.getResources().getColor(R.color.transparent_yellow))\n .setTextColor(context.getResources().getColor(R.color.grey_black))\n .show();\n }\n }",
"public Boolean insertMovieDetails(String title, int year, String director, String actors, int rating, String review, int fav) {\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues cv = new ContentValues();\n\n cv.put(\"title\", title);\n cv.put(\"year\", year);\n cv.put(\"director\", director);\n cv.put(\"actors\", actors);\n cv.put(\"rating\", rating);\n cv.put(\"review\", review);\n cv.put(\"fav\", fav);\n\n long result = db.insert(\"MovieDetails\", null, cv);\n if (result == -1) {\n return false;\n }else {\n return true;\n }\n }",
"@PostMapping(\"/movieForm\")\n public String resultMovies(@ModelAttribute(\"newMovie\") Movie movie, Model model){\n\n movieRepo.save(movie);\n System.out.println(movie.getDirector().getId());\n// System.out.println(movie.getDirector().getName());\n\n model.addAttribute(\"newMovie\", movie);\n\n// String directorName = movie.getDirector().getName();\n// model.addAttribute(\"directorname\", directorName);\n\n long dirId = movie.getDirector().getId();\n Director d = directorRepo.findOne(dirId);\n model.addAttribute(\"directorname\", d.getName());\n System.out.println(d.getName());\n\n return \"resultMovie\";\n }",
"public void putMovieData(String movieName, String movieDate, String genre) {\n String[] columns = {MovieUriContract.GenreEntry._ID, MovieUriContract.GenreEntry.COLUMN_NAME};\n\n try{\n Cursor cursor = providerClient.query(\n MovieUriContract.GenreEntry.CONTENT_URI,\n columns,\n null,\n null,\n null\n );\n\n int genreId = -1;\n if(cursor.moveToFirst()) {\n genreId = cursor.getColumnIndex(genre);\n }\n cursor.close();\n\n if(genreId >= 0) {\n ContentValues movieValues = new ContentValues();\n movieValues.put(MovieUriContract.MovieEntry.COLUMN_NAME, movieName);\n movieValues.put(MovieUriContract.MovieEntry.COLUMN_RELEASE_DATE, movieDate);\n movieValues.put(MovieUriContract.MovieEntry.COLUMN_GENRE, genreId);\n providerClient.update(\n MovieUriContract.GenreEntry.CONTENT_URI,\n movieValues,\n null,\n null);\n }\n else {\n view.setErrorMessage();\n }\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onClick(View view) {\n\n Movie movie = new Movie(\"abc\");\n ContentValues contentValues = new ContentValues();\n contentValues.put(MoviesContract.Movies.TITLE,movie.getTitle());\n getContentResolver().insert(MoviesContract.Movies.CONTENT_URI,contentValues);\n //fetchMovies();\n\n }",
"public Movie(String id, String title) {\n mId = id;\n mTitle = title;\n }",
"@Override\n\tpublic int saveImage(Movie movie) {\n\t\tString str = uuid.toString();\n String id = str.substring(0, 8) + str.substring(9, 13) + str.substring(14, 18) + str.substring(19, 23) + str.substring(24);\n \n\t\tmovie.setId(id);\n\t\tmovie.setCreateData(new Date());\n\t\tint number = this.insert(\"Movie.insert\", movie);\n\t\treturn number;\n\t}",
"public Film createFilm(Film film) {\n\t\tString user = \"student\";\n\t\tString pass = \"student\";\n\t\tConnection conn = null;\n\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(URL, user, pass);\n\t\t\tconn.setAutoCommit(false);\n\t\t\tString sql = \"INSERT INTO film (title, description, releaseYear, rating, language_id) \"\n\t\t\t\t\t+ \" VALUES (?,?,?,?)\";\n\t\t\tPreparedStatement stmt = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\n\t\t\tstmt.setString(1, film.getTitle());\n\t\t\tstmt.setString(2, film.getDescription());\n\t\t\tstmt.setInt(3, film.getReleaseYear());\n\t\t\tstmt.setString(4, film.getRating());\n\t\t\tstmt.setInt(5, film.getLanguage_id());\n//\t\t\tstmt.setInt(5, film.getRentalDuration());\n//\t\t\tstmt.setDouble(6, film.getRentalRate());\n//\t\t\tstmt.setInt(7, film.getLength());\n//\t\t\tstmt.setDouble(8, film.getReplacementCost());\n//\t\t\tstmt.setString(10, film.getSpecialFeatures());\n\n\t\t\tint updateCount = stmt.executeUpdate();\n\t\t\tif (updateCount == 1) {\n\t\t\t\tResultSet keys = stmt.getGeneratedKeys();\n\t\t\t\tif (keys.next()) {\n\t\t\t\t\tint newFilmID = keys.getInt(1);\n\t\t\t\t\tfilm.setId(newFilmID);\n\t\t\t\t\tif (film.getActors() != null && film.getActors().size() > 0) {\n\t\t\t\t\t\tstmt = conn.prepareStatement(sql);\n\t\t\t\t\t\tsql = \"INSERT INTO film_actor (film_id, actor_id) VALUES (?,?)\";\n\t\t\t\t\t\tfor (Actor actor : film.getActors()) {\n\t\t\t\t\t\t\tstmt.setInt(1, actor.getId());\n\t\t\t\t\t\t\tstmt.setInt(2, newFilmID);\n\t\t\t\t\t\t\tupdateCount = stmt.executeUpdate();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfilm = null;\n\t\t\t}\n\t\t\tconn.commit();\n\n\t\t\tconn.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tif (conn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconn.rollback();\n\t\t\t\t} catch (SQLException sqle2) {\n\t\t\t\t\tSystem.err.println(\"Error trying to rollback\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow new RuntimeException(\"Error inserting film \" + film);\n\t\t}\n\n\t\treturn film;\n\t}",
"@Override\r\n public String getParamPostFix(){return \"Movie\";}",
"@Override\n\tpublic void addGenre(Genre genre) throws MovieException {\n obj.addGenre(genre);\n\t}",
"public void addAddMovieButtonListener(ActionListener l)\n\t{\n\t\taddMovieButton.setActionCommand(\"Add Movie\");\n\t\taddMovieButton.addActionListener(l);\n\t}",
"public void setMovieArrayList(MovieClass newMovieObject)\n {\n movieArrayList.add(newMovieObject);\n }",
"public Movie(String title, MovieCategory category) {\n this.title = title;\n this.movieCategory = movieCategory;\n }",
"public Movie(int IDmovie, String title, String synopsis, String genre, String director, int year, double priceMovie) {\n super(IDmovie, title, synopsis, genre, director, year, priceMovie);\n }",
"public Movie(String name)\n\t{\n\t\tthis(name, 0);\n\t}",
"@FXML\n private void handleNewFilm() {\n FilmItem tempFilm = new FilmItem();\n boolean okClicked = mainApp.showFilmEditDialog(tempFilm, true);\n if (okClicked) {\n mainApp.getFilmData().add(tempFilm);\n if (matchesFilter(tempFilm)) {\n \tmainApp.getFilteredData().add(tempFilm);\n }\n save();\n }\n }",
"@Override\r\n\tpublic int insertFilm(Film film) {\n\t\treturn 0;\r\n\t}",
"public void addUserMovie(Long movie, Integer mark, Integer wishlist) throws IllegalOperationException;",
"public Film create(Film obj) {\n\t\t\n\t\tConnection.update(\"INSERT INTO film (codeFilm,nomFilm) VALUES('\"\n\t\t\t\t\t\t +obj.getCodeFilm() +\"','\"\n\t\t\t\t\t\t +obj.getNomFilm() +\"')\");\n\t\t\n\t\tResultSet result = \tConnection.selectFrom(\"SELECT idFilm \"\n\t\t\t\t+ \"FROM film \"\n\t\t\t\t+\";\");\n\n\t\tint i = 0;\n\t\ttry\n\t\t{\n\t\t\tresult.last();\n\t\t\ti = result.getInt(\"idFilm\");\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tobj.setId(i);\n\t\tConnection.close();\n\t\treturn obj;\n\t}",
"public void addFilm(String film_title, String film_director, String film_bbfc_rating, GregorianCalendar film_available_date, GregorianCalendar film_expiration_date, GregorianCalendar film_length, int film_expected_views_per_day, String color, Film.TYPE film_type) throws Exception{\r\n \r\n Film new_film = new Film(generateUniqueId(), film_title, film_director, film_bbfc_rating, film_length, film_available_date, film_expiration_date, color, film_type);\r\n\t\t\r\n\t\t// Add the film to the film manager's internal database\r\n\t\tthis.cinema_film_list.add(new_film);\r\n\t}",
"public Movie()\n {\n // initialise instance variables\n name = \"\";\n director = \"\";\n fileSize = 0;\n duration = 0;\n }",
"public void addTrailer(Trailer trailer, long movieId) {\n if (trailer != null) {\n if (!isTrailerExists(trailer.getId())) {\n SQLiteDatabase database = this.getWritableDatabase();\n ContentValues trailerValues = insertTrailerInContentValues(trailer, movieId);\n database.insert(TrailersEntry.TABLE_NAME, null, trailerValues);\n database.close();\n }\n } else {\n throw new IllegalArgumentException(\"Passed trailer object is null or already exist\");\n }\n }",
"public void saveMovieToFavorites() {\n Cursor moviecursor = this.getContentResolver().query(MovieContract.MovieEntry.CONTENT_URI, null, MovieContract.MovieEntry.COLUMN_NAME_MOVIE_ID + \" = \" + mMovie.getID(), null, null, null);\n if(moviecursor.getCount() == 0) { // first time this movie has been favorited insert record\n Uri movieUri = this.getContentResolver().insert(MovieContract.MovieEntry.CONTENT_URI, Constants.createMovieRecord(mMovie));\n long movieid = ContentUris.parseId(movieUri);\n int insertedTrailerCount = this.getContentResolver().bulkInsert(MovieContract.TrailerEntry.CONTENT_URI, Constants.createBulkTrailerValues(Constants.mTrailers, movieid));\n int insertedReviewCount = this.getContentResolver().bulkInsert(MovieContract.ReviewEntry.CONTENT_URI, Constants.createBulkReviewValues(Constants.mReviews, movieid));\n\n if(insertedTrailerCount < 1)\n Log.e(TAG,\"Trailer failed to insert\");\n\n if(insertedReviewCount < 1)\n Log.e(TAG, \" Review failed to insert\");\n }\n }",
"public Movie(String title, String imdb_id, String image, String metascore, String plot, String rated, String year) {\n this.title = title;\n this.imdb_id = imdb_id;\n this.image = image;\n this.metascore = metascore;\n this.plot = plot;\n this.rated = rated;\n this.year = year;\n }",
"void addCastToFilm() throws RemoteException;",
"public void enterData(String name,int year,String director,String cast,int rating , String reviews , boolean fav){\n movieDB = getWritableDatabase();\n movieDB.execSQL(\"insert into \"+Db_Table+ \" (\" + MOVIE_NAME + \",\" + MOVIE_YEAR + \",\" + MOVIE_DIRECTOR + \",\" + MOVIE_CAST + \",\" + MOVIE_RATING + \",\"+MOVIE_REVIEWS+\",\"+FAVOURITES+\") values('\" +name+\"','\"+year+\"','\"+director+\"','\"+cast+\"','\"+rating+\"','\"+reviews+\"','\"+fav+\"');\");\n Toast.makeText(ctx, \"Movie Saved Successfully \", Toast.LENGTH_SHORT).show();\n Log.i(\"add\",\"done\");\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n if (textFieldFilmNameAddFilmToTxt.getText().length() == 0) {\n JOptionPane.showMessageDialog(null, \"You must enter film name!\", \"ERROR\", JOptionPane.PLAIN_MESSAGE);\n return;\n }\n\n // Write Film information into txt file, and add film into list model to show on screen.\n try {\n\n FileWriter fw = new FileWriter(absoultePath, true);\n fw.write(\"\\n\" + textFieldFilmNameAddFilmToTxt.getText() + \",\" + comboBoxFilmModeAddFilmToTxt.getSelectedItem().toString() + \",\" + 0 + \",\" + 0);\n fw.close();\n\n listModel.addElement(new ListModelElement(textFieldFilmNameAddFilmToTxt.getText(), comboBoxFilmModeAddFilmToTxt.getSelectedItem().toString()));\n listFilmInList.add(new LesFilmsInList(textFieldFilmNameAddFilmToTxt.getText(), comboBoxFilmModeAddFilmToTxt.getSelectedItem().toString(), 0, \"0\"));\n frameAddFilmToTxt.setVisible(false);\n\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n }",
"@Override\n public String save(final String movie) throws IOException {\n RestClient rc = HttpClient.getInstance().getRestClient();\n Request request = new Request(HttpMethod.POST.name(), \"/movies/_doc\");\n request.setJsonEntity(movie);\n\n Response res = rc.performRequest(request);\n\n JsonNode node = Json\n .mapper\n .readTree(res.getEntity().getContent());\n\n return node.toString();\n }",
"public static void saveMovie(String filename, List al) throws IOException {\n\t\tList alw = new ArrayList() ;// to store Professors data\n\n for (int i = 0 ; i < al.size() ; i++) {\n\t\t\t\tMovie m = (Movie)al.get(i);\n\t\t\t\tStringBuilder st = new StringBuilder() ;\n\t\t\t\tif(i==al.size()-1){\n\t\t\t\t\tst.append(\"Movie: \"+m.getMovietitle().trim());\n\t\t\t\t\tst.append(SEPARATOR1);\n\t\t\t\t\tst.append(\"Type: \"+m.getType().trim());\n\t\t\t\t\tst.append(SEPARATOR1);\n\t\t\t\t\tst.append(\"Rating: \").append(m.getRating().trim());\n\t\t\t\t\tst.append(SEPARATOR1);\n\t\t\t\t\tst.append(\"Status: \").append(m.getStatus().trim());\n\t\t\t\t\tst.append(SEPARATOR1);\n\t\t\t\t\tst.append(\"Synopsis: \").append(m.getSynopsis().trim());\n\t\t\t\t\tst.append(SEPARATOR1);\n\t\t\t\t\tst.append(\"Director: \").append(m.getDirector().trim());\n\t\t\t\t\tst.append(SEPARATOR1);\n\t\t\t\t\tst.append(\"Cast: \").append(m.getCast().trim());\n\t\t\t\t\tst.append(SEPARATOR1);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tst.append(m.getMovietitle().trim());\n\t\t\t\t\tst.append(SEPARATOR1);\n\t\t\t\t\tst.append(m.getType().trim());\n\t\t\t\t\tst.append(SEPARATOR1);\n\t\t\t\t\tst.append(m.getRating().trim());\n\t\t\t\t\tst.append(SEPARATOR1);\n\t\t\t\t\tst.append(m.getStatus().trim());\n\t\t\t\t\tst.append(SEPARATOR1);\n\t\t\t\t\tst.append(m.getSynopsis().trim());\n\t\t\t\t\tst.append(SEPARATOR1);\n\t\t\t\t\tst.append(m.getDirector().trim());\n\t\t\t\t\tst.append(SEPARATOR1);\n\t\t\t\t\tst.append(m.getCast().trim());\n\t\t\t\t\tst.append(SEPARATOR1);\t\n\t\t\t\t}\n\t\t\t\talw.add(st.toString()) ;\n\t\t\t}\n\t\t\twrite(filename,alw);\n\t}",
"public Movie(String revenue, Person director, String movieReleasedYear) {\n this.revenue=revenue;\n this.director=director;\n this.movieReleasedYear=movieReleasedYear;\n }",
"@Override\n\tpublic void addContent(String title, Genre genre, String description, String trailer, int yearReleased,Double rating\n\t\t\t,Category category) {\n\t\tContent content = new Content(title, genre, description, trailer, yearReleased,rating, category);\n\t\tentityManager.persist(content);\n\t}",
"@RequestMapping(value = \"/films\", //\n\t\t\t\t\tmethod = RequestMethod.POST, //\n\t\t\t\t\tproduces = {MediaType.APPLICATION_JSON_VALUE})\n\t@ResponseBody\n\tpublic Film addFilm(@RequestBody Film film) {\n\t\treturn filmService.ajouter(film);\n\t}",
"@RequestMapping(value= \"/create\", method = RequestMethod.POST)\n public String create(Film film) { //Hier gaat Spring ervanuit dat 'Film' een Java Bean is en dan gaat hij automatisch de setters gebruiken\n filmRepository.save(film);\n return \"redirect:/films\";\n }",
"public void addFilm(String title, String imagePath, String description, String runTime) throws FilmExistsException {\n filmEdit.addFilm(title, imagePath, description, runTime);\n }",
"public void addGenreAction()\n\t{\n\t\tViewNavigator.loadScene(\"Add Genre\", ViewNavigator.ADD_GENRE_SCENE);\n\t}",
"public long addMovieToFavorites(long movieId) {\n if (!isMovieIsFavorite(movieId)) {\n SQLiteDatabase database = this.getWritableDatabase();\n ContentValues values = insertFavoriteMovieIntoContentValues(movieId);\n long rowId = database.insert(FavoriteMoviesEntry.TABLE_NAME, null, values);\n database.close();\n return rowId;\n } else return 0;\n }",
"@Override\n\tpublic void addItemFilm(String login, String password, String title,\n\t\t\tString kind, String director, String scriptwriter, int duration)\n\t\t\tthrows BadEntryException, NotMemberException,\n\t\t\tItemFilmAlreadyExistsException {\n\n\t}",
"public Movie getMovie(int id) {\n SQLiteDatabase db = this.getReadableDatabase();\n\n Cursor cursor = db.query(TABLE_MOVIE, new String[]{KEY_ID,\n KEY_NAME, KEY_DESC, KEY_VOTE_AVG, KEY_RELEASE_DATE, KEY_ADULT, KEY_POSTER_PATH, KEY_BACKDROP_PATH}, KEY_ID + \"=?\",\n new String[]{String.valueOf(id)}, null, null, null, null);\n if (cursor != null)\n cursor.moveToFirst();\n\n Movie movie = new Movie(cursor.getColumnName(1),\n cursor.getString(3), cursor.getString(4),cursor.getString(2),cursor.getString(6),cursor.getString(7),cursor.getString(5),cursor.getString(0));\n\n return movie;\n }",
"public void addMovie(m value) {\r\n\t\t//Empty List Case\r\n\t\tif (head == null) {\r\n\t\t\thead = tail = new MovieListNode<>(value, null, null);\t//first node added to list\r\n\t\t}\r\n\t\t//if list already has a head - add to tail\r\n\t\telse {\r\n\t\t\ttail.next = new MovieListNode<>(value, tail, null);\t//adds another node directly after the previous node\r\n\r\n\t\t\t//\t\t\tSystem.out.println(\"Previous Movie: \" + tail);\t\r\n\t\t\t//^^^^TEST: checks the previous tail to make sure it's pointed to by current\r\n\t\t\ttail = tail.next;\r\n\t\t}\r\n\t}",
"@Test\n public void addMovie_test() {\n theater.getMovies().add(\"Love Actually\");\n String expected = \"Love Actually\";\n String actual = theater.getMovies().get(4);\n Assert.assertEquals(expected,actual);\n }",
"public Movie getMovie() { return movie; }",
"Builder addVideo(String value);",
"private void insertMoviesIntoDb(Movie[] moviesForDb, String urlString) {\n Uri contentUri;\n switch (urlString) {\n case Constants.STRING_URL_FAVORITE:\n contentUri = MovieContract.MovieEntry.CONTENT_URI_FAVORITE;\n break;\n default:\n return;\n }\n ContentValues[] movieValuesArr = new ContentValues[3];\n for (int i = 0; i < 3; i++) {\n int id = moviesForDb[i].getId();\n String title = moviesForDb[i].getTitle();\n String poster = moviesForDb[i].getImageUrl();\n String synopsis = moviesForDb[i].getSynopsis();\n double rating = moviesForDb[i].getRating();\n String releaseDate = moviesForDb[i].getReleaseDate();\n\n movieValuesArr[i] = new ContentValues();\n movieValuesArr[i].put(MovieContract.MovieEntry.COLUMN_MOVIE_ID, id);\n movieValuesArr[i].put(MovieContract.MovieEntry.COLUMN_TITLE, title);\n movieValuesArr[i].put(MovieContract.MovieEntry.COLUMN_POSTER, poster);\n movieValuesArr[i].put(MovieContract.MovieEntry.COLUMN_SYNOPSIS, synopsis);\n movieValuesArr[i].put(MovieContract.MovieEntry.COLUMN_RATING, rating);\n movieValuesArr[i].put(MovieContract.MovieEntry.COLUMN_RELEASE_DATE, releaseDate);\n }\n // Insert new movies data via a ContentResolver\n getContext().getContentResolver().bulkInsert(contentUri, movieValuesArr);\n }",
"@RequestMapping(path = \"addFilm.do\", method = RequestMethod.POST)\n\tpublic ModelAndView addFilm(@ModelAttribute(\"film\") Film film) {\n\t\tModelAndView mv = new ModelAndView();\n\t\tboolean created = false;\n\t\tFilm filmInDB = dao.createFilm(film);\n\t\tif (filmInDB != null) {\n\t\t\tcreated = true;\n\t\t}\n\t\tmv.addObject(\"created\", created);\n\t\tmv.addObject(\"film\", filmInDB);\n\t\tmv.setViewName(\"WEB-INF/search.jsp\");\n\t\treturn mv;\n\t}"
] |
[
"0.8422799",
"0.7370322",
"0.7236145",
"0.7025053",
"0.6973965",
"0.68958825",
"0.6824261",
"0.680916",
"0.6748331",
"0.6745591",
"0.67392486",
"0.6705119",
"0.6685841",
"0.6682666",
"0.6669444",
"0.66597515",
"0.66457206",
"0.66248184",
"0.6611117",
"0.6597722",
"0.6597093",
"0.65923357",
"0.65889573",
"0.6568191",
"0.6565079",
"0.6555402",
"0.65548956",
"0.6554159",
"0.65342474",
"0.6526446",
"0.6503606",
"0.64919066",
"0.64701545",
"0.6457659",
"0.645663",
"0.645663",
"0.6440036",
"0.64363706",
"0.64289284",
"0.6418858",
"0.63940126",
"0.6383505",
"0.6382949",
"0.6331186",
"0.63228047",
"0.62979287",
"0.6275532",
"0.62656265",
"0.6250053",
"0.62347394",
"0.6231663",
"0.6231615",
"0.6208695",
"0.62058055",
"0.6200376",
"0.6184324",
"0.6153735",
"0.6150798",
"0.6147069",
"0.6144241",
"0.6119746",
"0.61133164",
"0.60958165",
"0.6090276",
"0.6084214",
"0.6066767",
"0.60549945",
"0.60530454",
"0.60330784",
"0.60270953",
"0.6018033",
"0.60114956",
"0.5992534",
"0.59905344",
"0.5982052",
"0.5968635",
"0.59674394",
"0.5929259",
"0.5908398",
"0.5902141",
"0.5900097",
"0.5898564",
"0.5895731",
"0.58870107",
"0.5881862",
"0.5867541",
"0.5853611",
"0.5852158",
"0.58453155",
"0.5844842",
"0.58351606",
"0.5833566",
"0.583082",
"0.58288795",
"0.5827956",
"0.5821664",
"0.5818957",
"0.58135194",
"0.5813072",
"0.5794487",
"0.5791525"
] |
0.0
|
-1
|
/ renamed from: a
|
public static zzaax m19492a(Context context, zzaat zzaat, String str) {
String optString;
String str2;
zzaat zzaat2 = zzaat;
try {
int b;
int i;
String str3;
zzaax zzaax;
long j;
JSONArray optJSONArray;
List list;
List list2;
List list3;
List a;
long j2;
String optString2;
boolean optBoolean;
JSONObject jSONObject = new JSONObject(str);
optString = jSONObject.optString("ad_base_url", null);
Object optString3 = jSONObject.optString("ad_url", null);
String optString4 = jSONObject.optString("ad_size", null);
String optString5 = jSONObject.optString("ad_slot_size", optString4);
boolean z = (zzaat2 == null || zzaat2.zzcnj == 0) ? false : true;
CharSequence optString6 = jSONObject.optString("ad_json", null);
if (optString6 == null) {
optString6 = jSONObject.optString("ad_html", null);
}
if (optString6 == null) {
optString6 = jSONObject.optString("body", null);
}
if (optString6 == null && jSONObject.has("ads")) {
optString6 = jSONObject.toString();
}
String optString7 = jSONObject.optString("debug_dialog", null);
String optString8 = jSONObject.optString("debug_signals", null);
long j3 = jSONObject.has("interstitial_timeout") ? (long) (jSONObject.getDouble("interstitial_timeout") * 1000.0d) : -1;
String optString9 = jSONObject.optString("orientation", null);
if ("portrait".equals(optString9)) {
b = ar.g().mo4621b();
} else if ("landscape".equals(optString9)) {
b = ar.g().mo4619a();
} else {
i = -1;
if (TextUtils.isEmpty(optString6) || TextUtils.isEmpty(optString3)) {
optString9 = optString;
str3 = optString6;
zzaax = null;
j = -1;
} else {
zzaax = aq.m31496a(zzaat2, context, zzaat2.zzaty.zzcv, optString3, null, null, null, null);
str2 = zzaax.zzcja;
optString9 = zzaax.body;
j = zzaax.zzcpa;
str3 = optString9;
optString9 = str2;
}
if (str3 == null) {
return new zzaax(0);
}
optJSONArray = jSONObject.optJSONArray("click_urls");
list = zzaax != null ? null : zzaax.zzcdk;
if (optJSONArray != null) {
list = m19494a(optJSONArray, list);
}
optJSONArray = jSONObject.optJSONArray("impression_urls");
list2 = zzaax != null ? null : zzaax.zzcdl;
if (optJSONArray != null) {
list2 = m19494a(optJSONArray, list2);
}
optJSONArray = jSONObject.optJSONArray("manual_impression_urls");
list3 = zzaax != null ? null : zzaax.zzcoy;
a = optJSONArray == null ? m19494a(optJSONArray, list3) : list3;
if (zzaax != null) {
if (zzaax.orientation != -1) {
i = zzaax.orientation;
}
if (zzaax.zzcov > 0) {
j2 = zzaax.zzcov;
optString2 = jSONObject.optString("active_view");
optBoolean = jSONObject.optBoolean("ad_is_javascript", false);
return new zzaax(zzaat2, optString9, str3, list, list2, j2, jSONObject.optBoolean("mediation", false), jSONObject.optLong("mediation_config_cache_time_milliseconds", -1), a, jSONObject.optLong("refresh_interval_milliseconds", -1), i, optString4, j, optString7, optBoolean, optBoolean ? jSONObject.optString("ad_passback_url", null) : null, optString2, jSONObject.optBoolean("custom_render_allowed", false), z, zzaat2.zzcnl, jSONObject.optBoolean("content_url_opted_out", true), jSONObject.optBoolean("prefetch", false), jSONObject.optString("gws_query_id", ""), "height".equals(jSONObject.optString("fluid", "")), jSONObject.optBoolean("native_express", false), zzaeq.zza(jSONObject.optJSONArray("rewards")), m19494a(jSONObject.optJSONArray("video_start_urls"), null), m19494a(jSONObject.optJSONArray("video_complete_urls"), null), jSONObject.optBoolean("use_displayed_impression", false), zzaaz.zzl(jSONObject.optJSONObject("auto_protection_configuration")), zzaat2.zzcnz, jSONObject.optString("set_cookie", ""), m19494a(jSONObject.optJSONArray("remote_ping_urls"), null), jSONObject.optBoolean("render_in_browser", zzaat2.zzcdo), optString5, zzaey.zzo(jSONObject.optJSONObject("safe_browsing")), optString8, jSONObject.optBoolean("content_vertical_opted_out", true), zzaat2.zzcol, jSONObject.optBoolean("custom_close_blocked"), 0);
}
}
j2 = j3;
optString2 = jSONObject.optString("active_view");
optBoolean = jSONObject.optBoolean("ad_is_javascript", false);
if (optBoolean) {
}
return new zzaax(zzaat2, optString9, str3, list, list2, j2, jSONObject.optBoolean("mediation", false), jSONObject.optLong("mediation_config_cache_time_milliseconds", -1), a, jSONObject.optLong("refresh_interval_milliseconds", -1), i, optString4, j, optString7, optBoolean, optBoolean ? jSONObject.optString("ad_passback_url", null) : null, optString2, jSONObject.optBoolean("custom_render_allowed", false), z, zzaat2.zzcnl, jSONObject.optBoolean("content_url_opted_out", true), jSONObject.optBoolean("prefetch", false), jSONObject.optString("gws_query_id", ""), "height".equals(jSONObject.optString("fluid", "")), jSONObject.optBoolean("native_express", false), zzaeq.zza(jSONObject.optJSONArray("rewards")), m19494a(jSONObject.optJSONArray("video_start_urls"), null), m19494a(jSONObject.optJSONArray("video_complete_urls"), null), jSONObject.optBoolean("use_displayed_impression", false), zzaaz.zzl(jSONObject.optJSONObject("auto_protection_configuration")), zzaat2.zzcnz, jSONObject.optString("set_cookie", ""), m19494a(jSONObject.optJSONArray("remote_ping_urls"), null), jSONObject.optBoolean("render_in_browser", zzaat2.zzcdo), optString5, zzaey.zzo(jSONObject.optJSONObject("safe_browsing")), optString8, jSONObject.optBoolean("content_vertical_opted_out", true), zzaat2.zzcol, jSONObject.optBoolean("custom_close_blocked"), 0);
}
i = b;
if (TextUtils.isEmpty(optString6)) {
}
optString9 = optString;
str3 = optString6;
zzaax = null;
j = -1;
if (str3 == null) {
return new zzaax(0);
}
optJSONArray = jSONObject.optJSONArray("click_urls");
if (zzaax != null) {
}
if (optJSONArray != null) {
list = m19494a(optJSONArray, list);
}
optJSONArray = jSONObject.optJSONArray("impression_urls");
if (zzaax != null) {
}
if (optJSONArray != null) {
list2 = m19494a(optJSONArray, list2);
}
optJSONArray = jSONObject.optJSONArray("manual_impression_urls");
if (zzaax != null) {
}
if (optJSONArray == null) {
}
if (zzaax != null) {
if (zzaax.orientation != -1) {
i = zzaax.orientation;
}
if (zzaax.zzcov > 0) {
j2 = zzaax.zzcov;
optString2 = jSONObject.optString("active_view");
optBoolean = jSONObject.optBoolean("ad_is_javascript", false);
if (optBoolean) {
}
return new zzaax(zzaat2, optString9, str3, list, list2, j2, jSONObject.optBoolean("mediation", false), jSONObject.optLong("mediation_config_cache_time_milliseconds", -1), a, jSONObject.optLong("refresh_interval_milliseconds", -1), i, optString4, j, optString7, optBoolean, optBoolean ? jSONObject.optString("ad_passback_url", null) : null, optString2, jSONObject.optBoolean("custom_render_allowed", false), z, zzaat2.zzcnl, jSONObject.optBoolean("content_url_opted_out", true), jSONObject.optBoolean("prefetch", false), jSONObject.optString("gws_query_id", ""), "height".equals(jSONObject.optString("fluid", "")), jSONObject.optBoolean("native_express", false), zzaeq.zza(jSONObject.optJSONArray("rewards")), m19494a(jSONObject.optJSONArray("video_start_urls"), null), m19494a(jSONObject.optJSONArray("video_complete_urls"), null), jSONObject.optBoolean("use_displayed_impression", false), zzaaz.zzl(jSONObject.optJSONObject("auto_protection_configuration")), zzaat2.zzcnz, jSONObject.optString("set_cookie", ""), m19494a(jSONObject.optJSONArray("remote_ping_urls"), null), jSONObject.optBoolean("render_in_browser", zzaat2.zzcdo), optString5, zzaey.zzo(jSONObject.optJSONObject("safe_browsing")), optString8, jSONObject.optBoolean("content_vertical_opted_out", true), zzaat2.zzcol, jSONObject.optBoolean("custom_close_blocked"), 0);
}
}
j2 = j3;
optString2 = jSONObject.optString("active_view");
optBoolean = jSONObject.optBoolean("ad_is_javascript", false);
if (optBoolean) {
}
return new zzaax(zzaat2, optString9, str3, list, list2, j2, jSONObject.optBoolean("mediation", false), jSONObject.optLong("mediation_config_cache_time_milliseconds", -1), a, jSONObject.optLong("refresh_interval_milliseconds", -1), i, optString4, j, optString7, optBoolean, optBoolean ? jSONObject.optString("ad_passback_url", null) : null, optString2, jSONObject.optBoolean("custom_render_allowed", false), z, zzaat2.zzcnl, jSONObject.optBoolean("content_url_opted_out", true), jSONObject.optBoolean("prefetch", false), jSONObject.optString("gws_query_id", ""), "height".equals(jSONObject.optString("fluid", "")), jSONObject.optBoolean("native_express", false), zzaeq.zza(jSONObject.optJSONArray("rewards")), m19494a(jSONObject.optJSONArray("video_start_urls"), null), m19494a(jSONObject.optJSONArray("video_complete_urls"), null), jSONObject.optBoolean("use_displayed_impression", false), zzaaz.zzl(jSONObject.optJSONObject("auto_protection_configuration")), zzaat2.zzcnz, jSONObject.optString("set_cookie", ""), m19494a(jSONObject.optJSONArray("remote_ping_urls"), null), jSONObject.optBoolean("render_in_browser", zzaat2.zzcdo), optString5, zzaey.zzo(jSONObject.optJSONObject("safe_browsing")), optString8, jSONObject.optBoolean("content_vertical_opted_out", true), zzaat2.zzcol, jSONObject.optBoolean("custom_close_blocked"), 0);
} catch (JSONException e) {
str2 = "Could not parse the inline ad response: ";
optString = String.valueOf(e.getMessage());
hx.m19916e(optString.length() != 0 ? str2.concat(optString) : new String(str2));
return new zzaax(0);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }",
"interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }",
"public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}",
"public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }",
"public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }",
"public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}",
"public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }",
"protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }",
"public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }",
"public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}",
"public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}",
"public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }",
"public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }",
"public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }",
"public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }",
"public void a() {\n ((a) this.a).a();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }",
"@Override\r\n\tpublic void a() {\n\t\t\r\n\t}",
"public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}",
"public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}",
"interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}",
"public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }",
"@Override\n\tpublic void a() {\n\t\t\n\t}",
"public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}",
"public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }",
"public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}",
"public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}",
"public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }",
"public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}",
"public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }",
"public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}",
"public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}",
"public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}",
"public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}",
"public void acionou(int a){\n\t\t\tb=a;\n\t\t}",
"public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}",
"public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }",
"public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}",
"public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }",
"public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }",
"public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }",
"public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }",
"public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }",
"public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}",
"public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}",
"public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}",
"protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }",
"public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }",
"public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }",
"public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }",
"public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}",
"public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }",
"public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }",
"interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }",
"public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}",
"public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }",
"private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }",
"interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
] |
[
"0.62497115",
"0.6242887",
"0.61394435",
"0.61176854",
"0.6114027",
"0.60893",
"0.6046901",
"0.6024682",
"0.60201293",
"0.5975212",
"0.59482527",
"0.59121317",
"0.5883635",
"0.587841",
"0.58703005",
"0.5868436",
"0.5864884",
"0.5857492",
"0.58306104",
"0.5827752",
"0.58272064",
"0.5794689",
"0.57890314",
"0.57838726",
"0.5775679",
"0.57694733",
"0.5769128",
"0.57526815",
"0.56907034",
"0.5677874",
"0.5670547",
"0.56666386",
"0.56592244",
"0.5658682",
"0.56574154",
"0.5654324",
"0.5644676",
"0.56399715",
"0.5638734",
"0.5630582",
"0.56183887",
"0.5615435",
"0.56069666",
"0.5605207",
"0.56005067",
"0.559501",
"0.55910283",
"0.5590222",
"0.55736613",
"0.5556682",
"0.5554544",
"0.5550076",
"0.55493855",
"0.55446684",
"0.5538079",
"0.5529058",
"0.5528109",
"0.552641",
"0.5525864",
"0.552186",
"0.5519972",
"0.5509587",
"0.5507195",
"0.54881203",
"0.5485328",
"0.54826045",
"0.5482066",
"0.5481586",
"0.5479751",
"0.54776895",
"0.54671466",
"0.5463307",
"0.54505056",
"0.54436916",
"0.5440517",
"0.5439747",
"0.5431944",
"0.5422869",
"0.54217863",
"0.5417556",
"0.5403905",
"0.5400223",
"0.53998446",
"0.5394735",
"0.5388649",
"0.5388258",
"0.5374842",
"0.5368887",
"0.53591394",
"0.5357029",
"0.5355688",
"0.535506",
"0.5355034",
"0.53494394",
"0.5341044",
"0.5326166",
"0.53236824",
"0.53199095",
"0.53177035",
"0.53112453",
"0.5298229"
] |
0.0
|
-1
|
/ renamed from: a
|
private static Integer m19493a(boolean z) {
return Integer.valueOf(z);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }",
"interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }",
"public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}",
"public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }",
"public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }",
"public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}",
"public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }",
"protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }",
"public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }",
"public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}",
"public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}",
"public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }",
"public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }",
"public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }",
"public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }",
"public void a() {\n ((a) this.a).a();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }",
"@Override\r\n\tpublic void a() {\n\t\t\r\n\t}",
"public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}",
"public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}",
"interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}",
"public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }",
"@Override\n\tpublic void a() {\n\t\t\n\t}",
"public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}",
"public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }",
"public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}",
"public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}",
"public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }",
"public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}",
"public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }",
"public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}",
"public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}",
"public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}",
"public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}",
"public void acionou(int a){\n\t\t\tb=a;\n\t\t}",
"public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}",
"public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }",
"public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}",
"public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }",
"public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }",
"public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }",
"public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }",
"public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }",
"public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}",
"public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}",
"public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}",
"protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }",
"public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }",
"public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }",
"public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }",
"public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}",
"public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }",
"public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }",
"interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }",
"public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}",
"public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }",
"private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }",
"interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
] |
[
"0.62497115",
"0.6242887",
"0.61394435",
"0.61176854",
"0.6114027",
"0.60893",
"0.6046901",
"0.6024682",
"0.60201293",
"0.5975212",
"0.59482527",
"0.59121317",
"0.5883635",
"0.587841",
"0.58703005",
"0.5868436",
"0.5864884",
"0.5857492",
"0.58306104",
"0.5827752",
"0.58272064",
"0.5794689",
"0.57890314",
"0.57838726",
"0.5775679",
"0.57694733",
"0.5769128",
"0.57526815",
"0.56907034",
"0.5677874",
"0.5670547",
"0.56666386",
"0.56592244",
"0.5658682",
"0.56574154",
"0.5654324",
"0.5644676",
"0.56399715",
"0.5638734",
"0.5630582",
"0.56183887",
"0.5615435",
"0.56069666",
"0.5605207",
"0.56005067",
"0.559501",
"0.55910283",
"0.5590222",
"0.55736613",
"0.5556682",
"0.5554544",
"0.5550076",
"0.55493855",
"0.55446684",
"0.5538079",
"0.5529058",
"0.5528109",
"0.552641",
"0.5525864",
"0.552186",
"0.5519972",
"0.5509587",
"0.5507195",
"0.54881203",
"0.5485328",
"0.54826045",
"0.5482066",
"0.5481586",
"0.5479751",
"0.54776895",
"0.54671466",
"0.5463307",
"0.54505056",
"0.54436916",
"0.5440517",
"0.5439747",
"0.5431944",
"0.5422869",
"0.54217863",
"0.5417556",
"0.5403905",
"0.5400223",
"0.53998446",
"0.5394735",
"0.5388649",
"0.5388258",
"0.5374842",
"0.5368887",
"0.53591394",
"0.5357029",
"0.5355688",
"0.535506",
"0.5355034",
"0.53494394",
"0.5341044",
"0.5326166",
"0.53236824",
"0.53199095",
"0.53177035",
"0.53112453",
"0.5298229"
] |
0.0
|
-1
|
TODO: wrap allAvailableRoles into detacheable model
|
public UserEditPanel(String id, IModel<User> userModel, List<Role> allAvailableRoles) {
super(id, userModel);
this.allAvailableRoles = allAvailableRoles;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public List<Role> getAllRoles();",
"List<RoleEntity> getSystemRoles();",
"public abstract Collection getRoles();",
"List<Role> getRoles();",
"public List<SecRole> getAllRoles();",
"@ModelAttribute(\"allRoles\")\r\n\tpublic List<Role> getAllRoles(){\t\r\n\t\treturn roleService.findAdminRoles();\r\n\t\t\r\n\t}",
"Set getRoles();",
"Collection<Role> getRoles();",
"List<String> getRoles();",
"@Override\r\n\tpublic RolesListDto getAllRoles() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic void getAllRole() {\n\t\tSystem.out.println(roles);\r\n\t\t\r\n\t}",
"@PermitAll\n @Override\n public List<Role> getRoles() {\n return getRepository().getEntityList(Role.class);\n }",
"@Override\r\n\tpublic List<Role> getAllRoles() {\n\t\treturn null;\r\n\t}",
"public List<Roles> selectAllRole(){\n\treturn rolesDao.findAll();\n\t}",
"@NotNull\r\n Collection<String> getRoles();",
"@Override\r\n public List<Role> getRoles() {\r\n return roles;\r\n }",
"@Override\n public java.util.List<Role> getRolesList() {\n return roles_;\n }",
"@Override\n public java.util.List<Role> getRolesList() {\n return roles_;\n }",
"public RoleList getRoles() {\n return roleList;\n }",
"private static ArrayList<NameId> getAgentroles() {\n\t\tArrayList<NameId> modelList = new ArrayList<NameId>();\n\t\tif (CONSTANTS.agentroleNames().length != AccessControl.AGENT_ROLES.length) {Window.alert(\"AgentPopup getAgentroles()\");}\n\t\tfor (int i = 0; i < AccessControl.AGENT_ROLES.length; i++) {modelList.add(new NameId(CONSTANTS.agentroleNames()[i], String.valueOf(AccessControl.AGENT_ROLES[i])));}\n\t\treturn modelList;\n\t}",
"java.util.List<Role>\n getRolesList();",
"java.util.List<Role>\n getRolesList();",
"List<Rol> obtenerRoles() throws Exception;",
"private ExportRoles() {}",
"@Override\n\tpublic List<InforRoles> selectRoles() {\n\t\treturn md.selectRoles();\n\t}",
"public Collection<Role> getRoles() {\n return this.roles;\n }",
"@PermitAll\n @Override\n public List<Role> getCurrentUserRoles() {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_QUERY, Role.QUERY_GET_ROLES_BY_USER_NAME);\n params.put(User.PARAM_USERNAME, this.getUserName());\n return getRepository().getEntityList(Role.class, params);\n }",
"private static ArrayList<NameId> getOrganizationroles() {\n\t\tArrayList<NameId> modelList = new ArrayList<NameId>();\n\t\tif (CONSTANTS.organizationroleNames().length != AccessControl.ORGANIZATION_ROLES.length) {Window.alert(\"AgentPopup getOrganizationroles()\");}\n\t\tfor (int i = 0; i < AccessControl.ORGANIZATION_ROLES.length; i++) {modelList.add(new NameId(CONSTANTS.organizationroleNames()[i], String.valueOf(AccessControl.ORGANIZATION_ROLES[i])));}\n\t\treturn modelList;\n\t}",
"public List<RoleDto> getRolesList() {\n return roleDBManager.fetchRolesList();\n }",
"@Override\n public java.util.List<? extends RoleOrBuilder>\n getRolesOrBuilderList() {\n return roles_;\n }",
"@Override\n public java.util.List<? extends RoleOrBuilder>\n getRolesOrBuilderList() {\n return roles_;\n }",
"boolean allGranted(String roles);",
"@Override\r\n\tpublic List<Role> getAllRole() {\n\t\tString hql = \"from Role\";\r\n\t\treturn (List<Role>) getHibernateTemplate().find(hql);\r\n\t}",
"@RequestMapping(value = \"/admin/getRoles\", method = RequestMethod.GET)\n\tpublic @ResponseBody Response getRoles() {\n\t \tResponse response = new Response();\n\t\tresponse.addCommand(new ClientCommand(ClientCommandType.PROPERTY,\"roles\", roleRepository.findAll() ));\n\t\treturn response;\n\t}",
"Set<String> getRoles();",
"@RequestMapping(value = \"/roles\", method = RequestMethod.GET, produces = {MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE})\n @ResponseBody\n public List<Role> getRoles() {\n List<Role> roleList = (List<Role>)roleService.getAll();\n if (roleList.isEmpty()){\n return null;\n }\n return roleList;\n }",
"List<User_Role> selectAll();",
"List<RoleDto> findAllRoles();",
"@Override\n\tpublic List<Role> getAllRoleInfo() {\n\t\treturn roleMapper.queryAll();\n\t}",
"public List<Role> getAllRole() {\n\t\treturn (List<Role>) roleDao.findAll();\n\t}",
"public ArrayList<Role> allRoles() {\n return this.roles;\n }",
"@Override\n public List<RoleModel> getAllRoles() {\n\n logger.info(STARTING_METHOD_EXECUTION);\n logger.info(EXITING_METHOD_EXECUTION);\n return roleRepo.findAll();\n }",
"public Iterable<Role> findAllRoles() {\n Iterable<Role> allRoles = roleRepository.findAll();\n return allRoles;\n }",
"public java.util.List<Role> getRolesList() {\n if (rolesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(roles_);\n } else {\n return rolesBuilder_.getMessageList();\n }\n }",
"public java.util.List<Role> getRolesList() {\n if (rolesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(roles_);\n } else {\n return rolesBuilder_.getMessageList();\n }\n }",
"java.util.List<? extends RoleOrBuilder>\n getRolesOrBuilderList();",
"java.util.List<? extends RoleOrBuilder>\n getRolesOrBuilderList();",
"@Override\n\tpublic List<IRole> getRoles() {\n\t\treturn null;\n\t}",
"public List<RoleDTO> getAllRoles() {\n\t\treturn roleDTOs;\n\t}",
"@Override\n\tpublic ArrayList<String> getRoles()\n\t{\n\t\treturn source.getRoles();\n\t}",
"public Collection<Role> getRoles() {\n return Collections.unmodifiableCollection(roles);\n }",
"Role getRoles(int index);",
"Role getRoles(int index);",
"public String getRoles() {\n return roles;\n }",
"public Set<Role> getSupportRoles() { return Set.copyOf(supportRoles); }",
"public java.util.List<xbean.DeletedRole> getRoles();",
"public java.util.List<? extends RoleOrBuilder>\n getRolesOrBuilderList() {\n if (rolesBuilder_ != null) {\n return rolesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(roles_);\n }\n }",
"public java.util.List<? extends RoleOrBuilder>\n getRolesOrBuilderList() {\n if (rolesBuilder_ != null) {\n return rolesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(roles_);\n }\n }",
"public void getGrantedRoles() {\n\t\tif (path != null) {\n\t\t\tauthService.getGrantedRoles(path, callbackGetGrantedRoles);\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t@Override\n\t@Transactional\n\tpublic ArrayList<ApplicationUserRole> getAllRoles() throws Exception {\n\t\tArrayList<ApplicationUserRole> roleList = null;\n\t\ttry {\n\t\t\tSession session = sessionFactory.getCurrentSession();\n\t\t\tQuery query = session.createQuery(\"from ApplicationUserRole\");\n\t\t\troleList = (ArrayList<ApplicationUserRole>) query.list();\n\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\tthrow e;\n\t\t}\n\t\treturn roleList;\n\t\t\n\t}",
"@Override\r\n\tpublic List<? extends Role> getRoles() {\n\r\n\t\tif (this.roles == null)\r\n\t\t\treturn null;\r\n\r\n\t\treturn new ArrayList(this.roles);\r\n\t\t// ArrayList<MyRole> arrayList = new ArrayList<MyRole>();\r\n\t\t// arrayList.addAll(roles);\r\n\t\t//\r\n\t\t// return arrayList;\r\n\t}",
"com.message.MessageInfo.RoleVO getRole();",
"@Override\n public int getRolesCount() {\n return roles_.size();\n }",
"@Override\n public int getRolesCount() {\n return roles_.size();\n }",
"public Set<String> getRoles()\n {\n return this.roles;\n }",
"@Transient\n public List<LabelValue> getRoleList() {\n List<LabelValue> userRoles = new ArrayList<LabelValue>();\n\n if (this.roles != null) {\n for (Role role : roles) {\n // convert the user's roles to LabelValue Objects\n userRoles.add(new LabelValue(role.getName().substring(5), role.getName()));\n }\n }\n\n return userRoles;\n }",
"@ApiModelProperty(value = \"The list of Software Statement roles\")\n\n\n public List<String> getRoles() {\n return roles;\n }",
"@Override\r\n\tpublic Object getRoles() throws DataAccessException, SQLException {\n\t\tlogger.info(\"start : getRoles UsersMngDaoImpl \");\r\n\t\t \r\n\t\tList<Roles> roleList = roleRepository.findAll();\r\n\t\tlogger.info(\"End : getRoles UsersMngDaoImpl \");\r\n\t\treturn roleList;\r\n\t}",
"@Override\n\tpublic List<Role> findAll() {\n\t\treturn this.roleMapper.findQueryAll();\n\t}",
"public HashSet getDirectRoles() {\n return roles;\n }",
"public Roles roles() {\n return this.roles;\n }",
"List<SysRole> getUserRoles(int userId);",
"@Override\r\n\tpublic List<Role> findAll() {\n\t\treturn roleDao.findAll();\r\n\t}",
"public final String getRoles() {\n return roles;\n }",
"@Override\n\tpublic List<AccountUser> getRoles() {\n\t\treturn auMapper.getRoles();\n\t}",
"@Override\n\tpublic List<IRole> getRoles() {\n\t\treturn getInnerObject().getRoles();\n\t}",
"public String getRoles() throws IOException {\n\t\treturn rolePoster.sendPost(\"getRoles=true\");\n\t}",
"public void getUngrantedRoles() {\n\t\tif (path != null) {\n\t\t\tauthService.getUngrantedRoles(path, callbackGetUngrantedRoles);\n\t\t}\n\t}",
"@Override\n\tpublic List<Role> getRoleList() {\n\t\treturn this.jdbcTemplate.query(\"SELECT * FROM role\", new RoleRowMapper());\n\t}",
"public List getSysRoles(SysRole sysRole);",
"@Override\n\tpublic List<Role> selectRoleForAdd() {\n\t\treturn rd.selectRoleForAdd();\n\t}",
"@Override\n\tpublic List<Role> findAll() {\n\t\treturn (List<Role>) roleDao.findAll();\n\t}",
"public Collection<String> getRoles() {\n return Collections.unmodifiableSet(roles);\n }",
"private void loadRoles() {\n if(roleService.listAll().size() > 0) {\n log.debug(\"Test roles have already been loaded.\");\n return ;\n }\n\n Role role = new Role();\n role.setRole(SpringJPABootstrap.USER);\n roleService.save(role);\n\n log.debug(\"Test roles have been loaded!\");\n }",
"public void saveRoles(){\r\n\t\tif(roles == null)\r\n\t\t\treturn;\r\n\r\n\t\tif(!rolesTreeView.isValidRolesList())\r\n\t\t\treturn;\r\n\r\n\t\tList<Role> deletedRoles = rolesTreeView.getDeletedRoles();\r\n\t\tSaveAsyncCallback callback = new SaveAsyncCallback(MainViewControllerUtil.getDirtyCount(roles) + (deletedRoles != null ? deletedRoles.size() : 0),\r\n\t\t\t\tOpenXdataText.get(TextConstants.ROLES_SAVED_SUCCESSFULLY),OpenXdataText.get(TextConstants.PROBLEM_SAVING_ROLES),roles,deletedRoles,this);\r\n\r\n\t\t//Save new and modified roles.\r\n\t\tfor(Role role : roles) {\r\n\t\t\tif(!role.isDirty())\r\n\t\t\t\tcontinue;\r\n\t\t\telse{\r\n\t\t\t\tcallback.setCurrentItem(role);\r\n\t\t\t\tMainViewControllerUtil.setEditableProperties(role);\r\n\t\t\t}\r\n\r\n\t\t\tContext.getPermissionService().saveRole(role, callback);\r\n\t\t}\r\n\r\n\t\t//Save deleted roles.\r\n\t\tif(deletedRoles != null){\r\n\t\t\tfor(Role role : deletedRoles) {\r\n\t\t\t\tcallback.setCurrentItem(role);\r\n\t\t\t\tContext.getPermissionService().deleteRole(role, callback);\r\n\t\t\t}\r\n\t\t\tdeletedRoles.clear();\r\n\t\t}\r\n\t}",
"public ArrayList<Role> getRoles()\r\n {\r\n return this.securityInfo.getRoles();\r\n }",
"com.message.MessageInfo.RoleVOOrBuilder getRoleOrBuilder();",
"public java.util.List<Role.Builder>\n getRolesBuilderList() {\n return getRolesFieldBuilder().getBuilderList();\n }",
"public java.util.List<Role.Builder>\n getRolesBuilderList() {\n return getRolesFieldBuilder().getBuilderList();\n }",
"public void testRoles() {\n // this has to be an integration test to ensure roles are available.\n internalCluster().startMasterOnlyNode();\n ReactiveStorageDeciderService service = new ReactiveStorageDeciderService(\n Settings.EMPTY,\n new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS),\n null,\n TestShardRoutingRoleStrategies.DEFAULT_ROLE_ONLY\n );\n assertThat(\n service.roles().stream().sorted().collect(Collectors.toList()),\n equalTo(\n DiscoveryNodeRole.roles()\n .stream()\n .filter(DiscoveryNodeRole::canContainData)\n .filter(r -> r != DiscoveryNodeRole.DATA_FROZEN_NODE_ROLE)\n .filter(r -> r != DiscoveryNodeRole.SEARCH_ROLE)\n .filter(r -> r != DiscoveryNodeRole.INDEX_ROLE)\n .sorted()\n .collect(Collectors.toList())\n )\n );\n }",
"@Override\n public List getAllRole() {\n \tMap mSession = ActionContext.getContext().getSession();\n \tInteger clientId = (Integer) mSession.get(\"CLIENT_INFO\");\n Session session = HibernateUtil.getSession();\n try {\n Criteria crit = session.createCriteria(RoleVO.class);\n crit.addOrder(Order.asc(\"roleName\"));\n crit.add(Restrictions.eq(\"isActive\", 1));\n crit.add(Restrictions.eq(\"clientId\", clientId));\n return crit.list();\n } finally {\n session.flush();\n session.close();\n }\n }",
"public List<UserRole> getAllUserRoles() throws ClassNotFoundException, SQLException {\n\t\treturn read(\"select * from user_role\", null);\n\t}",
"List<Role> findAll();",
"@Test\n public void testFetchRoles() {\n final FetchRoleRequest request = new FetchRoleRequest(findNationalGroup(token).getGroupId());\n final FetchRoleResponse response = administration.fetchRoles(token, request);\n assertThat(response, is(not(nullValue())));\n assertThat(response.isOk(), is(true));\n // There should be a total of 4 roles for this Group\n assertThat(response.getRoles().size(), is(4));\n }",
"private void loadTestRoles() {\n//\n// role = new RoleDTO();\n// role.setName(\"Guest\");\n// role.setCanHave(RoleCanHave.TDSManager.name());\n// session.save(role);\n//\n// role = new RoleDTO();\n// role.setName(\"IT\");\n// role.setCanHave(RoleCanHave.TDSRadiologist.name());\n// session.save(role);\n\n RoleAssignmentDTO ra = new RoleAssignmentDTO();\n ra.setAdded(new Date());\n //ra.setStarted(new Date());\n ra.setActive(true);\n //ra.setTdsUser((UserDTO) session.get(UserDTO.class, 1));\n //ra.setTdsRole((RoleDTO) session.get(RoleDTO.class, 1));\n //session.save(ra);\n }",
"@Override\n public RoleOrBuilder getRolesOrBuilder(\n int index) {\n return roles_.get(index);\n }",
"@Override\n public RoleOrBuilder getRolesOrBuilder(\n int index) {\n return roles_.get(index);\n }",
"public Builder clearRoles() {\n if (rolesBuilder_ == null) {\n roles_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n rolesBuilder_.clear();\n }\n return this;\n }",
"@Override\n public Role getRoles(int index) {\n return roles_.get(index);\n }",
"@Override\n public Role getRoles(int index) {\n return roles_.get(index);\n }",
"@Override\n\tpublic List<Map<String, Object>> getRole() {\n\t\treturn this.RoleDao.getRole();\n\t}"
] |
[
"0.7174864",
"0.70287573",
"0.7023968",
"0.701893",
"0.7001687",
"0.69897926",
"0.691136",
"0.6878794",
"0.6783108",
"0.675508",
"0.6740591",
"0.6735245",
"0.6722528",
"0.66676337",
"0.6664176",
"0.66564745",
"0.6641775",
"0.6641775",
"0.66257036",
"0.65969545",
"0.655679",
"0.655679",
"0.65517294",
"0.6542189",
"0.6523041",
"0.6504497",
"0.6484731",
"0.6480151",
"0.64475864",
"0.64465666",
"0.64465666",
"0.64440274",
"0.6413322",
"0.64111686",
"0.6380201",
"0.6374245",
"0.6361694",
"0.6350102",
"0.63471884",
"0.6338619",
"0.63335335",
"0.6330917",
"0.6310194",
"0.6289852",
"0.6289852",
"0.62768173",
"0.62768173",
"0.6250975",
"0.625073",
"0.62504244",
"0.6248005",
"0.6246618",
"0.6246618",
"0.6242149",
"0.6237912",
"0.62314576",
"0.6231197",
"0.6231197",
"0.6198185",
"0.6179476",
"0.6176517",
"0.61723334",
"0.6163153",
"0.6163153",
"0.61562544",
"0.615178",
"0.6140957",
"0.612476",
"0.6117248",
"0.61028576",
"0.6102856",
"0.60930747",
"0.60867554",
"0.60852665",
"0.6081394",
"0.6067788",
"0.60662806",
"0.6052847",
"0.60373366",
"0.6035944",
"0.60245776",
"0.60172445",
"0.60154575",
"0.60113394",
"0.59933305",
"0.5987153",
"0.5980573",
"0.5969193",
"0.5969193",
"0.5956969",
"0.5954513",
"0.5940457",
"0.5934507",
"0.59335196",
"0.5933469",
"0.58991563",
"0.58991563",
"0.5891124",
"0.5879647",
"0.5879647",
"0.5878559"
] |
0.0
|
-1
|
Nothing to do in Task
|
public void setJobObserver(JobObserver jO) {
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tpublic void doTask() {\n\t}",
"public abstract void task();",
"@Override\n public void run() {\n task.run();\n }",
"@Override\r\n\tvoid execute(Runnable task);",
"@Override\n public void execute(final Task<T> task) {\n }",
"@Override\n\t\tpublic void run() {\n\t\t\ttask();\n\t\t}",
"private static void executeTask02() {\n }",
"@Override\n public void run() {\n runTask();\n\n }",
"public void updateTask() {}",
"public Task(){}",
"@Override\n public void taskStarting() {\n\n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"protected TaskFlow( ) { }",
"public void startTask() {\n\t}",
"public void resetTask() {}",
"@Override\n\t\t\tpublic void run() {\n\n\t\t\t}",
"@Override\r\n\t\tpublic void doTaskAsNoNetWork(Message msg) throws Exception {\n\r\n\t\t}",
"abstract void doTaskOnRun();",
"@Override\r\n public void run() {}",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tno();\n\t\t\t\t}",
"public void run() {\n // no-op.\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"public abstract void execute(Task t);",
"@Override\n protected Void doInBackground(Void... voids) {\n return null;\n }",
"@Override\n protected Void doInBackground(Void... voids) {\n return null;\n }",
"@Override\n protected Void doInBackground(Void... voids) {\n return null;\n }",
"@Override\n\tprotected Object run() {\n\t\treturn null;\n\t}",
"@Override\n\t\tpublic void run() {\n\n\t\t}",
"public abstract void task() throws InterruptedException;",
"@Override\r\n public List getExecutingTask() {\n return null;\r\n }",
"protected void setupTask(Task task) {\n }",
"@Override\n protected void execute() {\n \n }",
"@Override\n\t\t\tpublic void subTask(String name) {\n\t\t\t\t\n\t\t\t}",
"protected Task<Void> createTask() {\n\n\t\t\treturn new Task<Void>() {\n\n\t\t\t\tprotected Void call() {\n\t\t\t\t\t_button.setDisable(true);\n\t\t\t\t\tTaskScheduler.executeAlgorithm(_digraph);\n\n\t\t\t\t\treturn null;\n\n\n\t\t\t\t}\n\t\t\t};\n\t\t}",
"@Override\n protected void execute() {\n }",
"@Override\n protected void execute() {\n }",
"@Override\n protected void execute() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\r\n\tprotected void execute() {\r\n\t}",
"private void m1557a(Task task) {\n synchronized (f1826f) {\n if (f1827g == null) {\n f1827g = new SideChannelManager(this.f1828d.getApplicationContext());\n }\n f1827g.queueTask(task);\n }\n }",
"@Override\n\tpublic void onFinal(Task task) {\n\n\t}",
"protected void execute() {\n \t// literally still do nothing\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"public void get(final Task task) {\n }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"public void processTask(final EngineTask task) {\n processTask(task, null);\n }",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}",
"public Task() { }",
"@Override\n public void run() {\n }",
"@Override\n public void run() {\n }",
"public Task getTask() { return task; }",
"public Task(){\n super();\n }",
"@Override\n public Void doInBackground() {\n Random random = new Random();\n\n return null;\n }",
"@Override\n public Void doInBackground() {\n Random random = new Random();\n\n return null;\n }",
"Task createTask();",
"Task createTask();",
"Task createTask();",
"@Override\n public void onComplete(@NonNull Task<Void> task) {\n }",
"@Override\n public void onComplete(@NonNull Task<Void> task) {\n }",
"@Override\r\n\tprotected void processExecute() {\n\r\n\t}",
"@Override\n\t\tpublic void subTask(String arg0) {\n\n\t\t}",
"@Override\n\t\t\tpublic void beginTask(String name, int totalWork) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void run() {\n //如果本延迟任务已经执行,那么做个标识标注本清楚任务已经执行,然后手按下的时候那里就不会移除本任务\n b = false;\n cleanLine();\n }",
"@Override\n public void callSync() {\n\n }",
"@Override\n public void execute() {\n \n \n }",
"@Override\n\t\t\tpublic String run() {\n\t\t\t\treturn null;\n\t\t\t}",
"@Override\n public void run()\n {\n }",
"@Override\n public void run()\n {\n }",
"@Override\n public void done() {\n }",
"@Override\n public void done() {\n }",
"protected TaskChain() {\n\t}",
"@Override\n public void run() {\n }",
"private void workOnQueue() {\n }",
"@Override\r\n\tpublic void process(ResultItems arg0, Task arg1) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"public Task() {\r\n }",
"@Override\n public void run(){\n }",
"@Override\n public void run() {\n }",
"@Override\r\n public void tasksFinished()\r\n {\n }",
"@Override\r\n\t\t\t\tpublic void run() {\n\r\n\t\t\t\t}"
] |
[
"0.72151303",
"0.6991896",
"0.6873153",
"0.68051535",
"0.67577934",
"0.67433226",
"0.6592373",
"0.65616333",
"0.65461725",
"0.654261",
"0.65371156",
"0.64695567",
"0.64695567",
"0.6466253",
"0.64623433",
"0.64554065",
"0.6442994",
"0.6370639",
"0.63545436",
"0.63484496",
"0.63155967",
"0.6315093",
"0.6295002",
"0.6293967",
"0.6293967",
"0.6290412",
"0.6273904",
"0.6273904",
"0.6273904",
"0.62681156",
"0.6225095",
"0.62244284",
"0.62226605",
"0.62123317",
"0.6201297",
"0.61905164",
"0.61815995",
"0.6172423",
"0.6172423",
"0.6172423",
"0.616646",
"0.616646",
"0.616646",
"0.61578345",
"0.6155778",
"0.6154151",
"0.61536765",
"0.61433",
"0.61433",
"0.61433",
"0.61433",
"0.61433",
"0.61433",
"0.61433",
"0.6142832",
"0.61381084",
"0.61381084",
"0.6137935",
"0.6137613",
"0.6137613",
"0.61249644",
"0.61198014",
"0.61198014",
"0.61186385",
"0.611776",
"0.61105025",
"0.61105025",
"0.6109625",
"0.6109625",
"0.6109625",
"0.61031705",
"0.61031705",
"0.6094889",
"0.60945725",
"0.60907114",
"0.6080767",
"0.6076081",
"0.6070427",
"0.6068772",
"0.60658276",
"0.60658276",
"0.6063815",
"0.6063815",
"0.6057188",
"0.60562253",
"0.60537696",
"0.60537446",
"0.605161",
"0.605161",
"0.605161",
"0.605161",
"0.605161",
"0.605161",
"0.605161",
"0.605161",
"0.605161",
"0.6042265",
"0.6037523",
"0.603117",
"0.6030817",
"0.60166526"
] |
0.0
|
-1
|
Process is the method called to process an item. An item can have multiple Content objects, so here we extract all the Text content and then process each in turn.
|
@Override
public ProcessorResponse process(Item item) {
item.getContents(Text.class).forEach(this::processText);
//Once we're done, we return ok (if there were errors, we could return a different response optionally with exceptions).
return ProcessorResponse.ok();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void process(Page page) {\n\t\t\t\tgetContent(page);\n\t\t\t}",
"@Override\r\n\tpublic void process(ResultItems resultItems, Task task) {\n\t\tfinal String url = resultItems.getRequest().getUrl();\r\n\t\tSystem.out.println(\"****************--Entry Pipeline Process--*****************\");\r\n\t\tSystem.out.println(\"Get page: \" + url);\r\n\r\n\t\t/*\r\n\t\t * if(url.matches(\r\n\t\t * \"http://blog\\\\.sina\\\\.com\\\\.cn/s/articlelist_.*\\\\.html\")){//文章列表\r\n\t\t * System.out.println(\"No Op in Article List\"); // }else\r\n\t\t * if(url.matches(\"http://www\\\\.asianews\\\\.it/news-en/.*\")){\r\n\t\t */\r\n\t\t// 具体文章内容\r\n\t\tString time = null, title = null, content = null, abstracts = null, convertUrl = null,query=\"\";\r\n\r\n\t\tfor (Map.Entry<String, Object> entry : resultItems.getAll().entrySet()) {\r\n\t\t\t// System.out.println(entry.getKey()+\":\\n\"+entry.getValue());\r\n\r\n\t\t\tif (AsianViewDetailItem.TIME.equals(entry.getKey())) {\r\n\t\t\t\ttime = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.TITLE.equals(entry.getKey())) {\r\n\t\t\t\ttitle = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.ABSTRACT.equals(entry.getKey())) {\r\n\t\t\t\tabstracts = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.CONTENT.equals(entry.getKey())) {\r\n\t\t\t\tcontent = (String) entry.getValue();\r\n\t\t\t} else if (AsianViewDetailItem.URL.equals(entry.getKey())) {\r\n\t\t\t\tassert url.equals(entry.getValue());\r\n\t\t\t} else if (AsianViewDetailItem.CONVERT_URL.equals(entry.getKey())) {\r\n\t\t\t\tconvertUrl = (String) entry.getValue();\r\n\t\t\t}else if(AsianViewDetailItem.QUERY.equals(entry.getKey())){\r\n//\t\t\t\tquery=\"//query_\"+(String) entry.getValue();\r\n\t\t\t\tquery=(entry.getValue()!=null)?\"//query_\"+entry.getValue():\"\";\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// System.out.println(\"Time:\\n\"+CorpusFormatter.timeFormat(time));\r\n\t\t//\r\n\t\t// System.out.println(\"Title:\\n\"+title);\r\n\t\t//\r\n\t\t// System.out.println(\"Abstract:\\n\"+abstracts);\r\n\t\t//\r\n\t\t// System.out.println(\"Content:\\n\"+content);\r\n\t\t//\r\n\t\t// System.out.println(\"Url:\\n\"+url);\r\n\r\n\t\tString id = String.format(\"%s-%s\", time, ++counter);\r\n\r\n\t\tfinal String fileName = String.format(\".//\" + FileUtils.docName + \"%s//%s.txt\",query, id);\r\n\t\tSystem.out.println(\"File name :\" + fileName);\r\n\t\t// FileUtils.writeContent(fileName, time, title, content);\r\n\t\tFileUtils.writeCorpus(fileName,\r\n\t\t\t\tconvertUrl != null\r\n\t\t\t\t\t\t? CorpusFormatter.format(id, time, url, \"T\", \"P\", title, abstracts,\r\n\t\t\t\t\t\t\t\tcontent, \"\", \"\", convertUrl)\r\n\t\t\t\t\t\t: CorpusFormatter.format(id, time, url, \"T\", \"P\", title, abstracts,\r\n\t\t\t\t\t\t\t\tcontent, \"\", \"\"));\r\n\r\n\t\t// }else{\r\n\t\t// System.out.println(\"Can't match Url\");\r\n\t\t// }\r\n\t\tSystem.out.println(\"****************--Exit Pipeline Process--*****************\");\r\n\r\n\t}",
"public synchronized void processAll()\r\n {\r\n if (!myItems.isEmpty())\r\n {\r\n myProcessor.accept(New.list(myItems));\r\n myItems.clear();\r\n }\r\n }",
"public synchronized void process() \n\t{\n\t\t// for each word in a line, tally-up its frequency.\n\t\t// do sentence-segmentation first.\n\t\tCopyOnWriteArrayList<String> result = textProcessor.sentenceSegmementation(content.get());\n\t\t\n\t\t// then do tokenize each word and count the terms.\n\t\ttextProcessor.tokenizeAndCount(result);\n\t}",
"private void processContentCn() {\n if (this.content == null || this.content.equals(\"\")) {\r\n _logger.error(\"{} - The sentence is null or empty\", this.traceId);\r\n }\r\n\r\n // process input using ltp(Segmentation, POS, DP, SRL)\r\n this.ltp = new LTP(this.content, this.traceId, this.setting);\r\n }",
"public void processItem(OUT item)throws CrawlerException{\n processor.process(item);\n }",
"@Override\r\n\tpublic void process(ResultItems arg0, Task arg1) {\n\t\t\r\n\t}",
"public String process(Item item) throws ProcessException {\n\t\t\treturn pos.getPartOfSpeech(item.toString());\n\t\t}",
"private void processContentEn() {\n if (this.content == null || this.content.equals(\"\")) {\r\n _logger.error(\"{} - The sentence is null or empty\", this.traceId);\r\n }\r\n\r\n // process input using ltp(Segmentation, POS, DP, SRL)\r\n this.nlp = new NLP(this.content, this.traceId, this.setting);\r\n }",
"@Override\n protected void processPages(PDPageTree pages) throws IOException {\n\n List<ObjectRef> pageRefs = new ArrayList<>();\n //STEP 1: get the page refs\n findPages(pdDocument.getPages().getCOSObject().getItem(COSName.KIDS), pageRefs);\n //confirm the right number of pages was found\n if (pageRefs.size() != pdDocument.getNumberOfPages()) {\n throw new IOException(new TikaException(\n \"Couldn't find the right number of page refs (\" + pageRefs.size() +\n \") for pages (\" + pdDocument.getNumberOfPages() + \")\"));\n }\n\n PDStructureTreeRoot structureTreeRoot =\n pdDocument.getDocumentCatalog().getStructureTreeRoot();\n\n //STEP 2: load the roleMap\n Map<String, HtmlTag> roleMap = loadRoleMap(structureTreeRoot.getRoleMap());\n\n //STEP 3: load all of the text, mapped to MCIDs\n Map<MCID, String> paragraphs = loadTextByMCID(pageRefs);\n\n //STEP 4: now recurse the the structure tree root and output the structure\n //and the text bits from paragraphs\n\n try {\n recurse(structureTreeRoot.getK(), null, 0, paragraphs, roleMap);\n } catch (SAXException e) {\n throw new IOException(e);\n }\n\n //STEP 5: handle all the potentially unprocessed bits\n try {\n if (state.hrefAnchorBuilder.length() > 0) {\n xhtml.startElement(\"p\");\n writeString(state.hrefAnchorBuilder.toString());\n xhtml.endElement(\"p\");\n }\n for (MCID mcid : paragraphs.keySet()) {\n if (!state.processedMCIDs.contains(mcid)) {\n if (mcid.mcid > -1) {\n //TODO: LOG! piece of text that wasn't referenced in the marked content\n // tree\n // but should have been. If mcid == -1, this was a known item not part of\n // content tree.\n }\n\n xhtml.startElement(\"p\");\n writeString(paragraphs.get(mcid));\n xhtml.endElement(\"p\");\n }\n }\n } catch (SAXException e) {\n throw new IOException(e);\n }\n //Step 6: for now, iterate through the pages again and do all the other handling\n //TODO: figure out when we're crossing page boundaries during the recursion\n // step above and do the page by page processing then...rather than dumping this\n // all here.\n for (PDPage page : pdDocument.getPages()) {\n startPage(page);\n endPage(page);\n }\n\n }",
"protected void parseElements(XmlElement processElement) {\n\n parseStartEvents(processElement);\n parseActivities(processElement);\n parseEndEvents(processElement);\n parseSequenceFlow(processElement);\n }",
"public void process(TemplatingContext templatingContext)\n throws ProcessingException\n {\n // do nothing in base implementation\n }",
"@Override\n\tpublic void process(Page page) {\n\t\t\n\t}",
"public Task processContent (String txtLine) throws MonicaException {\n String[] content = txtLine.split(\" \\\\| \");\n String taskType = content[0];\n int taskStatus = Integer.parseInt(content[1]);\n String taskDescription = content[2];\n DateTimeFormatter dateTimeFormat = DateTimeFormatter.ofPattern(\"HHmm, dd MMM yyyy\");\n\n switch(taskType) {\n case \"D\":\n String deadlineTime = content[3];\n return new Deadline(taskDescription, taskStatus,\n LocalDateTime.parse(deadlineTime, dateTimeFormat));\n case \"E\":\n String eventTime = content[3];\n return new Event(taskDescription, taskStatus,\n LocalDateTime.parse(eventTime, dateTimeFormat));\n case \"T\":\n return new Todo(taskDescription, taskStatus);\n default:\n throw new MonicaException(taskType + \" is an invalid text type.\");\n }\n }",
"@Override\n protected void process() {\n final List<File> srtFiles = new FileFinder().collect(new File(Constants.FILEFIXER_ROOT_DIR), Constants.SRT_EXTENSION);\n\n // process each file, making a backup first if it is enabled\n for (final File srtFile : srtFiles) {\n System.out.println(\"Processing subtitle file :: \" + srtFile.getName());\n\n if (Constants.MAKE_BACKUPS) {\n backupFile(srtFile);\n }\n\n fix(srtFile);\n }\n }",
"@Override\n\tpublic Result doProcessing() {\n\t\treturn doProcessing1();\n\t}",
"private void processText(){\n if(text == null || text.length() == 0){\n // When posting a tweet, Twitter returns the \"text\" JSON field even if it's not trimmed...\n text = trimmedText;\n }else{\n // Trim the original contents received from Twitter\n text = text.substring(0, text.offsetByCodePoints(0, displayTextRange[1]));\n }\n\n // Transform HTML characters (for some reason Twitter sends those)\n text = org.apache.commons.text.StringEscapeUtils.unescapeHtml4(text);\n }",
"@Override\r\n\tprotected void process(List<String> chunks) {\r\n\t\tfor (String data: chunks) {\r\n\t\t\thandleData(data);\r\n\t\t}\r\n\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"static void processFile(File xmlFile) {\n Document doc = null;\n try {\n doc = builder.parse(xmlFile);\n }\n catch (IOException e) {\n e.printStackTrace();\n System.exit(3);\n }\n catch (SAXException e) {\n System.out.println(\"Parsing error on file \" + xmlFile);\n System.out.println(\" (not supposed to happen with supplied XML files)\");\n e.printStackTrace();\n System.exit(3);\n }\n \n /* At this point 'doc' contains a DOM representation of an 'Items' XML\n * file. Use doc.getDocumentElement() to get the root Element. */\n System.out.println(\"Successfully parsed - \" + xmlFile);\n \n /* Fill in code here (you will probably need to write auxiliary\n methods). */\n \n Element[] elems = getElementsByTagNameNR(doc.getDocumentElement(), \"Item\");\n for(Element e : elems) {\n\n String itemId = e.getAttribute(\"ItemID\");\n String name = getElementTextByTagNameNR(e, \"Name\");\n String currently = strip(getElementTextByTagNameNR(e, \"Currently\"));\n String buy_price = strip(getElementTextByTagNameNR(e, \"Buy_Price\"));\n String first_bid = strip(getElementTextByTagNameNR(e, \"First_Bid\"));\n String number_of_bids = getElementTextByTagNameNR(e, \"Number_of_Bids\");\n String country = getElementTextByTagNameNR(e, \"Country\");\n String started = changeTime(getElementTextByTagNameNR(e, \"Started\"));\n String ends = changeTime(getElementTextByTagNameNR(e, \"Ends\"));\n Element seller = getElementByTagNameNR(e, \"Seller\");\n String sellerId = seller.getAttribute(\"UserID\");\n String sellerRatings = seller.getAttribute(\"Rating\");\n String location = getElementTextByTagNameNR(e, \"Location\");\n Element locate = getElementByTagNameNR(e, \"Location\");\n String latitude = locate.getAttribute(\"Latitude\");\n String longitude = locate.getAttribute(\"Longitude\");\n String description = getElementTextByTagNameNR(e, \"Description\");\n if(description.length() > 4000)\n description = description.substring(0, 4001);\n\n // add the record to the list\n items.add(itemRecord(itemId, name, currently, buy_price, first_bid, number_of_bids, country,\n started, ends, sellerId, location, latitude, longitude, description));\n\n // add the category infomation and belongsTo information\n Element[] cates = getElementsByTagNameNR(e, \"Category\");\n for(Element c : cates) {\n String cate = getElementText(c);\n if(category.containsKey(cate) == false) {\n int cnt = category.size();\n category.put(cate, cnt);\n }\n int index = category.get(cate);\n String caterecord = itemId + columnSeparator + index;\n belongsTo.add(caterecord);\n }\n\n // add the user information\n if(users.containsKey(sellerId)) {\n users.get(sellerId).sellRating = sellerRatings;\n }\n else {\n User u = new User(sellerId);\n u.sellRating = sellerRatings;\n users.put(sellerId, u);\n }\n\n // add the bid infromation and bider inforamtion\n Element[] ebids = getElementsByTagNameNR(getElementByTagNameNR(e, \"Bids\"), \"Bid\");\n for(Element b : ebids) {\n Element bidder = getElementByTagNameNR(b, \"Bidder\");\n String bidderId = bidder.getAttribute(\"UserID\");\n String bidderRating = bidder.getAttribute(\"Rating\");\n String bidderloc = getElementTextByTagNameNR(bidder, \"Location\");\n String biddercoun = getElementTextByTagNameNR(bidder, \"Country\");\n String amount = strip(getElementTextByTagNameNR(b, \"Amount\"));\n String time = changeTime(getElementTextByTagNameNR(b, \"Time\"));\n\n\n if(users.containsKey(bidderId) == false) {\n User u = new User(bidderId);\n users.put(bidderId, u);\n }\n users.get(bidderId).location = bidderloc;\n users.get(bidderId).country = biddercoun;\n users.get(bidderId).bidRating = bidderRating;\n bids.add(bidRecord(itemId, bidderId, time, amount));\n }\n\n }\n \n \n /**************************************************************/\n \n }",
"public void process(String para){\r\n\r\n\t\tif( !para.isEmpty()){\r\n\r\n\t\t\t//System.out.println(\"Para:\"+para);\r\n\t\t\tParagraph paragraph = new Paragraph();\r\n\t\t\tparagraph.process(para);\r\n\t\t\t//System.out.println(paragraph.toString());\r\n\t\t\tparagraphs.add(paragraph);\r\n\t\t}\r\n\r\n\r\n\t}",
"@Override\n\t\tprotected void process() throws Exception {\n\t\t\tthis.status = \"{\\\"status\\\":\\\"Now processing - Initializing Models...\\\",\\\"starttime\\\":\"\n\t\t\t\t\t+ start_time + \",\\\"uuid\\\":\\\"\" + this.uuid + \"\\\"}\";\n\t\t\tGlobalVars.initialize();\n\n\t\t\t// Processing Step 1. - CoreNLP\n\t\t\tthis.status = \"{\\\"status\\\":\\\"Now processing CoreNLP.\\\",\\\"starttime\\\":\"\n\t\t\t\t\t+ start_time + \",\\\"uuid\\\":\\\"\" + this.uuid + \"\\\"}\";\n\t\t\tString processed_text = Filter\n\t\t\t\t\t.filterdata(GlobalVars.pipeline, text);\n\n\t\t\t// Processing Step 2. - Openie\"\n\t\t\tthis.status = \"{\\\"status\\\":\\\"Now processing Openie.\\\",\\\"starttime\\\":\"\n\t\t\t\t\t+ start_time + \",\\\"uuid\\\":\\\"\" + this.uuid + \"\\\"}\";\n\t\t\tStringBuilder openIEOutput = new StringBuilder();\n\t\t\tString temp = \"\";\n\t\t\tfor (String sentence : processed_text.split(\"\\\\. \")) {\n\n\t\t\t\tSeq<Instance> extractions = GlobalVars.openIE.extract(sentence);\n\n\t\t\t\tInstance[] arr = new Instance[extractions.length()];\n\t\t\t\textractions.copyToArray(arr);\n\n\t\t\t\tfor (Instance inst : arr) {\n\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\tsb.append(inst.sentence() + \"\\n\");\n\t\t\t\t\tDouble conf = inst.confidence();\n\t\t\t\t\tString stringConf = conf.toString().substring(0, 4);\n\t\t\t\t\tsb.append(stringConf).append(\" (\")\n\t\t\t\t\t\t\t.append(inst.extr().arg1().text()).append(\"; \")\n\t\t\t\t\t\t\t.append(inst.extr().rel().text()).append(\"; \");\n\n\t\t\t\t\ttemp += inst.extr().arg1().text() + \"\\n\"\n\t\t\t\t\t\t\t+ inst.extr().rel().text() + \"\\n\";\n\n\t\t\t\t\tPart[] arr2 = new Part[inst.extr().arg2s().length()];\n\t\t\t\t\tinst.extr().arg2s().copyToArray(arr2);\n\t\t\t\t\t/*\n\t\t\t\t\t * for (Part arg : arr2) { sb.append(arg.text()).append(\"\");\n\t\t\t\t\t * System.out.println(\"%\" + arg.text() + \"%\"); }\n\t\t\t\t\t */\n\t\t\t\t\tif (arr2.length != 0) {\n\t\t\t\t\t\tSystem.out.println(\"Hats: \" + arr2[0]);\n\t\t\t\t\t\ttemp += arr2[0] + \"\\n\";\n\t\t\t\t\t\tsb.append(arr2[0]);\n\t\t\t\t\t\tsb.append(\")\\n\\n\");\n\t\t\t\t\t\topenIEOutput.append(sb.toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Processing Step 3. - Rewrite\n\t\t\tthis.status = \"{\\\"status\\\":\\\"Now processing Rewrite.\\\",\\\"starttime\\\":\"\n\t\t\t\t\t+ start_time + \",\\\"uuid\\\":\\\"\" + this.uuid + \"\\\"}\";\n\t\t\t// Load load = new Load();\n\t\t\t// result = load.Loadfilter(openIEOutput.toString());\n\t\t\tresult = temp;\n\t\t}",
"public void processDocument(String url) throws PageReadException {\n // TODO: reset the results.\n impossible = false;\n givenUrl = url;\n nextPageLink = null;\n if (!notFirstPage) {\n xmlImages = new ArrayList<String>();\n title = null;\n }\n\n String content = pageReader.readPage(url);\n\n document = Jsoup.parse(content);\n\n if (document.getElementsByTag(\"body\").size() == 0) {\n LOG.error(\"no body to parse \" + url);\n impossible = true;\n throw new PageReadException(\"no body to parse\");\n }\n\n init(); // this needs another name, it does all the work.\n if (readAllPages && nextPageLink != null) {\n try {\n String textSoFar = articleText;\n notFirstPage = true;\n processDocument(nextPageLink);\n if (articleText != null) {\n articleText = textSoFar + articleText;\n }\n } finally {\n notFirstPage = false;\n System.out.println(articleText);\n }\n }\n\n }",
"public void parse(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context)\n\t\tthrows IOException,SAXException,TikaException {\n\n\t\t// Get metadata\n\t\tthis.mdata = metadata;\n\n\t\t// Read in all text\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(stream));\n\t\tString line = reader.readLine();\n\t\tString text = \"\";\n\t\twhile (line != null) {\n\t\t\ttext += line;\n\t\t\tline = reader.readLine();\n\t\t}\n\t\treader.close();\n\n\t\ttry {\n\t\t\t// Get NER results from each NER toolkit.\n\t\t\tthis.openNLPEntities = this.openNLPParse(text);\t\n\t\t\tthis.coreNLPEntities = this.coreNLPParse(text);\t\n\t\t\tthis.nltkEntities = this.nltkParse(text);\n\t\t\tthis.gQMeasurements = this.gQParse(text);\n\n\t\t\t// Combine results and add to metadata.\n\t\t\tMap<String, Map<String,Integer>> combo = combineResults();\n\t\t\tString json = mapToJSON(combo);\n\t\t\tString openNLPJSON = mapToJSON(this.openNLPEntities);\n\t\t\tString coreNLPJSON = mapToJSON(this.coreNLPEntities);\n\t\t\tString nltkJSON = mapToJSON(this.nltkEntities);\n\t\t\tpushToMetadata(\"openNLP entities\", openNLPJSON);\n\t\t\tpushToMetadata(\"coreNLP entities\", coreNLPJSON);\n\t\t\tpushToMetadata(\"nltk entities\", nltkJSON);\n\t\t\tpushToMetadata(\"maxJointAgreement\",json);\n\t\t\tpushToMetadata(\"quantities\", this.gQMeasurements);\n\t\t\n\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n\tpublic List<JobRecordDataTO> process(List<JobRecordDataTO> item) throws Exception {\n\t\treturn null;\n\t}",
"private void processItem(FilePath path, final ChangelistBuilder builder)\r\n {\n if( VcsUtil.isFileForVcs( path, project, StarteamVcsAdapter.getInstance(project) ) )\r\n {\r\n if( path.isDirectory() )\r\n {\r\n processFolder( path, builder );\r\n iterateOverDirectories( path.getPath(), builder );\r\n }\r\n else\r\n processFile( path, builder );\r\n }\r\n }",
"@Override\r\n\tpublic void process() {\n\t\tSystem.out.println(\"this is CompositeBOx \" + this.toString());\r\n\t\tfinal Iterator it = mBoxList.iterator();\r\n\t\twhile(it.hasNext())\r\n\t\t{\r\n\t\t\tIBox box = (IBox)it.next();\r\n\t\t\tbox.process();\r\n\t\t}\r\n\t}",
"public Object parseItem(int rssType, Document doc, int index) throws Exception;",
"public void processMessage()\n {\n \tif(messageContents.getMessage().containsCommand())\n {\n \tCommand command = new Command(messageContents);\n CommandProcessor commandProcessor = new CommandProcessor(joeBot, command);\n commandProcessor.processCommand();\n }\n else\n {\n Speech speech = new Speech(messageContents);\n SpeechProcessor speechProcessor = new SpeechProcessor(joeBot, speech);\n speechProcessor.processSpeech();\n }\n }",
"public String process(Item item) throws ProcessException {\n\t\t\tint count = 0;\n\t\t\tItem inPhrase = SUB_PHRASE_PATH.findItem(item);\n\n\t\t\tfor (Item p = inPhrase; p != null; p = p.getPrevious()) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\treturn Integer.toString(rail(count));\n\t\t}",
"void handleText(TextElement toHandle) {\r\n pageList.add(toHandle);\r\n }",
"void retrievePageContents()\n\t{\n\t\tStringBuilder longString = new StringBuilder();\n\t\tfor (int i = 0; i < pageContents.size(); i++)\n\t\t{\n\t\t\tlongString.append(pageContents.get(i));\n\t\t}\n\t\tString pageMarkup = longString.toString().toLowerCase();\n\t\textractComments(pageMarkup);\n\n\t}",
"public void process() {\n\t}",
"protected void parseProcess(XmlElement processElement) {\n\n // Reset all mappings that are related to one process definition\n // sequenceFlows = new HashMap<String, TransitionImpl>();\n\n // The name of the ProcessDefinition is the value of 'name' attribute, in case that it is defined.\n String processName;\n if (processElement.getAttribute(\"name\") == null || processElement.getAttribute(\"name\").isEmpty()) {\n\n processName = processElement.getAttribute(\"id\");\n } else {\n\n processName = processElement.getAttribute(\"name\");\n }\n processBuilder.setName(processName);\n\n processBuilder.setDescription(parseDocumentation(processElement));\n processBuilder.setAttribute(\"targetNamespace\", rootElement.getAttribute(\"targetNamespace\"));\n\n parseElements(processElement);\n\n //\n // preserve original attributes\n //\n parseGeneralInformation(processElement, processBuilder);\n\n try {\n\n BpmnProcessDefinitionModifier.decorateWithDefaultBpmnInstantiationPattern(processBuilder);\n this.finishedProcessDefinition = processBuilder.buildDefinition();\n } catch (IllegalStarteventException buildingDefinitionException) {\n\n String errorMessage = \"The processDefintion could be built.\";\n logger.error(errorMessage, buildingDefinitionException);\n }\n\n // Doing the afterwork\n for (BpmnXmlParseListener parseListener : parseListeners) {\n parseListener.parseProcess(processElement, finishedProcessDefinition);\n }\n }",
"public abstract List<EXIFContent> parse();",
"private void parseResponse(String response, List<NewsDetailItem> items) {\n\n Pattern pText = Pattern.compile(ITEM_TEXT_PREF + \".*?\" + ITEM_TEXT_POSTF);\n Pattern pTitle = Pattern.compile(TITLE_PREF + \".*?\" + TITLE_POSTF);\n Pattern pDate = Pattern.compile(\"class=\\\"metadata\\\">.*?</a>\");\n Pattern pDate2 = Pattern.compile(\"</strong>.*?<\");\n\n Pattern pImage2 = Pattern.compile(IMG_PREF + \".*?\" + IMG_POSTF);\n\n Pattern pVideo = Pattern.compile(VIDEO_PREF + \".*?\" + VIDEO_POSTF);\n\n Pattern pImageUrl = Pattern.compile(IMG_URL_PREF + \".*?\" + IMG_URL_POSTF);\n\n Pattern pComment = Pattern.compile(\"li class=\\\" item\\\" id=\\\"comment.*?</li>\");\n Pattern pAuthor = Pattern.compile(\"class=\\\"commentauthor\\\".*?</span>\");\n\n Pattern pAuthorName1 = Pattern.compile(\"'>.*?</span>\");\n Pattern pAuthorName2 = Pattern.compile(\"/>.*?</span>\");\n Pattern pAuthorImage = Pattern.compile(AUTHOR_IMAGE_PREF + \".*?\" + AUTHOR_IMAGE_POSTF);\n\n Pattern pCommentText = Pattern.compile(\"<span id=\\\"co_.*?</li>\");\n Pattern pCommentId = Pattern.compile(COMMENT_ID_PREFIX + \".*?\" + COMMENT_ID_POSTFIX);\n\n Pattern pCommentTex2t = Pattern.compile(\"dislike-counter.*?comment-toolbar\"); //Pattern.compile(COMMENT_PREFIX + \".*?\" + COMMENT_POSTFIX);\n Pattern pCommentText3 = Pattern.compile(COMMENT_PREFIX + \".*?\" + COMMENT_POSTFIX);\n Pattern pThumbsDown = Pattern.compile(\"dislike-counter-comment.*?</span>\");\n Pattern pThumbsUp = Pattern.compile(\"like-counter-comment.*?</span>\");\n Pattern pThumb2 = Pattern.compile(THUMB_PREF + \".*?\" + THUMB_POSTF);\n\n Pattern pCommentDate = Pattern.compile(COMMENTDATE_PREF + \".*?\" + COMMENTDATE_POSTF);\n Pattern pWidth = Pattern.compile(WIDTH_PREF + \".*?\" + WIDTH_POSTF);\n Pattern pHeight = Pattern.compile(HEIGHT_PREF + \".*?\" + HEIGHT_POSTF);\n\n Pattern pAkismet = Pattern.compile(\"vortex_ajax_comment\"+\".*?\"+\";\");\n\n Pattern pAkismet2 = Pattern\n .compile(\"\\\"nonce\\\":\\\".*?\"+\"\\\"\");\n\n Pattern pValue = Pattern.compile(\"value=\\\".*?\\\"\");\n\n Pattern pAk_js = Pattern\n .compile(\"id=\\\"ak_js\\\".*?/>\");\n\n\n String akismet = \"\";\n String ak_js = \"\";\n String postId = \"\";\n Matcher makismet_comment = pAkismet.matcher(response);\n if (makismet_comment.find()) {\n Matcher mvalue = pAkismet2.matcher(makismet_comment.group());\n if (mvalue.find()) {\n akismet = mvalue.group();\n akismet = akismet.replace(\"\\\"\", \"\");\n akismet = akismet.replace(\"nonce:\", \"\");\n }\n }\n\n Matcher mak_js = pAk_js.matcher(response);\n if (mak_js.find()) {\n Matcher mvalue = pValue.matcher(mak_js.group());\n if (mvalue.find()) {\n ak_js = mvalue.group();\n ak_js = ak_js.replace(\"\\\"\", \"\");\n ak_js = ak_js.replace(\"value=\", \"\");\n }\n }\n\n\n Pattern ppost_id = Pattern.compile(\"name=\\\"comment_post_ID\\\".*?/>\");\n Matcher mpost_id = ppost_id.matcher(response);\n if (mpost_id.find()) {\n Matcher mvalue = pValue.matcher(mpost_id.group());\n if (mvalue.find()) {\n postId = mvalue.group();\n postId = postId.replace(\"\\\"\", \"\");\n postId = postId.replace(\"value=\", \"\");\n }\n }\n\n Matcher itemMatcher;\n itemMatcher = pDate.matcher(response);\n String date = \"\";\n if (itemMatcher.find()) {\n itemMatcher = pDate2.matcher(itemMatcher.group());\n if (itemMatcher.find()) {\n date = itemMatcher.group().substring(10);\n date = date.substring(0, date.length() - 2);\n }\n }\n\n Matcher mTitle = pTitle.matcher(response);\n if (mTitle.find()) {\n String itemText = mTitle.group().substring(TITLE_PREF.length()); //(\" dc:title=\\\"\".length()).replace(\"\\\"\", \"\");\n itemText = itemText.substring(0, itemText.length() - TITLE_POSTF.length());\n NewsDetailItem item = new NewsDetailItem();\n item.setText(itemText);\n item.setDate(date);\n item.setContentType(NewsDetailDBHelper.NewsItemType.TITLE.ordinal());\n item.setPostUrl(mUrl);\n item.setCommentId(postId);\n item.setAkismet(akismet);\n item.setAk_js(ak_js);\n items.add(item);\n }\n\n Matcher mText = pText.matcher(response);\n int imageEnd = 0;\n int textStart;\n\n if (mText.find()) {\n String text = mText.group().substring(ITEM_TEXT_PREF.length());\n text = text.substring(0, text.length() - ITEM_TEXT_POSTF.length());\n Matcher mImage = pImage2.matcher(text);\n while (mImage.find()) {\n int textEnd = mImage.start();\n textStart = imageEnd;\n imageEnd = mImage.end();\n String itemText = text.substring(textStart, textEnd);\n addTextItem(items, itemText);\n processImageItem(items, mImage.group(), pImageUrl, pWidth, pHeight);\n }\n\n Matcher mVideo = pVideo.matcher(text);\n while (mVideo.find()) {\n int textEnd = mVideo.start();\n textStart = imageEnd;\n imageEnd = mVideo.end();\n String itemText = \"\";\n if (textEnd >= textStart) {\n itemText = text.substring(textStart, textEnd);\n }\n addTextItem(items, itemText);\n processVideoItem(items, mVideo.group(), pImageUrl, pWidth, pHeight);\n }\n\n text = text.substring(imageEnd);\n addTextItem(items, text);\n }\n\n\n NewsDetailItem item = new NewsDetailItem();\n item.setContentType(NewsDetailDBHelper.NewsItemType.REPLY_HEADER.ordinal());\n item.setPostUrl(mUrl);\n items.add(item);\n\n Matcher mComment = pComment.matcher(response);\n while (mComment.find()) {\n item = new NewsDetailItem();\n item.setContentType(NewsDetailDBHelper.NewsItemType.REPLY.ordinal());\n item.setPostUrl(mUrl);\n items.add(item);\n item.setAkismet(akismet);\n String comment = mComment.group();\n\n // if (comment.contains(CAN_CHANGE_KARMA_PREFIX)) {\n item.setCanChangeKarma(1);\n // } else {\n // item.setCanChangeKarma(0);\n // }\n\n Matcher mAuthor = pAuthor.matcher(comment);\n if (mAuthor.find()) {\n String authorText = mAuthor.group();\n item.setAuthorImage(getAuthorImgage(authorText, pAuthorImage));\n item.setAuthor(getAuthorName(authorText, pAuthorName1, pAuthorName2));\n }\n Matcher mCommentText = pCommentText.matcher(comment);\n if (mCommentText.find()) {\n String s = mCommentText.group();\n mCommentText = pCommentTex2t.matcher(s);\n if (mCommentText.find()) {\n mCommentText = pCommentText3.matcher(mCommentText.group());\n if (mCommentText.find()) {\n String commentText = mCommentText.group().substring(COMMENT_PREFIX.length());\n commentText = commentText.substring(0, commentText.length() - COMMENT_POSTFIX.length());\n commentText = commentText.replace(\"<p>\", \"\");\n commentText = commentText.replace(\"</p>\", \"\");\n item.setText(commentText);\n }\n }\n }\n Matcher mCommentId = pCommentId.matcher(comment);\n if (mCommentId.find()) {\n String commentId = mCommentId.group().substring(COMMENTDATE_PREF.length());\n commentId = commentId.substring(0, commentId.length() - COMMENT_ID_POSTFIX.length());\n item.setCommentId(commentId);\n }\n Matcher mCommentDate = pCommentDate.matcher(comment);\n if (mCommentDate.find()) {\n String commentDate = mCommentDate.group().substring(COMMENTDATE_PREF.length());\n commentDate = commentDate.substring(0, commentDate.length() - COMMENTDATE_POSTF.length());\n item.setDate(commentDate);\n }\n item.setKarmaUp(getKarma(comment, pThumbsUp, pThumb2));\n item.setkarmaDown(getKarma(comment, pThumbsDown, pThumb2));\n }\n }",
"@Override\n\tpublic void process(Task task, Page page) {\n\t\t\n\t}",
"public final void process() {\n parseReport();\n checkThreshold();\n updateQualityXML();\n }",
"public synchronized final void process() throws FilterException {\n if (this.result == null)\n throw new FilterException(i18n.getString(\"outputNotSet\"));\n if (this.source == null)\n throw new FilterException(i18n.getString(\"inputNotSet\"));\n\n try {\n // Starts the input interpretation (transformation)\n this.transformer.transform(this.source, this.result);\n } catch (TransformerException e) {\n throw new FilterException(e);\n } finally {\n this.source = null;\n this.result = null;\n }\n }",
"private void handleTextHtml(MimePart container, String htmlPartValue) throws MessagingException {\n // container could be MimeBodyPart or MimeMessage\n\n boolean doTransform = false; //?? revisit later\n if (doTransform) {\n htmlPartValue = EmailUtil.transformToTextHtml(\n htmlPartValue,\n this.mDefaultCharset);\n }\n\n if (this.mEmbedImagesInHtml) {\n this.handleMultipartRelated(container, htmlPartValue);\n } else {\n container.setText(htmlPartValue, this.mDefaultCharset, \"html\");\n }\n return;\n }",
"@Override\n\tpublic void processing() {\n\n\t}",
"public String process(Item word) throws ProcessException {\n\t\t\treturn wordBreak(word);\n\t\t}",
"public void unmarshall(Element text)\n throws UnmarshallException\n {\n if( ! isInstanceOf(text, localName, Namespaces.NS_ATOM))\n {\n throw new UnmarshallException( \"Not a \" + getQualifiedName() + \" element\" );\n }\n try\n\t {\n // get the attributes\n int attributeCount = text.getAttributeCount();\n Attribute attribute = null; \n for( int i = 0; i < attributeCount; i++ )\n {\n attribute = text.getAttribute(i);\n if( \"type\".equals(attribute.getQualifiedName()))\n {\n String value = attribute.getValue();\n if( ContentType.TEXT.toString().equals(value) )\n {\n type = ContentType.TEXT;\n }\n else if( ContentType.HTML.toString().equals(value) )\n {\n type = ContentType.HTML;\n }\n else if( ContentType.XHTML.toString().equals(value) )\n {\n type = ContentType.XHTML;\n }\n else\n {\n InfoLogger.getLogger().writeError(\"Unable to parse extract type in \" + getQualifiedName() );\n // FIXME - check error handling here\n }\n }\n }\n \n\t\t // retrieve all of the sub-elements\n\t\t int length = text.getChildCount();\n if( length > 0 )\n {\n content = unmarshallString(text);\n }\n // FIXME - the above only handles plain text content. \n\t }\n\t catch( Exception ex )\n\t {\n\t\t InfoLogger.getLogger().writeError(\"Unable to parse an element in \" + getQualifiedName() + \": \" + ex.getMessage());\n\t throw new UnmarshallException(\"Unable to parse an element in \" + getQualifiedName(), ex);\n\t }\n }",
"@Override\n public void run() {\n List<File> mFolderList = getContents(\"'\" + f.getId() + \"' in parents and \" + NOT_TRASHED + \" and \" + FOLDER + \" and \" + NOT_SPREADSHEET);\n // check if there is a folder\n if (!mFolderList.isEmpty()) {\n prune(targetFolder, mFolderList, false);\n processFolders(mFolderList, targetFolder);\n }\n \n // list of contents in f that are files\n List<File> mFileList = getContents(\"'\" + f.getId() + \"' in parents and \" + NOT_TRASHED + \" and \" + NOT_FOLDER + \" and \" + SUPPORTED_FILES);\n \n prune(targetFolder, mFileList, true);\n processFiles(mFileList, targetFolder);\n }",
"@Override\n public void process(JCas jCas) throws AnalysisEngineProcessException {\n JCas viewJCas = jCas;\n if (!view.equals(VIEW_SYSTEM)) {\n try {\n viewJCas = jCas.getView(view);\n } catch (CASException e) {// just rethrow\n throw new AnalysisEngineProcessException(e);\n }\n }\n\n Collection<de.julielab.jules.types.Sentence> sentences = select(\n viewJCas, de.julielab.jules.types.Sentence.class);\n\n for (de.julielab.jules.types.Sentence julesSentence : sentences) {\n int sentence_start = julesSentence.getBegin();\n\n if (julesSentence.getCoveredText().length() > 0) {\n\n try {\n Sentence sentence = new Sentence(\n julesSentence.getCoveredText());\n bannerTokenizer.tokenize(sentence);\n crfTagger.tag(sentence);// error\n if (postProcessor != null)\n postProcessor.postProcess(sentence);\n\n for (Mention mention : sentence.getMentions()) {\n\n int startChar = mention.getStartChar() + sentence_start;\n int endChar = mention.getEndChar() + sentence_start;\n // LOG.debug(\"found NE:\" + mention.getText() + \" \" +\n // startChar\n // + \":\" + endChar);\n Protein prot = new Protein(viewJCas, startChar, endChar);\n prot.setName(mention.getText());\n prot.setTextualRepresentation(\"⊂PROT⊃\");\n prot.addToIndexes();\n }\n\n } catch (Throwable t) {\n // not sure why, but this happens sometimes after some time\n int docId = getHeaderIntDocId(viewJCas);\n LOG.warn(\"Banner exception at docId {}, skipping. {}\",\n docId, StringUtils.print(t));\n try {\n GarbageCollectorAnnotator.runGC();\n loadTagger(); // reload\n } catch (Exception e) {\n throw new AnalysisEngineProcessException(e);\n }\n }\n }\n }\n }",
"private void readItems() {\n }",
"public void process(Page page) {\n \n \tpage.putField(\"title\", page.getHtml().xpath(\"//h1[@id='title']/span[@id='productTitle']/text()\").toString());\n if (page.getResultItems().get(\"title\")==null){\n //skip this page\n page.setSkip(true);\n }\n \n page.putField(\"style\", page.getHtml().xpath(\"//div[@id='variation_style_name']/div[@class='a-row']/span[@class='selection']/text()\"));\n page.putField(\"size\", page.getHtml().xpath(\"//div[@id='variation_size_name']/div[@class='a-row']/span[@class='selection']/text()\"));\n page.putField(\"color\", page.getHtml().xpath(\"//div[@id='variation_color_name']/div[@class='a-row']/span[@class='selection']/text()\"));\n \n page.putField(\"price\", page.getHtml().xpath(\"//span[@id='priceblock_ourprice']/text()\"));\n \n resultItems = page.getResultItems();\n System.out.println(page.getResultItems().toString());\n }",
"void process(Document document, Repository repository) throws Exception;",
"public void processDocument() {\n\n\t\t// compact concepts\n\t\tprocessConcepts(concepts);\n\t}",
"@Test\n\tpublic void testStoreProcessText3() {\n\t\tint sourceID = dm.storeProcessedText(pt6);\n\t\tassertTrue(sourceID > 0);\n\t\t\n\t\tds.startSession();\n\t\tSource source = ds.getSource(pt6.getMetadata().getUrl());\n\t\tassertTrue(pt6.getMetadata().getName().equals(source.getName()));\n\t\t\n\t\tList<Entity> entities = (List<Entity>) ds.getEntities(sourceID);\n\t\tassertTrue(pt6.getEntities().size() == entities.size());\n\t\t\n\t\tfor(int i = 0; i < pt6.getEntities().size(); i++){\n\t\t\tEntity originalEntity = pt6.getEntities().get(i);\n\t\t\tEntity retrievedEntity = entities.get(i);\n\t\t\tassertTrue(originalEntity.getContent().equals(retrievedEntity.getContent()));\n\t\t}\n\t\tds.closeSession();\n\t\t\n\t\t\n\t}",
"public static List<NLText> processTexts(List<String> texts) {\n// IProtocolClient api = ProtocolFactory.getHttpClient(Locale.ENGLISH, \"ui.disi.unitn.it\", 8092);\n LOG.warn(\"TODO - USING HARDCODED ENGLISH when creating sweb client in processTexts\");\n IProtocolClient api = ProtocolFactory.getHttpClient(Locale.ENGLISH);\n\t\tPipelineClient pipelineClient = new PipelineClient(api);\n NLPInput input = new NLPInput();\n input.setText(texts);\n //input.setNlpParameters(params);\n\n// NLText[] result = pipelineClient.run(\"KeywordTextPipeline\", input, 1l);\n NLText[] result = pipelineClient.run(\"ODHPipeline\", input, 1l);\n \n\t\treturn Arrays.asList(result);\n\t}",
"void process(JsonNode document);",
"@Override\n\tpublic void process() throws Exception {\n\n\t}",
"@Override\r\n\tpublic List<CmnInterfaceData> process(I000091OutputBean item) throws Exception {\r\n\r\n\t\tLOG.info(DOLLAR + INSIDE_METHOD + DOLLAR);\r\n\r\n\t\t/**Variable PatternOutputBean list */\r\n\t\tfinalList = new ArrayList<I000091PatternOutputBean>();\r\n\t\t\r\n\t\t/**Variable Common Interface data list */\r\n\t\ttotalList = new ArrayList<CmnInterfaceData>();\r\n\t\t\r\n\t\t/**P0002.3 ResultSet of Buyer Group Code */\r\n\t\tList<Object[]> result = commonUtil.exctByrGrpCd(item.getOcfRgnCd(), item.getOcfByrGrpCd());\r\n\t\t\r\n\t\tif(result != null && !(result.isEmpty())){\r\n\t\t\tList<I000091Bean> byrGrpList = commonUtil.extrctByrGrp(result);\r\n\t\t\t\r\n\t\t\tif(result.size() == 1){\r\n\t\t\t\tgetRgnlWklyList(item, byrGrpList.get(0));\r\n\t\t\t}else{\r\n\t\t\t\tgetByrGrpList(item, byrGrpList);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(finalList != null && !(finalList.isEmpty())){\r\n\t\t\tfor(I000091PatternOutputBean patternOutput : finalList){\r\n\t\t\t\tgetCmnInterfaceData(patternOutput);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\tLOG.info(DOLLAR + OUTSIDE_METHOD + DOLLAR);\r\n\r\n\t\treturn totalList;\r\n\t}",
"public static void convertTextParts(TextContainer tc) {\r\n \t\tfor (TextPart textPart : tc) {\r\n \t\t\tconvertTextPart(textPart);\r\n \t\t}\r\n \t}",
"@Override\n public void onSuccess(Text visionText) {\n\n Log.d(TAG, \"onSuccess: \");\n extractText(visionText);\n }",
"@ProcessElement public void process(ProcessContext c) {\n MyProduct elem = c.element();\n c.output(KV.of(elem.getId(), elem));\n }",
"public void process() {\n\n }",
"private java.util.Vector getContentItems()\r\n\t{\r\n\t\treturn contentItems;\r\n\t}",
"private void processContents(char[] input,\n int contentOffset,\n int contentSize,\n int contentLineNr)\n throws XMLParseException {\n int[] lineNr = new int[1];\n lineNr[0] = contentLineNr;\n\n if (!this.skipLeadingWhitespace) {\n String str = new String(input, contentOffset, contentSize);\n this.contents = this.decodeString(str, lineNr[0]);\n return;\n }\n\n StringBuffer result = new StringBuffer(contentSize);\n int end = contentSize + contentOffset;\n\n for (int i = contentOffset; i < end; i++) {\n char ch = input[i];\n\n // The end of the contents is always a < character, so there's\n // no danger for bounds violation\n while ((ch == '\\r') || (ch == '\\n')) {\n lineNr[0]++;\n result.append(ch);\n\n i++;\n ch = input[i];\n\n if (ch != '\\n') {\n result.append(ch);\n }\n\n do {\n i++;\n ch = input[i];\n } while ((ch == ' ') || (ch == '\\t'));\n }\n\n if (i < end) {\n result.append(ch);\n }\n }\n\n this.contents = this.decodeString(result.toString(), lineNr[0]);\n }",
"public void processText(Text content){\n Matcher m = numberPattern.matcher(content.getData());\n\n //Find all of the matches, and for each one create a new annotation\n while(m.find()){\n content.getAnnotations().create()\n .withBounds(new SpanBounds(m.start(), m.end())) //Set the bounds\n .withType(AnnotationTypes.ANNOTATION_TYPE_NUMBER) //Set the type\n .withProperty(PropertyKeys.PROPERTY_KEY_VALUE, Integer.parseInt(m.group())) //Set a property on the annotation, using the appropriate convention\n .save();\n }\n }",
"@Override\n\tpublic void process(Page page){\n\n\t CollectTemplate collectTemplate = templateService.getCollectTemplateById(templateId);\n\t String currentUrl=page.getUrl().toString();\n\t String nextUrlXpath=collectTemplate.getNextUrlXpath();\n \tString contentUrlXpath=collectTemplate.getContentUrlXpath();\n \tString listUrlRegex=collectTemplate.getListUrlRegex();\n \tString contentUrlRegex=collectTemplate.getContentUrlRegex();\n \tList<CollectTemplateField> fields=collectTemplate.getFields();\n \ttry {\n\t \t\t\n\t \tHtml currentHtml= page.getHtml();\n\n\t\t\t//判断是否是列表页\n\t if (currentUrl.matches(listUrlRegex)) {\n\n\t\t\t\t//处理列表页\n\t\t\t\tString nextPageUrl=\"\";\n\t\t\t\ttry{\n\t\t\t\t\tnextPageUrl=currentHtml.xpath(nextUrlXpath).toString();\n\t\t\t\t\tif (nextPageUrl==null||StringUtils.isEmpty(nextPageUrl)){\n\t\t\t\t\t\tthrow new Exception();\n\t\t\t\t\t}\n\t\t\t\t}catch (Exception e){\n\t\t\t\t\tXpath2Selector xpath2Selector = new Xpath2Selector(nextUrlXpath);\n\t\t\t\t\tnextPageUrl = xpath2Selector.select(page.getRawText());\n\n\t\t\t\t\tif (nextPageUrl!=null&&nextPageUrl.startsWith(\"/\")){\n\t\t\t\t\t\tnextPageUrl = \"http://\"+site.getDomain()+nextPageUrl;\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\n\t \tif (StringUtils.isNotEmpty(nextPageUrl)) {\n\n\t \t\tRequest request=new Request();\n\t \t\trequest.setUrl(nextPageUrl);\n\t \t\trequest.setPriority(-1);\n\t \t\t\n\t \t\tpage.addTargetRequest(request);\n\n\t \t\tlogService.info(projectId,\"get the next page link \"+nextPageUrl+\" and add it to the queue\");\n\n\t\t\t\t}else{\n\t\t\t\t\tlogService.warn(projectId,\"fail to get the next page link\");\n\n\t\t\t\t}\n\t \tList<String> detailPagesUrl;\n\t \ttry{\n\t\t\t\t\tdetailPagesUrl = currentHtml.xpath(contentUrlXpath).all();\n\n\t\t\t\t}catch (Exception e){\n\n\t\t\t\t\tXpath2Selector xpath2Selector2 = new Xpath2Selector(contentUrlXpath);\n\t\t\t\t\tdetailPagesUrl = xpath2Selector2.selectList(currentHtml.getDocument().text());\n\t\t\t\t}\n\n\n\n\t \tif (detailPagesUrl!=null&&detailPagesUrl.size()!=0) {\n\t\t\t\t\t//添加详情页\n\t\t\t\t\tpage.addTargetRequests(detailPagesUrl, 1);\n\n\t\t\t\t\tlogService.info(projectId,\"get \"+detailPagesUrl.size()+\" detail pages\");\n\t\t\t\t}else{\n\t\t\t\t\tlogService.warn(projectId,\"fail to get detail page\");\n\n\t\t\t\t}\n\t\t\t}else if (StringUtils.isEmpty(contentUrlRegex)||currentUrl.matches(contentUrlRegex)) {\n\t \t//处理详情页\n\t\t\t\tcontentPageProcessService.setProjectId(projectId);\n\t\t\t\tcontentPageProcessService.progressContentPage(page,fields);\n\t\t\t}\n\t \t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\t \n\t }",
"@Override\n\tpublic void processData() {\n\t\t\n\t}",
"public void run() {\n LOG.info(\"Starting Contentful crawling\");\n //Partition of ContentTypes: TRUE: vocabularies and FALSE: non-vocabularies/web content\n Map<Boolean, List<CMAContentType>> contentTypes = getContentTypes();\n List<CMAContentType> vocContentTypes = contentTypes.get(Boolean.TRUE);\n List<CMAContentType> webContentTypes = contentTypes.get(Boolean.FALSE);\n\n //Extract vocabularies meta data\n VocabularyTerms vocabularyTerms = getVocabularyTerms(vocContentTypes);\n\n //Mapping generator can be re-used for all content types\n MappingGenerator mappingGenerator = new MappingGenerator(vocContentTypes);\n\n //Gets the ContentType.resourceId for news and articles, which vary by space\n newsContentTypeId = getContentTypeId(webContentTypes, configuration.getNewsContentType());\n articleContentTypeId = getContentTypeId(webContentTypes, configuration.getArticleContentType());\n projectContentTypeId = getContentTypeId(webContentTypes, configuration.getProjectContentType());\n\n\n //Crawl all Content Types, except for vocabularies\n crawlContentTypes(webContentTypes, mappingGenerator, vocabularyTerms);\n LOG.info(\"Contentful crawling has finished\");\n }",
"public void process() {\n int command;\n menu();\n while ((command = getCommand()) != EXIT) {\n switch (command) {\n case ADD_CLIENT: addClient();\n break;\n case ADD_PRODUCT: addProduct();\n break;\n case ADD_SUPPLIER: addSupplier();\n break;\n case ASSIGN_PRODUCT: linkProduct();\n break;\n case UNASSIGN_PRODUCT: unlinkProduct();\n break;\n case ACCEPT_SHIPMENT: acceptShipment();\n break;\n case ACCEPT_ORDER: acceptOrder();\n break;\n case PROCESS_ORDER: processOrder();\n break;\n case CREATE_INVOICE: createInvoice();\n break;\n case PAYMENT: payment();\n break;\n case SHOW_CLIENTS: showClients();\n break;\n case SHOW_PRODUCTS: showProducts();\n break;\n case SHOW_SUPPLIERS: showSuppliers();\n break;\n case SHOW_ORDERS: showOrders();\n break;\n case GET_TRANS: getTransactions();\n break;\n case GET_INVOICE: getInvoices();\n break;\n case SAVE: save();\n break;\n case MENU: menu();\n break;\n case TEST: test();\n break;\n }\n }\n }",
"protected void parseProcessDefinitions() {\n\n List<XmlElement> processes = rootElement.getElements(\"process\");\n\n if (processes.size() == 0) {\n String errorMessage = \"No process have been defined in the BPMN serialized XMl file.\";\n throw new JodaEngineRuntimeException(errorMessage);\n }\n if (processes.size() > 1) {\n String errorMessage = \"Joda Engine cannot read more than one process in a BPMN serialized XMl file.\";\n throw new JodaEngineRuntimeException(errorMessage);\n }\n\n parseProcess(processes.get(0));\n }",
"public abstract Content processCompleteRequest(ContentCompleteRequest contentCompleteRequest);",
"private void processBulk()\n {\n File inDir = new File(m_inDir);\n String [] fileList = inDir.list();\n \n for (int j=0; j<fileList.length; j++)\n {\n String file = fileList[j];\n if (file.endsWith(\".xml\"))\n {\n m_inFile = m_inDir + \"/\" + file;\n m_localeStr = Utilities.extractLocaleFromFilename(file);\n processSingle();\n }\n }\n }",
"public String process(Item word) throws ProcessException {\n\t\t\treturn wordPunc(word);\n\t\t}",
"private static void processText(String line, BufferedWriter wrtr)\n\t\t\tthrows JSONException, IOException {\n\t\tJSONObject topicModel = TopicModelTemplateUtil\n\t\t\t\t.getJSONFromTemplate(line);\n\t\t// populate the WORD vector for the current topic model\n\t\tTopicModelTemplateUtil.geTopicModelFromTemplate(topicModel).forEach(\n\t\t\t\ttpm -> {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tLuceneNLPUtil.getRemovedStopAndStem(tpm.getWord(),\n\t\t\t\t\t\t\t\tLuceneNLPUtil.getDefaultEnglishStopWordList())\n\t\t\t\t\t\t\t\t.forEach(word -> {\n\t\t\t\t\t\t\t\t\tif (VOCABULARY_MAP.containsKey(word)) {\n\t\t\t\t\t\t\t\t\t\tVOCABULARY_MAP.replace(word, 1);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t// dump it to the file\n\t\tdumpTextLine(topicModel.getString(ConfigConstant.JSON_FIELD.BUSINESS_ID\n\t\t\t\t.getFieldName()), wrtr);\n\t}",
"public void processFile() throws IOException {\n\t\tsetContent(file.getBytes());\n\t\tsetMultipartFileContentType(file.getContentType());\n\t}",
"protected void parseSequenceFlow(XmlElement processElement) {\n \n for (XmlElement sequenceFlowElement : processElement.getElements(\"sequenceFlow\")) {\n \n String id = sequenceFlowElement.getAttribute(\"id\");\n String sourceRef = sequenceFlowElement.getAttribute(\"sourceRef\");\n String destinationRef = sequenceFlowElement.getAttribute(\"targetRef\");\n \n if (sourceRef == null && destinationRef == null) {\n String errorMessage = \"Each SequenceFlow XML tag must have a sourceRef\"\n + \" and a destinationRef corresponding to a XML activity.\"\n + \" One of these attributes are not set correctly. Please do that!!\";\n \n getProblemLogger().addError(errorMessage, sequenceFlowElement);\n return;\n }\n\n Node sourceNode = getNodeXmlIdTable().get(sourceRef);\n Node destinationNode = getNodeXmlIdTable().get(destinationRef);\n\n if (sourceNode == null || destinationNode == null) {\n if (sourceNode == null) {\n String errorMessage = \"The source '\" + sourceRef + \"' is not available in the XML.\";\n getProblemLogger().addError(errorMessage, sequenceFlowElement);\n }\n if (destinationNode == null) {\n String errorMessage = \"The destination '\" + destinationRef + \"' is not available in the XMl.\";\n getProblemLogger().addError(errorMessage, sequenceFlowElement);\n }\n return;\n }\n\n Condition controlFlowCondition = parseSequenceFlowCondition(sequenceFlowElement);\n \n ControlFlowBuilder controlFlowBuilder = processBuilder.getControlFlowBuilder().controlFlowGoesFromTo(\n sourceNode, destinationNode);\n \n controlFlowBuilder.setId(id);\n \n if (controlFlowCondition != null) {\n controlFlowBuilder.setCondition(controlFlowCondition);\n }\n \n ControlFlow controlFlow = controlFlowBuilder.buildControlFlow();\n \n for (BpmnXmlParseListener parseListener : parseListeners) {\n parseListener.parseSequenceFlow(sequenceFlowElement, controlFlow, processBuilder);\n }\n }\n }",
"private void parseRawText() {\n\t\t//1-new lines\n\t\t//2-pageObjects\n\t\t//3-sections\n\t\t//Clear any residual data.\n\t\tlinePositions.clear();\n\t\tsections.clear();\n\t\tpageObjects.clear();\n\t\tcategories.clear();\n\t\tinterwikis.clear();\n\t\t\n\t\t//Generate data.\n\t\tparsePageForNewLines();\n\t\tparsePageForPageObjects();\n\t\tparsePageForSections();\n\t}",
"@Override\n\t\tpublic void visitTag(Tag tag) {\n\t\t\tsuper.visitTag(tag);\n\t\t\tif ( engine.isPageContent(tag) ) {\n\t\t\t\tString tcontent = extractText(tag, 0);\n\t\t\t\tif ( tcontent == null ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( content == null || content.length() < tcontent.length() ) {\n\t\t\t\t\tcontent = tcontent; \n\t\t\t\t}\n\t\t\t} else if ( engine.isPageTitle(tag) ) {\n\t\t\t\tString ttitle = extractText(tag, 0);\n\t\t\t\tif ( ttitle == null ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( title == null || title.length() < ttitle.length() ) {\n\t\t\t\t\ttitle = ttitle;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public void execute(final String inputText, final String title, CTopicsMap topicsMap) {\n\t\tif(inputText == null) {\n\t\t\tthrow new IllegalArgumentException(\"Cannot extract semantics data from an undefined document\");\n\t\t}\n\t\t\n\n\n\t\tCText document = getTaxonomyList(inputText, title, false);\n\t\tif( document.getState() == CText.E_STATES.TAXONOMY) {\n\t\t\t\n\t\t\tCTopicsExtractor topicsExtractor = new CTopicsExtractor();\n\t\t\tif( topicsExtractor.extract(document, topicsMap, _textIndex) ) {\n\t\t\t\t\n\t\t\t\tdocument.setState(CText.E_STATES.TOPICS);\n\t\t\t\ttopicsMap.addSentences(document.getSentences());\n\t\t\t}\n\t\t}\n\t}",
"protected void processDataObject() throws Exception\r\n\t{\r\n\t\tif (maximalRecordsToPass > 0 && currentPassedRecord > maximalRecordsToPass)\r\n\t\t{\r\n\t\t\t// simulate conversion end\r\n\t\t\tendDocument();\r\n\t\t\tthrow new RuntimeException(\"Converter ended after \"\t+ maximalRecordsToPass\t+ \" records (this is debug mode)\");\r\n\t\t}\r\n\t\tDataObject dataObject = getDataObject();\r\n\t\tObjectRule rule = dataObject.getDataObjectRule();\r\n\n\t\tString subject = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tValue checkedSubjectValue = rule.checkConditionsAndGetSubject(dataObject);\n\t\t\tif (checkedSubjectValue != null) {\n\t\t\t\tsubject = checkedSubjectValue.getValue();\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new Exception(\"Problem with preprocessor on object rule\\n\"\t+ getDataObject().getDataObjectRule().toString(), e);\r\n\t\t}\r\n\r\n\t\tif (subject == null)\r\n\t\t{\r\n\t\t\t// this object should be ignored, remove unprocessed children from the\r\n\t\t\t// queue\r\n\t\t\tfor (DataObject childDataObject : dataObject.findAllChildren())\r\n\t\t\t{\r\n\t\t\t\tif (childDataObject == dataObject)\r\n\t\t\t\t\tthrow new Exception(\"Internal error: when removing child object fo the parent that should not be converted - a child is the same as the father\");\r\n\t\t\t\tpartsCompleted.remove(childDataObject);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// process this object\r\n\t\t\ttry\r\n\t\t\t{\n\t\t\t\trule.processDataObject(subject, this);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\n\t\t\t\tthrow new Exception(\n\t\t\t\t\t\t\"Exception with running property rules on object rule\\n\"\r\n\t\t\t\t\t\t+ getDataObject().getDataObjectRule().toString(), e);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test\n\tpublic void testStoreProcessText2() {\n\t\tint sourceID = dm.storeProcessedText(pt1);\n\t\tassertTrue(sourceID > 0);\n\t\t\n\t\tds.startSession();\n\t\tSource source = ds.getSource(pt1.getMetadata().getUrl());\n\t\tList<Paragraph> paragraphs = (List<Paragraph>) ds.getParagraphs(source.getSourceID());\n\t\tassertTrue(pt1.getMetadata().getName().equals(source.getName()));\n\t\tassertTrue(pt1.getParagraphs().size() == paragraphs.size());\n\t\t\n\t\tfor(int i = 0; i < pt1.getParagraphs().size(); i++){\n\t\t\tParagraph p = paragraphs.get(i);\n\t\t\tParagraph originalP = pt1.getParagraphs().get(i);\n\t\t\tassertTrue(originalP.getParentOrder() == p.getParentOrder());\n\t\t\t\n\t\t\tList<Sentence> sentences = (List<Sentence>) ds.getSentences(p.getId());\n\t\t\tList<Sentence> originalSentences = (List<Sentence>) originalP.getSentences();\n\t\t\tfor(int j = 0; j < originalSentences.size(); j++){\n\t\t\t\tassertTrue(originalSentences.get(j).getContent().substring(DataStore.SENTENCE_PREFIX.length()).equals(sentences.get(j).getContent()));\n\t\t\t\tassertTrue(originalSentences.get(j).getParentOrder() == sentences.get(j).getParentOrder());\n\t\t\t}\n\t\t}\n\t\tds.closeSession();\n\t}",
"private void processCloudTextRecognitionResult(FirebaseVisionCloudText text) {\n // Task completed successfully\n if (text == null) {\n Toast.makeText(getApplicationContext(), \"onCloud: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n List<FirebaseVisionCloudText.Page> pages = text.getPages();\n for (int i = 0; i < pages.size(); i++) {\n FirebaseVisionCloudText.Page page = pages.get(i);\n List<FirebaseVisionCloudText.Block> blocks = page.getBlocks();\n for (int j = 0; j < blocks.size(); j++) {\n List<FirebaseVisionCloudText.Paragraph> paragraphs = blocks.get(j).getParagraphs();\n for (int k = 0; k < paragraphs.size(); k++) {\n FirebaseVisionCloudText.Paragraph paragraph = paragraphs.get(k);\n List<FirebaseVisionCloudText.Word> words = paragraph.getWords();\n for (int l = 0; l < words.size(); l++) {\n GraphicOverlay.Graphic cloudTextGraphic = new CloudTextGraphic(mGraphicOverlay, words.get(l));\n mGraphicOverlay.add(cloudTextGraphic);\n }\n }\n }\n }\n }",
"@Override\n public List<MetadataWrapper> extractContent(InputStream stream, String filename, String mimeType, List<String> tags, String from, String to, boolean recursive) {\n\n Logger.getLogger(\"DefaultFileConverter\").log(Level.INFO, filename + \": \" + mimeType + \" :recursive = \" + recursive);\n try (InputStream fileStream = stream) {\n\n List<MetadataWrapper> contents =new ArrayList<>();\n\n\n //parse Document\n AutoDetectParser parser = new AutoDetectParser();\n Metadata metadata = new Metadata();\n BodyContentHandler handler = new BodyContentHandler();\n TikaInputStream tikaInputStream = TikaInputStream.get(fileStream);\n parser.parse(tikaInputStream, handler, metadata);\n\n contents.add(new FileMetadataWrapper(filename, mimeType, handler.toString(), tags, from, to));\n\n if(recursive) {\n //parse embedded contents\n List<MetadataWrapper> extracted = extractEmbeddedContent(tikaInputStream, filename, from, to);\n contents.addAll(extracted);\n }\n\n Logger.getLogger(\"DefaultFileConverter\").log(Level.INFO, filename + \": \" + \"contents: \" + contents);\n return contents;\n\n } catch (IOException | SAXException | TikaException e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"private void parseEntities() {\n // See: https://github.com/twitter/twitter-text/tree/master/java\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractCashtagsWithIndices(getText()));\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractHashtagsWithIndices(getText()));\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractMentionedScreennamesWithIndices(getText()));\n }",
"public String process(Item item) throws ProcessException {\n\t\t\tif (isAccented(item)) {\n\t\t\t\treturn \"1\";\n\t\t\t} else {\n\t\t\t\treturn \"0\";\n\t\t\t}\n\t\t}",
"public void process(FixMessage message) throws Exception\n {\n String tag = message.get(MsgType);\n UserTransaction txn = Context.getUserTransaction();\n txn.begin();\n switch(tag)\n {\n case NEWORDERSINGLE : {\n\n OrderProcessor orderProcessor = new OrderProcessor(message, this);\n orderProcessor.process();\n break;\n }\n }\n\n txn.commit();\n System.out.println(orderCache);\n\n }",
"@Override public List<Node> visitText(@NotNull XQueryParser.TextContext ctx) {\n\t\tfor(int i = 0; i < r.size(); ){\n\t\t\tif(r.get(i).getNodeType() != Node.TEXT_NODE ){\n\t\t\t\tr.remove(i);\n\t\t\t} else i++;\n\t\t}\n\t\treturn visitChildren(ctx);\n\t}",
"private static void processPart (WorkPart part) \n\t\tthrows Exception\n\t{\n\t\tTextWrapper textWrapper = part.getPrimaryText();\n\t\tif (textWrapper == null) return;\n\t\tText primary = textWrapper.getText();\n\t\tint n = primary.getNumLines();\n\t\tTextLine[] primaryLines = primary.getLines();\n\t\tTextLine[] translationLines = new TextLine[n];\n\t\tCollection lines = pm.getLinesInWorkPart(part);\n\t\tint numTranslatedLines = 0;\n\t\tfor (Iterator it = lines.iterator(); it.hasNext(); ) {\n\t\t\tLine line = (Line)it.next();\n\t\t\tTextRange location = line.getLocation();\n\t\t\tif (location == null) continue;\n\t\t\tTextLocation start = location.getStart();\n\t\t\tif (start == null) continue;\n\t\t\tTextLocation end = location.getEnd();\n\t\t\tif (end == null) continue;\n\t\t\tint endIndex = end.getIndex();\n\t\t\tString lineTag = line.getTag();\n\t\t\tif (lineTag == null) continue;\n\t\t\tElement el = (Element)lineTagToElMap.get(lineTag);\n\t\t\tif (el == null) continue;\n\t\t\tlineTagsFound.add(lineTag);\n\t\t\tTextLine translationLine = new BuildParagraph(el, \n\t\t\t\tTextParams.ROMAN,\n\t\t\t\tTextParams.TRANSLATED_LINE_FONT_SIZE);\n\t\t\tTextLine primaryLine = primaryLines[endIndex];\n\t\t\tint primaryIndentation = primaryLine.getIndentation();\n\t\t\ttranslationLine.setIndentation(primaryIndentation +\n\t\t\t\tTextParams.TRANSLATION_INDENTATION);\n\t\t\ttranslationLines[endIndex] = translationLine;\n\t\t\tnumTranslatedLines++;\n\t\t}\n\t\tif (numTranslatedLines == 0) return;\n\t\tText translation = new Text();\n\t\ttranslation.setCollapseBlankLines(false);\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tTextLine translationLine = translationLines[i];\n\t\t\tif (translationLine == null) {\n\t\t\t\ttranslation.appendBlankLine();\n\t\t\t} else {\n\t\t\t\ttranslation.appendLine(translationLine);\n\t\t\t}\n\t\t}\n\t\ttranslation.finalize();\n\t\tpm.begin();\n\t\tTextWrapper translationWrapper = new TextWrapper(translation);\n\t\tpm.save(translationWrapper);\n\t\tpart.addTranslation(translationTag, translationWrapper);\n\t\tpm.commit();\n\t}",
"private void processArticle(String rawArticleText, Article article, Context context) throws IOException, InterruptedException {\n if (!rawArticleText.trim().isEmpty()) {\n String[] splitSentences = rawArticleText.split(\"\\\\.\\\\s\");\n PriorityQueue<Sentence> sortedSentences = new PriorityQueue<>();\n\n for (int sentenceIndex = 0; sentenceIndex < splitSentences.length; sentenceIndex++) {\n String rawSentence = splitSentences[sentenceIndex];\n Double sentenceTfIdf = getSentenceTfIdf(rawSentence, article);\n sortedSentences.add(new Sentence(sentenceTfIdf, rawSentence, sentenceIndex));\n }\n\n String summary = topOrderedSentences(sortedSentences);\n context.write(new IntWritable(article.id), new Text(summary));\n }\n }",
"@Test\n\tpublic void testStoreProcessText4() {\n\t\tint sourceID = dm.storeProcessedText(pt2);\n\t\tassertTrue(sourceID > 0);\n\t\t\n\t\tds.startSession();\n\t\tSource source = ds.getSource(pt2.getMetadata().getUrl());\n\t\tList<Paragraph> paragraphs = (List<Paragraph>) ds.getParagraphs(source.getSourceID());\n\t\tassertTrue(pt2.getMetadata().getName().equals(source.getName()));\n\t\tassertTrue(pt2.getParagraphs().size() == paragraphs.size());\n\t\t\n\t\tfor(int i = 0; i < pt2.getParagraphs().size(); i++){\n\t\t\tParagraph p = paragraphs.get(i);\n\t\t\tParagraph originalP = pt2.getParagraphs().get(i);\n\t\t\tassertTrue(originalP.getParentOrder() == p.getParentOrder());\n\t\t\t\n\t\t\tList<Sentence> sentences = (List<Sentence>) ds.getSentences(p.getId());\n\t\t\tassertTrue(sentences.size() == 0);\n\t\t}\n\t\tds.closeSession();\t\t\n\t}",
"public void process();",
"@Override\n public void textFileLoaded(File file, int wc, String contents)\n {\n cur_file = file;\n this.action_panel.setWordCount(wc);\n \n new Thread(new MarkdownProcessor(file, this)).start();\n }",
"private void processPendingText() throws SAXException {\n if(state==AFTER_START_ELEMENT) {\n for( int i=bufLen-1; i>=0; i-- )\n if( !WhiteSpaceProcessor.isWhiteSpace(buf[i]) ) {\n super.characters(buf, 0, bufLen);\n return;\n }\n }\n }",
"protected void extract() {\n\t\tfor (ITSState nodeState : doc.iterNodes()) {\n\t\t\tNode node = nodeState.node;\n\t\t\tRuleResolver resolver = resolvers.get(node.getNodeName()); \n\t\t\tif (resolver != null) {\n\t\t\t\tGlobalRule rule = resolver.extractRule(attrReader, parameters, nodeState.node);\n\t\t\t\tapplyRule(resolver, rule);\n\t\t\t}\n\t\t\t\n\t\t\tif (node.getNodeName().equals(\"its:param\")) {\n\t\t\t\tString name = node.getAttributes().getNamedItem(\"name\").getNodeValue();\n\t\t\t\tString value = node.getTextContent();\n\t\t\t\tparameters.add(name, value);\n\t\t\t} else if (attrReader.dialect.isRules(node)) { \n\t\t\t\t// we have external link (xlink:href or link href)\n\t\t\t\tString external = attrReader.dialect.getExternalRules(node);\n\t\t\t\tif (external != null) {\n\t\t\t\t\textractExternalRules(external);\n\t\t\t\t}\n\t\t\t} else if (node.getNodeName().equals(\"script\")) {\n\t\t\t\t// we have embedded\n\t\t\t\tif (node.hasAttributes()) {\n\t\t\t\t\tif (node.getAttributes().getNamedItem(\"type\").getNodeValue().equals(\"application/its+xml\")) {\n\t\t\t\t\t\textractEmbeddedRules(node.getTextContent());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!nodeState.nodePath.contains(\"its:rules\")) {\n\t\t\t\t// unless we're in rules, look at local annotations\n\t\t\t\t// LOCAL\n\t\t\t\textractLocal(nodeState);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// process inheritance\n\t\tfor (ITSState nodeState : doc.iterNodes()) {\n\t\t\t// Elements: handle inheritance \n\t\t\tITSData parentData = getParentState(nodeState);\n\t\t\tif (parentData != null) {\n\t\t\t\t// inherit from parent\n\t\t\t\tITSData thisData = nodeItsData.get(nodeState.nodePath);\n\t\t\t\tif (thisData == null) {\n\t\t\t\t\tthisData = new ITSData();\n\t\t\t\t\tapplyRuleToNode(nodeState.nodePath, thisData);\n\t\t\t\t} \n\t\t\t\tthisData.inherit(parentData);\t\t\t\t\n\t\t\t}\t\n\t\t\t\t\t\t\n\t\t} \n\t\t\n\t\t\n\t}",
"public void ProcessFiles() {\n LOG.info(\"Processing SrcML files ...\");\n final Collection<File> allFiles = ctx.files.AllFiles();\n int processed = 0;\n final int numAllFiles = allFiles.size();\n final int logDiv = Math.max(1, Math.round(numAllFiles / 100f));\n\n for (File file : allFiles) {\n final String filePath = file.filePath;\n final FilePath fp = ctx.internFilePath(filePath);\n\n Document document = readSrcmlFile(filePath);\n DocWithFileAndCppDirectives extDoc = new DocWithFileAndCppDirectives(file, fp, document, ctx);\n\n internAllFunctionsInFile(file, document);\n processFeatureLocationsInFile(extDoc);\n\n if ((++processed) % logDiv == 0) {\n int percent = Math.round((100f * processed) / numAllFiles);\n LOG.info(\"Parsed SrcML file \" + processed + \"/\" + numAllFiles\n + \" (\" + percent + \"%) (\" + (numAllFiles - processed) + \" to go)\");\n }\n }\n\n LOG.info(\"Parsed all \" + processed + \" SrcML file(s).\");\n }",
"public static void extractAll(InputStream stream, TextExtractor textExtractor, Map container) {\n\t\t// mark the stream with a sufficiently large buffer so that, when POI chokes on a document, there is a\n\t\t// good chance we can reset to the beginning of the buffer and apply a StringExtractor\n\t\tint bufferSize = getBufferSize();\n\t\tif (!stream.markSupported()) {\n\t\t\tstream = new BufferedInputStream(stream, bufferSize);\n\t\t}\n\t\tstream.mark(bufferSize);\n\n\t\t// apply the POI-based extraction code\n\t\tString text = null;\n\n\t\ttry {\n\t\t\t// try to create a POI file system\n\t\t\tPOIFSFileSystem fileSystem = new POIFSFileSystem(stream);\n\n\t\t\t// try to extract the text, ignoring any exceptions as metadata extraction may still succeed\n\t\t\ttry {\n\t\t\t\tif (textExtractor != null) {\n\t\t\t\t\ttext = textExtractor.getText(fileSystem);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\t// ignore\n\t\t\t}\n\n\t\t\tPoiUtil.extractMetadata(fileSystem, container);\n\t\t}\n\t\tcatch (IOException e1) {\n\t\t\t// ignore\n\t\t}\n\n\t\t// if text extraction was not successfull, try a StringExtractor as a fallback\n\t\tif (text == null) {\n\t\t\tif (textExtractor != null) {\n\t\t\t\tLOGGER.log(Level.INFO,\n\t\t\t\t\t\"regular POI-based processing failed, falling back to heuristic string extraction\");\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tstream.reset();\n\t\t\t\tStringExtractor extractor = new StringExtractor();\n\t\t\t\ttext = extractor.extract(stream);\n\t\t\t}\n\t\t\tcatch (IOException e) {\n\t\t\t}\n\t\t}\n\n\t\t// store the full-text, if any\n\t\tif (text != null) {\n\t\t\t// some problem with paragraph start (char 8)\n\t\t\ttext = text.trim().replaceAll(\"[\\\\x01\\\\x08\\\\x0C]\", \" \");\n\t\t\tif (!text.equals(\"\")) {\n\t\t\t\tcontainer.put(DATA.fullText, text);\n\t\t\t}\n\t\t}\n\t}",
"protected abstract List<List<SearchResults>> processStream();",
"public void parse(){\n\n Integer childStart = this.findNewElement(0, this.document.length - 1);\n if(childStart == null){\n return;\n }\n\n this.root.removeData();\n this.copyTextToDocumentTree(this.root, 0, childStart - 1);\n\n DocumentSectionType childType = this.getType(childStart);\n\n do {\n Integer end = this.findNextSameLevelElement(childStart + 1, childType);\n //now we have boundaries of our new element, so let's grab it's index\n //we need appropriate matcher\n\n Matcher childMatcher = childType.getPattern().matcher(this.document[childStart]);\n childMatcher.find();\n DocumentTree child = new DocumentTree(childType, childMatcher.group(1), null);\n\n //now clear first line\n try{\n String group2 = childMatcher.group(2);\n this.document[childStart] = group2 != null ? group2 + \" \" : \"\";\n }catch(IndexOutOfBoundsException e){\n this.document[childStart] = \"\";\n }\n try {\n this.document[childStart] += childMatcher.group(3);\n }catch(IndexOutOfBoundsException e){\n this.document[childStart] += \"\";\n }\n //and copy it's text\n this.copyTextToDocumentTree(child, childStart, end - 1);\n root.addChild(child);\n //finally, parse it\n DocumentParser childParser = new DocumentParser(child, joinChapterWithChapterNames);\n childParser.parse();\n\n childStart = end;\n }while(childStart != this.document.length);\n\n if(this.root.getType() == DocumentSectionType.CHAPTER && this.joinChapterWithChapterNames){\n DocumentTree nameNode = (DocumentTree)this.root.getChildren().get(0);\n this.root.removeData();\n this.root.appendData(nameNode.getIndex());\n this.root.replaceChild(nameNode, nameNode.getChildren());\n }\n\n }",
"@Override\n public void storeParsedText() {\n parsedHtmlPages.parallelStream().forEach(parsedHtmlPage -> {\n FileUtility.writeToFile(parsedHtmlPage, FILE_DIRECTORY_NAME + FILE_SEPARATOR + parsedHtmlPage.getTitle());\n });\n }",
"public interface IChunkProcessor {\n\n\t/**\n\t * @param chunk\n\t * @param processingContext\n\t * @return list of DescriptionTreatmentElements resulting from the processing of chunk in processingContext\n\t */\n\tpublic List<? extends Element> process(Chunk chunk, ProcessingContext processingContext);\n\n\t/**\n\t * @return descriptive String of this IChunkProcessor\n\t */\n\tpublic String getDescription();\n\t\n}",
"@Override\n\tpublic void processItemInformation(ProcessItemInformationObjectEvent e, String message) {\n\t\t\n\t}",
"@Override\n\tpublic ArrayList<FileSystemItem> getContent() {\n\t\treturn this.content;\n\t}",
"protected void checkText(ParserResult result, String text) {\n\t\tif (text == null)\n\t\t\treturn;\n\t\tfor (Map<String, List<Object>> map : result.documents)\n\t\t\tif (checkText(map, text))\n\t\t\t\treturn;\n\t\tif (checkText(result.metas, text))\n\t\t\treturn;\n\t\tlogger.severe(\"Text \" + text + \" not found\");\n\t\tassert (false);\n\t}",
"public void process(final String filename) throws JDOMException, IOException {\n\n // Parsing our XML file being located below \"resources\"\n final Document docInput = builder.build(\n getClass().getClassLoader().getResource(filename)\n );\n\n // Accessing the document's root element <catalog>\n final Element docRoot = docInput.getRootElement();\n\n // Accessing the <item> children of parent element <catalog>\n docRoot.getChildren().stream().\n map(item -> \"Article: \" + item.getText() +\n \", order number: \" + item.getAttributeValue(\"orderNo\")).\n forEach(System.out::println);\n }"
] |
[
"0.5935998",
"0.5926645",
"0.56598365",
"0.56261593",
"0.5564698",
"0.5553848",
"0.5505178",
"0.5487276",
"0.5469301",
"0.53785145",
"0.52584314",
"0.5225426",
"0.5182371",
"0.5131254",
"0.5107831",
"0.51011616",
"0.5093527",
"0.50852287",
"0.50628334",
"0.5046779",
"0.50264865",
"0.50172013",
"0.50144875",
"0.4978881",
"0.49570256",
"0.49538767",
"0.4949291",
"0.49412072",
"0.49197707",
"0.4919632",
"0.4916015",
"0.49053937",
"0.490335",
"0.4895807",
"0.4885657",
"0.48582125",
"0.48572066",
"0.48445827",
"0.48348275",
"0.48317832",
"0.4819946",
"0.4819765",
"0.48148817",
"0.48066303",
"0.47559425",
"0.47549838",
"0.47519547",
"0.47436017",
"0.47428006",
"0.47382495",
"0.4737806",
"0.47312185",
"0.47299182",
"0.47096464",
"0.47020122",
"0.46969283",
"0.46776754",
"0.46622625",
"0.46605432",
"0.46561712",
"0.46525154",
"0.46456915",
"0.46386382",
"0.46352574",
"0.46327254",
"0.4627342",
"0.46212694",
"0.46187848",
"0.46185085",
"0.46166545",
"0.46154442",
"0.4614939",
"0.46123242",
"0.46100855",
"0.46062124",
"0.4589405",
"0.4579621",
"0.45781446",
"0.45697385",
"0.45612603",
"0.4558847",
"0.45518672",
"0.45491022",
"0.454086",
"0.4538337",
"0.45230392",
"0.45202214",
"0.4515493",
"0.45096868",
"0.45051008",
"0.45024526",
"0.45018",
"0.4497286",
"0.44966948",
"0.4489567",
"0.4483961",
"0.4482172",
"0.44816145",
"0.4477349",
"0.44748583"
] |
0.72641766
|
0
|
Create a Regex matcher for the current content
|
public void processText(Text content){
Matcher m = numberPattern.matcher(content.getData());
//Find all of the matches, and for each one create a new annotation
while(m.find()){
content.getAnnotations().create()
.withBounds(new SpanBounds(m.start(), m.end())) //Set the bounds
.withType(AnnotationTypes.ANNOTATION_TYPE_NUMBER) //Set the type
.withProperty(PropertyKeys.PROPERTY_KEY_VALUE, Integer.parseInt(m.group())) //Set a property on the annotation, using the appropriate convention
.save();
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private ReaderWorld() {\r\n pattern = Pattern.compile(regularExpression);\r\n matcher = pattern.matcher(getText());\r\n }",
"protected abstract Regex pattern();",
"java.lang.String getRegex();",
"java.lang.String getRegex();",
"abstract UrlPatternMatcher create( String pattern );",
"public String getRegex();",
"public RegularExpression() {\n }",
"public BodyMatchesRegexAnalyzer(BodyRegexProperties properties) {\n super(properties);\n this.pattern = Pattern.compile(properties.getPattern());\n }",
"public String getMatchRegex() {\n return matchRegex;\n }",
"private void compilePattern() {\r\n\r\n pattern_startOfPage = Pattern.compile(regex_startOfPage);\r\n pattern_headerAttribute = Pattern.compile(regex_headerAttribute);\r\n pattern_messageFirstLine = Pattern.compile(regex_messageFirstLine);\r\n pattern_messageContinuationLine = Pattern.compile(regex_messageContinuationLine);\r\n }",
"public interface RegExp {\n String NAME_REGEXP = \"^[А-Я][а-я]{2,30}$\";\n String AGE_REGEXP = \"^((1[012][0-9])|([1-9][0-9]))$\";\n String EMAIL_REGEXP = \"^[-z0-9_.]{1,30}@([A-z]+[A-z0-9]{1,15}.){1,2}([A-z]+[A-z0-9]{1,15})$\";\n String CELL_PHONE_REGEXP = \"([\\\\+]\\\\d{2}\\\\s?)?(([\\\\(\\\\s]\\\\d{3}[\\\\)\\\\s])|\" +\n \"(\\\\d{3}))[\\\\s-]?\\\\d{3}[\\\\s-]?\\\\d{2}[\\\\s-]?\\\\d{2}$\";\n String CELL_PHONE_OPTIONAL_REGEXP = \"^(([\\\\+]\\\\d{2}\\\\s?)?(([\\\\(\\\\s]\\\\d{3}[\\\\)\\\\s])|\" +\n \"(\\\\d{3}))[\\\\s-]?\\\\d{3}[\\\\s-]?\\\\d{2}[\\\\s-]?\\\\d{2})?\";\n String LOCAL_PHONE_REGEXP = \"^([\\\\+]\\\\d{2}\\\\s?)?(([\\\\(\\\\s]\\\\d{3}[\\\\)\\\\s])|(\\\\d{3}))?[\\\\s-]?\\\\d{3}[\\\\s-]?\\\\d{3}$\";\n String COMMENT_REGEXP = \"^([\\\\d\\\\s\\\\w\\\\.\\\\,\\\\!]){0,127}$\";\n String GROUP_REGEXP = \"^[А-я]{4,10}$\";\n String SKYPE_NICK_REGEXP = \"^[\\\\w\\\\d\\\\_]{3,20}$\";\n String INDEX_REGEXP = \"^[\\\\d]{8}$\";\n String CITY_STREET_REGEXP = \"^[А-Я][а-я]{3,20}$\";\n String BUILDING_REGEXP = \"^[\\\\d]{1,3}[\\\\w]?$\";\n String FLAT_REGEXP = \"^[\\\\d]{1,3}$\";\n}",
"protected Matcher getMatcher() {\n return matcher;\n }",
"static Extractor byRegex(Pattern pattern) {\n\t\t\treturn Splitter.regexGroupExtractor(pattern);\n\t\t}",
"public String getRegEx();",
"public Matcher matcher(String uri);",
"public Pattern buildPattern ()\n {\n int flags = 0;\n if ( this.canonicalEquivalence ) flags += Pattern.CANON_EQ;\n if ( this.caseInsensitive ) flags += Pattern.CASE_INSENSITIVE;\n if ( this.comments ) flags += Pattern.COMMENTS;\n if ( this.dotall ) flags += Pattern.DOTALL;\n if ( this.multiline ) flags += Pattern.MULTILINE;\n if ( this.unicodeCase ) flags += Pattern.UNICODE_CASE;\n if ( this.unixLines ) flags += Pattern.UNIX_LINES;\n return Pattern.compile(this.regex, flags);\n }",
"public RegexPatternBuilder (String regex)\n {\n this.regex = regex;\n }",
"private static boolean makeMatch(String strPattern, String lexeme) {\n Pattern pattern = Pattern.compile(strPattern);\n Matcher matcher = pattern.matcher(lexeme);\n return matcher.matches();\n }",
"private JBurgPatternMatcher()\n\t{\n\t}",
"public static void TestRegex()\n\t{\n\t String line = \" if( aaa&&(ypbreg))\";\n\t String pattern = \"(&&)\\\\s*\\\\(*\\\\s*!?ypbreg\\\\)*\";\n\t // Create a Pattern object\n\t Pattern r = Pattern.compile(pattern);\n\t System.out.println(line.contains(pattern));\n\t // Now create matcher object.\n\t Matcher m = r.matcher(line);\n\t if (m.find( )) {\n\t // System.out.println(\"Found value: \" + m.group(0) );\n\t int count = m.groupCount();\n\t System.out.println(\"group count is \"+count);\n\t for(int i=0;i<count;i++){\n\t System.out.println(m.group(i));\n\t }\n\t // System.out.println(line.replaceFirst(BregPattern.pEqualTrue1, \"!$1\"));\n\n\t } else {\n\t System.out.println(\"NO MATCH\");\n\t }\n\t}",
"@Override\n protected void compileRegex(String regex) {\n }",
"public GrandChildOfStringMatch() {}",
"public static Term createRegExp(Expression exp) {\r\n\t\tTerm term = Term.function(REGEX, exp);\r\n\t\treturn term;\r\n\t}",
"static Extractor byRegex(String format, Object... args) {\n\t\t\treturn byRegex(RegexUtil.compile(format, args));\n\t\t}",
"com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex();",
"Match createMatch();",
"public static void matchMaker()\n {\n \n }",
"@Override public boolean\r\n matches(String regex, CharSequence input) {\n return false;\r\n }",
"protected abstract Matcher<? super ExpressionTree> specializedMatcher();",
"public interface RegExp {\n String NUMBER_OF_COMPOSITION = \"^[1-2][0-9]|[1-9]$\";\n String BREAK_DATE_BY_DOT = \"[.]\";\n String IDENTIFY_BUMDLE = \"^([E|e][N|n])|[У|у][К|к][Р|р]$\";\n String DURATION = \"^[1-9]|[1-9][0-9]|[1-4][0-9][0-9]$\";\n}",
"com.google.protobuf.ByteString\n getRegexBytes();",
"com.google.protobuf.ByteString\n getRegexBytes();",
"public boolean matchesRegex(URI uri);",
"public JavaRE(String regex) throws Exception {\n if (ignoreCase) {\n pattern = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);\n } else {\n pattern = Pattern.compile(regex);\n }\n }",
"public String getRegEx() {\r\n return regex;\r\n }",
"public RegexPatternBuilder ()\n {\n this.regex = null;\n }",
"public static UriMatcher buildUriMatcher() {\n final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH);\n final String authority = TrafficContract.CONTENT_AUTHORITY;\n\n /*\n * For each type of URI you want to add, create a corresponding code. Preferably, these are\n * constant fields in your class so that you can use them throughout the class and you no\n * they aren't going to change.\n */\n\n /* This URI is content://com.example.android.roadnews */\n matcher.addURI(authority, TrafficContract.PATH_TRAFFIC, CODE_TRAFFIC);\n\n\n return matcher;\n }",
"private Annotation[] testRegEx(String regEx) {\n\t\tQueriableAnnotation data = this.parent.getActiveDocument();\n\t\treturn ((data == null) ? null : Gamta.extractAllMatches(data, regEx, 64));\n\t}",
"public String getTitleNameMatchRegexPattern() {\n\t\treturn titleNameMatchRegexPattern;\n\t}",
"public RegularExpressionValueMatcher() {\n\t\tthis(null);\n\t}",
"RegExConstraint createRegExConstraint();",
"@Override\n\tpublic void visit(RegExpMatchOperator arg0) {\n\t\t\n\t}",
"private\n\tRegExHelper()\n\t{\n\t\tsuper();\n\t}",
"public RegexFormatter(Pattern pattern) {\n this();\n setPattern(pattern);\n }",
"@Test\n\tvoid testFormattedRE() {\n\t\tRegularLanguage rl[] = new RegularLanguage[lengthToFormatRE]; \n\t\tint i = 0;\n\t\tfor (String re : toFormatRE) {\n\t\t\trl[i++] = RegularExpression.isValidRE(re);\n\t\t}\n\t\t// Verify if all objects were created\n\t\tfor (RegularLanguage re : rl) {\n\t\t\tif (re.equals(null)) {\n\t\t\t\tfail(); // object couldn't be created\n\t\t\t}\n\t\t}\n\n\t\t// a***** -> a*\n\t\tassertEquals(\"a*\", rl[0].getRE().getFormattedRegex());\n\t\t// aa????? -> a?\n\t\tassertEquals(\"a?\", rl[1].getRE().getFormattedRegex());\n\t\t// a+++++ -> a+\n\t\tassertEquals(\"a+\", rl[2].getRE().getFormattedRegex());\n\t\t// a?*?*?***???* -> a*\n\t\tassertEquals(\"a*\", rl[3].getRE().getFormattedRegex());\n\t\t// a?+?+?+++???+ -> a*\n\t\tassertEquals(\"a*\", rl[4].getRE().getFormattedRegex());\n\t\t// a*+*+*++++***+* -> a*\n\t\tassertEquals(\"a*\", rl[5].getRE().getFormattedRegex());\n\t\t// a?+*?+?***???+++***?+?*+* -> a*\n\t\tassertEquals(\"a*\", rl[6].getRE().getFormattedRegex());\n\t\t\t\n\t}",
"public RegExp (final int type)\n {\n this.type = type;\n }",
"Pattern getTagPattern();",
"public Matcher forType(String typeOf) {\n\t\tMatcher matcher = new Matcher(jCas, typeOf);\n\t\tthis.matchers.add(matcher);\n\t\treturn matcher;\n\t}",
"public Matcher getMatcher(String matchedString, String regex) {\n Pattern r = Pattern.compile(regex);\r\n\r\n // Now create matcher object.\r\n Matcher m = r.matcher(matchedString);\r\n\r\n return m;\r\n }",
"public void setRegex (String regex)\n {\n this.regex = regex;\n }",
"Match getResultMatch();",
"public interface Matcher {\n\n char WILDCARD = '*';\n\n void addFilter(String filter);\n\n boolean matches(String word);\n}",
"public String getAttributeMatchRegexPattern()\n\t{\n\t\treturn this.attributeMatchRegexPattern;\n\t}",
"private static boolean matchRegex(Pattern regExpression, String filename) {\n\t\tMatcher m = regExpression.matcher(filename);\n\t\tif (m.matches()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public int match(ReaderBuffer buffer) throws IOException {\n if (matcher == null) {\n matcher = regExp.matcher(buffer);\n } else {\n matcher.reset(buffer);\n }\n return matcher.matchFromBeginning() ? matcher.length() : 0;\n }",
"private Matcher locationMatches(String location) {\n return PATTERN.matcher(location);\n }",
"@Override\n public boolean isRegex() {\n return false;\n }",
"Match getPartialMatch();",
"public String buildTagRegex() {\n return buildTagRegex(\"(.+?)\", true);\n }",
"@Test\n public void hrefPatternTest() {\n Pattern aTeg = Pattern.compile(\"(?i)<a([^>]+)>(.+?)</a>\");\n Pattern href = Pattern.compile(\"\\\\s*(?i)href\\\\s*=\\\\s*(\\\\\\\"([^\\\"]+\\\\\\\")|'[^']+'|([^'\\\">\\\\s]+))\");\n String[] validLinkTegs = {\"<li><a href=\\\"/toolbar-creator\\\">Create a Custom Toolbar</a></li>\",\n \"<a href=\\\"http://stlpublicradio.org/programs/slota/archivedetail.php?date='2012-02-29'\\\" title=\\\"\\\" class=\\\"menu_icon menu-17197 \\\" >Грузовые перевозки</a></li>\",\n \"<li><a href='http://www.tipsntracks.com/date/2012/03' title='March 2012'>March 2012</a></li>\"};\n String[] invalidLinkTags = {\"<a href=\\\"\\\"style=\\\"\\\"><img width=\\\"148\\\" height=\\\"32\\\" src=\\\"/images/buttons/btn-www-survey.gif\\\" /></a>\"};\n String[] validLinks = new String[validLinkTegs.length];\n String[] invalidLinks = new String[invalidLinkTags.length];\n for (int i = 0; i < validLinkTegs.length; i++) {\n Matcher matcher = aTeg.matcher(validLinkTegs[i]);\n Assert.assertTrue(matcher.find());\n validLinks[i] = matcher.group(1);\n }\n for (int i = 0; i < invalidLinkTags.length; i++) {\n Matcher matcher = aTeg.matcher(invalidLinkTags[i]);\n Assert.assertTrue(matcher.find());\n invalidLinks[i] = matcher.group(1);\n }\n for (int i = 0; i < validLinkTegs.length; i++) {\n Matcher matcher = href.matcher(validLinks[i]);\n Assert.assertTrue(matcher.find());\n String s = matcher.group(1);\n System.out.println(s.substring(1, s.length() - 1));\n }\n for (int i = 0; i < invalidLinkTags.length; i++) {\n Matcher matcher = href.matcher(invalidLinks[i]);\n Assert.assertFalse(matcher.find());\n }\n }",
"@Test\r\n public void testGetRegexp() {\r\n final Regexp re = rs.getRegexp(reString);\r\n assertTrue(rs.hasRegexp(reString));\r\n assertSame(rs.getRegexp(reString), re);\r\n }",
"@Override\n public String getAnalyzerName() {\n return \"Body Regex: \" + pattern.pattern();\n }",
"private static UriMatcher buildUriMatcher(){\r\n UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH);\r\n matcher.addURI(AUTHORITY, \"task\", LIST_TASK);\r\n matcher.addURI(AUTHORITY, \"task/#\", ITEM_TASK);\r\n return matcher;\r\n }",
"protected LogParserMatch() {\n\t}",
"Pattern pattern() {\r\n\t\tArrayList<String> patternSpecs = new ArrayList<String>();\r\n\t\t\r\n\t\tif (delimiters.size() > 0) {\r\n\t\t delimiters.forEach(d -> patternSpecs.add(d.pattern().pattern()));\r\n\t\t} else {\r\n\t\t\tpatternSpecs.add(\"^.*$\");\r\n\t\t}\r\n\t\t\r\n\t\tString completeSpec = Joiner.on(\"|\").join(patternSpecs); // \r\n\t\t\r\n\t\tPattern pattern = Pattern.compile(completeSpec);\r\n\t\t\r\n\t\treturn pattern;\r\n\t}",
"boolean match(String pattern, String path);",
"public static List<String> getTargetBasedOnRegex(List<String> fileContent, String pattern) {\r\n String content = getLineContents(fileContent, 0, fileContent.size() - 1);\r\n List<String> targets = new ArrayList<>();\r\n Pattern regex = Pattern.compile(pattern);\r\n Matcher matcher = regex.matcher(content);\r\n while (matcher.find()) {\r\n targets.add(matcher.group());\r\n }\r\n if (targets.size() == 0) {\r\n return null;\r\n } else {\r\n return targets;\r\n }\r\n }",
"@Override\n public Matcher matches(LexerToken[] lexerTokens, Builder builder){\n return new Matcher(this,lexerTokens,builder);\n }",
"public RegexGrep(ShellEnvironment env, String[] args) {\n super(env, args);\n this.regex = Pattern.compile(args[0]);\n }",
"public static void StringFinder()\n {\n // String to be scanned to find the pattern.\n String TargetString = \"Find me in me this string me, test me\";\n String SearchExpression_literal = \"me\"; // Default Pattern (RegEx ) group\n\n // Create a Pattern object\n Pattern r = Pattern.compile(SearchExpression_literal);\n // Now create matcher object.\n Matcher m = r.matcher(TargetString);\n\n int SearchFindCounter = 0;\n /**\n * Matcher.find() Returns Boolean for every occurrence found\n */\n if (m.find())\n { \n \t System.out.println(\"Match Found\");\n }\n }",
"public String apply(TregexMatcher tregexMatcher)\n/* */ {\n/* 275 */ return this.result;\n/* */ }",
"Match getMatches();",
"public GrammaticaRE(String regex) throws Exception {\n regExp = new RegExp(regex, ignoreCase);\n }",
"public final String getRegex() {\n\t\treturn JsUtils.getNativePropertyString(this, \"regex\");\n\t}",
"boolean hasRegex();",
"@Test\n public void testParseRegexp_valid3() throws InvalidRegexpException {\n BasicRegexp re = BasicRegexp.parseRegexp(\"a b c d\");\n assertEquals(re.toString(), \"abcd\");\n }",
"public ArticleForAnnotation FindFekRegex(ArticleForAnnotation curArticle) throws Exception {\n // Regular expression to be matched\n// Pattern FekPattern = Pattern.compile(\"((\\\\d+\\\\w{1,2}? +)?[νΝ]\\\\. ?\\\\d+/\\\\d+( *\\\\([Α-Ωα-ω]{1,2}[΄΄'’]? ?\\\\d+\\\\))?)\", Pattern.UNICODE_CASE);\n // Matches Laws and POs (ΠΔ)\n// Pattern FekPattern = Pattern.compile(\"(((([Νν][όο]μ)[α-ω]{0,3}|[νΝ])\\\\.?|([Ππ]\\\\.?[Δδ]\\\\.?)) ?\\\\d+\\\\/\\\\d+( *\\\\((ΦΕΚ )?[Α-Ωα-ω]{1,2}[΄`΄'’]? ?\\\\d+((\\\\/|, ?)(\\\\d|\\\\.|-)*)?\\\\))?)\", Pattern.UNICODE_CASE);\n Pattern FekPattern = Pattern.compile(\"(((άρθ[α-ω\\\\.]{0,} ?\\\\d+,? [Α-Ωα-ω0-9, ]*παρ[α-ωά\\\\.]{0,} ?\\\\d+,? [Α-Ωα-ω0-9, ]*)|(παρ[α-ωά\\\\.]{0,} ?\\\\d+,? [Α-Ωα-ω0-9, ]*άρθ[α-ω\\\\.]{0,4} ?\\\\d+,? [Α-Ωα-ω0-9, ]*))?((([Νν][όο]μ)[α-ω]{0,3}|[νΝ])\\\\.?|([Ππ]\\\\.?[Δδ]\\\\.?)) ?\\\\d+\\\\/\\\\d+( *\\\\((ΦΕΚ )?[Α-Ωα-ω]{1,2}[΄`΄'’]? ?\\\\d+((\\\\/|, ?)(\\\\d|\\\\.|-)*)?\\\\))?)\", Pattern.UNICODE_CASE);\n Pattern LawPattern = Pattern.compile(\"((([Νν][όο]μ)[α-ω]{0,3}|[νΝ])\\\\.?|([Ππ]\\\\.?[Δδ]\\\\.?)) ?\\\\d+\\\\/\\\\d+\", Pattern.UNICODE_CASE);\n // Start searching article text\n String articText = curArticle.articleText;\n Matcher m = FekPattern.matcher(articText);\n while (m.find()) {\n String entityFound = m.group(0);\n\n Matcher mLaw = LawPattern.matcher(entityFound);\n if (!mLaw.find()) {\n continue;\n }\n String entityLaw = mLaw.group(0);\n\n String[] FEKparts = entityFound.split(\"/\", 2);\n int startIndex = m.start();\n int endIndex = m.end();\n String FEK_year = \"\";\n String FEK_issue = \"\";\n String FEK_number = null;\n String urlpdf = \"\";\n String entity_Type = \"fek\";\n\n // Get the second part from a FEK annotation (e.g. from ν. 2873/2000 (Α’ 285) the 2000 (Α’ 285) part)\n // and check if FEK issue and number exist (inside parenthesis)\n if (FEKparts[1].contains(\"(\")) {\n // Check inside that part for mached accent characters (΄ or ' or ’)\n // and if so, we get from this string the FEK issue (e.g. A) and FEK number\n FEK_year = FEKparts[1].substring(0, FEKparts[1].lastIndexOf(\"(\")).trim();\n if (FEKparts[1].contains(\"΄\")) {\n FEK_issue = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"(\"), FEKparts[1].lastIndexOf(\"΄\")).trim().replace(\"(\", \"\");\n FEK_number = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"΄\"), FEKparts[1].lastIndexOf(\")\")).replace(\"΄\", \"\").trim();\n } else if (FEKparts[1].contains(\"'\")) {\n FEK_issue = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"(\"), FEKparts[1].lastIndexOf(\"'\")).trim().replace(\"(\", \"\");\n FEK_number = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"'\"), FEKparts[1].lastIndexOf(\")\")).replace(\"'\", \"\").trim();\n } else if (FEKparts[1].contains(\"’\")) {\n FEK_issue = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"(\"), FEKparts[1].lastIndexOf(\"’\")).trim().replace(\"(\", \"\");\n FEK_number = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"’\"), FEKparts[1].lastIndexOf(\")\")).replace(\"’\", \"\").trim();\n } else if (FEKparts[1].contains(\"`\")) {\n FEK_issue = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"(\"), FEKparts[1].lastIndexOf(\"`\")).trim().replace(\"(\", \"\");\n FEK_number = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"`\"), FEKparts[1].lastIndexOf(\")\")).replace(\"`\", \"\").trim();\n } else {\n // If doesn't contain on of these characters then we check for space\n // else we get the first character as the FEK issue (e.g. A, B etc)\n FEK_issue = FEKparts[1].substring(FEKparts[1].lastIndexOf(\"(\"), FEKparts[1].lastIndexOf(\")\")).trim().replace(\"(\", \"\").replace(\")\", \"\");\n if (FEK_issue.startsWith(\"ΦΕΚ \")) {\n FEK_issue = FEK_issue.substring(4);\n } else if (FEK_issue.startsWith(\"ΦΕΚ\")) {\n FEK_issue = FEK_issue.substring(3);\n }\n\n if (FEK_issue.contains(\" \")) {\n String[] splitedIssue = FEK_issue.split(\" \");\n FEK_issue = splitedIssue[0];\n FEK_number = splitedIssue[1];\n } else {\n FEK_number = FEK_issue.substring(1);\n FEK_issue = FEK_issue.substring(0, 1);\n }\n }\n if (FEK_issue.startsWith(\"ΦΕΚ \")) {\n FEK_issue = FEK_issue.substring(4);\n }\n String[] FEK_num_tokens = FEK_number.split(\"(\\\\/|-| |,)\");\n\n FEK_number = FEK_num_tokens[0];\n\n // Set the corresponding issue checkbox based on the FEK issue retrieved above\n String checkBoxIssue = \"\";\n switch (FEK_issue) {\n case \"Α\":\n checkBoxIssue = \"chbIssue_1\";\n break;\n case \"Β\":\n checkBoxIssue = \"chbIssue_2\";\n break;\n case \"Γ\":\n checkBoxIssue = \"chbIssue_3\";\n break;\n case \"Δ\":\n checkBoxIssue = \"chbIssue_4\";\n break;\n case \"\":\n checkBoxIssue = \"\";\n break;\n }\n\n // Perform the POST request\n PostRequestFEK httpRequest = new PostRequestFEK();\n // Get the corresponding pdf url of the FEK\n urlpdf = httpRequest.sendPost3(FEK_year, FEK_issue, FEK_number, checkBoxIssue);\n// if (urlpdf.length() == 0) {\n// urlpdf = \"-1\";\n// }\n } else {\n FEK_year = FEKparts[1];\n String[] toks = entityLaw.split(\"(\\\\.|,| |\\\\/)\");\n if (entityLaw.toLowerCase().startsWith(\"ν\")) {\n entity_Type = \"law\";\n } else if (entityLaw.toLowerCase().startsWith(\"π\")) {\n entity_Type = \"pd\";\n }\n String item_number = toks[toks.length - 2];\n PostRequestFEK httpRequest = new PostRequestFEK();\n urlpdf = httpRequest.sendPost4(FEK_year, item_number, entity_Type);\n }\n // Add the current annotation found into the current article's annotations list\n Annotation currentAnnotation = new Annotation(entityFound, startIndex, endIndex, urlpdf, entity_Type, entityLaw);\n curArticle.annotations.add(currentAnnotation);\n }\n // Return the article back to the process\n return curArticle;\n }",
"public static void main(String[] args) {\n Pattern MY_PATTERN = Pattern.compile(\"Content-Length: (\\\\d+)\");\n Matcher m = MY_PATTERN.matcher(\"hehe Content-Length: 234 asdf\");\n System.out.println(\"pattern: \" + MY_PATTERN + \", found: \" + m.find());\n System.out.println(\"length ne: \" + m.group(1));\n }",
"public String getRegularExpression() {\n\t\treturn enteredText;\n\t}",
"private String getMatchPattern(String pattern) {\n String mandatoryPart = pattern.trim().replaceAll(\"(\\\\s+?)\\\\[.+?\\\\]\", \"($1.+?(\\\\\\\\s|\\\\$))*\");\n mandatoryPart = mandatoryPart.replaceAll(\"\\\\s+\", \"\\\\\\\\s+\");\n return mandatoryPart.replaceAll(\"<.+?>\", \".+?\");\n }",
"void matchStart();",
"public static UriMatcher buildUriMatcher() {\n // Initialize a UriMatcher\n UriMatcher uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);\n // Add URI matches\n\n uriMatcher.addURI(RecipeContract.AUTHORITY, RecipeContract.PATH_RECIPES, RECIPES);\n uriMatcher.addURI(RecipeContract.AUTHORITY, RecipeContract.PATH_RECIPES + \"/#\", RECIPE_WITH_ID);\n uriMatcher.addURI(RecipeContract.AUTHORITY, RecipeContract.PATH_INGREDIENTS, INGREDIENTS);\n uriMatcher.addURI(RecipeContract.AUTHORITY, RecipeContract.PATH_INGREDIENTS + \"/#\", INGREDIENTS_WITH_ID);\n uriMatcher.addURI(RecipeContract.AUTHORITY, RecipeContract.PATH_STEPS, STEPS);\n uriMatcher.addURI(RecipeContract.AUTHORITY, RecipeContract.PATH_STEPS + \"/#\", STEPS_WITH_ID);\n\n return uriMatcher;\n }",
"public static void RE( String s){\n \tString path = \"txt\";\t\n\t\tFile file = new File(path);\t\t\n\t\tFile[] fs = file.listFiles();\n\t\tString A [ ] = new String [fs.length];\n\t\tfor(int i=0;i<fs.length;i++) {\n\t\t\tA[i]=fs[i].toString();\t\t\n\t\t\tlib.In myfile=new lib.In (A[i]);\n\t\t\tString f=myfile.readAll();\n\t\t\tmyfile.close();\n \n//\t\t\tString pattern =\"[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\\\.[a-zA-Z0-9_-]+)+\";\n//\t\t\tString pattern2 = \"(\\\\()?(\\\\d){3}(\\\\))?[- ](\\\\d){3}-(\\\\d){4}\";\n//\t\t\tString pattern3=\"([a-zA-Z0-9_-]+\\\\.)+w3.org\";\n//\t\t\tString pattern8=\"www.w3.org(/[a-zA-Z0-9_-]+)+/\";\n//\t\t\tString pattern9=\"www.w3.org(/[a-zA-Z0-9_-]+)+/#[a-zA-Z0-9_-]+\";\n//\t\t\tString pattern5=\"([a-zA-Z0-9_-]+\\\\.)+com\";\n//\t\t\tString pattern6=\"([a-zA-Z0-9_-]+\\\\.)+net\";\n//\t\t\tString pattern7=\"([a-zA-Z0-9_-]+\\\\.)+org\";\n\t\t\t\n\t\n\t\t\tString pattern10=s;\n\t\t\tPattern r = Pattern.compile(pattern10);\n\t\n\t\t\n\t\t\t// Now create matcher object.\n\t\t\tMatcher m = r.matcher(f);\n\t\t\twhile (m.find( )) {\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t\tSystem.out.println(\"Found value: \" + m.group(0) + \" at \" + m.start(0));\n\t\t\t} \n\t\t}\n }",
"@Override\n\tpublic boolean test(MyRegex t) {\n\t\treturn false;\n\t}",
"private String regex(Edge e) {\n return EdgeWriter.toRegex(e, false /* use dot match */);\n }",
"private Matcher locationMatches(Pattern pattern, String location) {\n return PATTERN.matcher(location);\n }",
"public String returnRegex() {\n\t\tString chosenRegex;\n\t\tSystem.out.println(\"selectedRegex value is: \" + selectedRegex);\n\t\tswitch (selectedRegex) {\n\t\tcase 1:\n\t\t\tchosenRegex = \"(\\\\&?\\\\??t=\\\\d*?[h]?\\\\d*[m]?\\\\d*[s]|\\\\&t=\\\\d*)\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tchosenRegex = \"(\\\\&list=[a-zA-Z 0-9 -]+\\\\&?index=?\\\\d+?)\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tchosenRegex = \"(\\\\&feature=youtu.be)\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tchosenRegex = \"\\\\?t.*|\\\\&t.*|\\\\&l.*|\\\\&f.*\"; // alternative:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// (\\\\&?\\\\??t=\\\\d*?[h]?\\\\d*[m]?\\\\d*[s]|\\\\&t=\\\\d*|\\\\&list=[a-zA-Z\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 0-9 -]*)\n\t\t\tbreak;\n\t\t}\n\t\tSystem.out.println(chosenRegex);\n\t\treturn chosenRegex;\n\t}",
"@Test\n \tpublic void whereClauseForNodeSpanRegexp() {\n \t\tnode23.setSpannedText(\"regexp\", TextMatching.REGEXP_EQUAL);\n \t\tcheckWhereCondition(join(\"~\", \"_node23.span\", \"'^regexp$'\"));\n \t}",
"private static UriMatcher buildUriMatcher() {\n // Initialize a UriMatcher\n UriMatcher uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);\n // Add URI matches\n\n // Recipe Paths\n uriMatcher.addURI(RecipeDbContract.AUTHORITY, RecipeDbContract.PATH_RECIPES,\n CODE_RECIPES);\n\n uriMatcher.addURI(RecipeDbContract.AUTHORITY, RecipeDbContract.PATH_RECIPES\n + \"/#\", CODE_RECIPE_WITH_ID);\n\n uriMatcher.addURI(RecipeDbContract.AUTHORITY, RecipeDbContract.PATH_RECIPES\n + \"/\" + RecipeDbContract.PATH_APP_WIDGET_IDS\n + \"/#\", CODE_RECIPE_WITH_APP_WIDGET_ID);\n\n\n // Ingredient Paths\n uriMatcher.addURI(RecipeDbContract.AUTHORITY, RecipeDbContract.PATH_INGREDIENTS,\n CODE_INGREDIENTS);\n\n uriMatcher.addURI(RecipeDbContract.AUTHORITY, RecipeDbContract.PATH_INGREDIENTS\n + \"/#\", CODE_INGREDIENT_WITH_ID);\n\n // Step Paths\n uriMatcher.addURI(RecipeDbContract.AUTHORITY, RecipeDbContract.PATH_STEPS,\n CODE_STEPS);\n\n uriMatcher.addURI(RecipeDbContract.AUTHORITY, RecipeDbContract.PATH_STEPS\n + \"/#\", CODE_STEP_WITH_ID);\n\n // Favorite Paths\n uriMatcher.addURI(RecipeDbContract.AUTHORITY, RecipeDbContract.PATH_FAVORITES,\n CODE_FAVORITES);\n\n // App Widget\n uriMatcher.addURI(RecipeDbContract.AUTHORITY, RecipeDbContract.PATH_APP_WIDGET_IDS,\n CODE_APP_WIDGET_IDS);\n\n return uriMatcher;\n }",
"public Matcher objectFindRegex(Object left, Object right) {\n String stringToCompare;\n if (left instanceof String) {\n stringToCompare = (String) left;\n }\n else {\n stringToCompare = toString(left);\n }\n String regexToCompareTo;\n if (right instanceof String) {\n regexToCompareTo = (String) right;\n }\n else if (right instanceof Pattern) {\n Pattern pattern = (Pattern) right;\n return pattern.matcher(stringToCompare);\n }\n else {\n regexToCompareTo = toString(right);\n }\n Matcher matcher = Pattern.compile(regexToCompareTo).matcher(stringToCompare);\n return matcher;\n }",
"public static TextP regex(final String value) {\n return new TextP(new Text.RegexPredicate(value, false), value);\n }",
"public abstract Match match();",
"public abstract boolean isSingleCharMatcher();",
"public static Regex compile(String pattern, int cflags) throws RegexException {\n return new Regex(pattern, REG_EXTENDED | cflags);\n }",
"@Description(\"response body contains substring/matches RegExp '{bodyExpression}'\")\n public static Criteria<HarEntry> recordedResponseBodyMatches(@DescriptionFragment(\"bodyExpression\") String bodyExpression) {\n checkArgument(isNotBlank(bodyExpression), \"Response body substring/RegExp should be defined\");\n\n return condition(entry -> {\n HarContent responseContent = entry.getResponse().getContent();\n\n return ofNullable(responseContent)\n .map(content -> checkByStringContainingOrRegExp(bodyExpression).test(content.getText()))\n .orElse(false);\n });\n }",
"public NaiveStringMatcher(String pattern) {\n super(pattern);\n }",
"private PatternBuilder() { }",
"@Test\n\tvoid runRegExFoundText_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"S(a|r|g)*on\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<MatchResponse> response = a.search(\"books/babylon.txt\");\n\t\t\tassertEquals(30, response.size());\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}",
"@objid (\"d7eead28-9a1c-4037-9797-4868268b54d4\")\n public RegexVerifier(String regex) {\n this.regex = regex;\n }",
"private static UriMatcher buildUriMatcher() {\r\n\r\n\t\tUriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH);\r\n\t\tmatcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_QUERY, SEARCH_SUGGEST);\r\n\t\tmatcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_QUERY + \"/*\", SEARCH_SUGGEST);\r\n\t\tmatcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_SHORTCUT, SHORTCUT_REFRESH);\r\n\t\tmatcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_SHORTCUT + \"/*\", SHORTCUT_REFRESH);\r\n\t\treturn matcher;\r\n\t}",
"com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder();"
] |
[
"0.67343444",
"0.64976025",
"0.60908103",
"0.60908103",
"0.6069965",
"0.5983775",
"0.5932478",
"0.5862806",
"0.58572567",
"0.58271515",
"0.5757458",
"0.5735645",
"0.5730192",
"0.57150245",
"0.5639482",
"0.55966234",
"0.55836535",
"0.5569118",
"0.5510388",
"0.5503617",
"0.5498931",
"0.5489454",
"0.546773",
"0.5457597",
"0.5455373",
"0.54533726",
"0.54236794",
"0.5418271",
"0.54178417",
"0.5399574",
"0.5329844",
"0.5328971",
"0.53192526",
"0.5316176",
"0.5303696",
"0.5291809",
"0.5291434",
"0.52851874",
"0.52805793",
"0.52663463",
"0.52384907",
"0.523535",
"0.5219066",
"0.5194601",
"0.51872385",
"0.5184898",
"0.51679564",
"0.51537293",
"0.5152117",
"0.51505387",
"0.51313525",
"0.5121496",
"0.5119872",
"0.51179826",
"0.5104883",
"0.50978494",
"0.5097178",
"0.50915587",
"0.50897175",
"0.5075501",
"0.50637203",
"0.5056554",
"0.50463635",
"0.50305414",
"0.501575",
"0.5015425",
"0.50123566",
"0.5010926",
"0.50106865",
"0.50016123",
"0.4996372",
"0.49935085",
"0.4989123",
"0.49875218",
"0.49833548",
"0.4971401",
"0.49558818",
"0.49448976",
"0.49347568",
"0.49254218",
"0.4917556",
"0.49110928",
"0.49047136",
"0.48966601",
"0.4890495",
"0.48847026",
"0.48832",
"0.48711187",
"0.48707995",
"0.4870218",
"0.48688635",
"0.48649612",
"0.4851545",
"0.48459417",
"0.48437646",
"0.48415413",
"0.48110923",
"0.48107544",
"0.48085022",
"0.48080143",
"0.48056522"
] |
0.0
|
-1
|
Copy files or directories from 'from' to 'to'. Recursively descends if 'from' is a directory. Creates 'from' tail directory in 'to', e.g.: from = c:/foo/bar to = c:/temp > c:/temp/bar
|
public static void copyTree(File from, File to, FileFilter filter) throws IOException {
File[] children;
if (!from.exists()) {
throw new IOException ("Source of copy \'" + from.getName() + "\' doesn't exist");
}
if (to.getCanonicalPath().equals(from.getCanonicalPath())) {
throw new IOException ("\'" + from.getName() + "\' cannot copy to itself");
}
if (from.isDirectory()) {
children = from.listFiles(filter);
// just like cp command, if target exist, make a new folder into
// the target, copy content into the target folder
if (to.exists()) {
if (to.isFile()) {
throw new IOException("Cannot overwrite non-directory \'" + to.getName() + "\' with directory " + from.getName());
}
// copy into new directory name grafted after the existing one
to = new File(to, from.getName());
copyTree(from, to, filter);
return;
} else {
// copy into new directory name
to.mkdir();
for (int i = 0; i < children.length; i++) {
File curto = new File(to, children[i].getName());
copyTree(children[i], curto, filter);
}
return;
}
}
else {
if (to.isDirectory()) {
to = new File (to, from.getName());
}
copyFile(from, to);
return;
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static void copyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] files = fromDir.listFiles();\n \t\n \t\t\ttoDir.mkdir();\n \t\n \t\t\t// cycle through files\n \t\t\tint size = files.length;\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), size * 50);\n \t\n \t\t\tfor (int i = 0; i < size; i++) {\n \t\t\t\tFile current = files[i];\n \t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\tString toFile = to;\n \t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\ttoFile += File.separator;\n \t\t\t\ttoFile += current.getName();\n \t\t\t\tif (current.isFile()) {\n \t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\tmonitor.worked(50);\n \t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\tcopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, 50));\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying directory\", e);\n \t\t}\n \t}",
"private static boolean copyDirectory(File from, File to)\n {\n return copyDirectory(from, to, (byte[])null);\n }",
"public static void smartCopyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] fromFiles = fromDir.listFiles();\n \t\t\tint fromSize = fromFiles.length;\n \t\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), 550);\n \t\n \t\t\tFile[] toFiles = null;\n \t\n \t\t\t// delete old files and directories from this directory\n \t\t\tif (toDir.exists() && toDir.isDirectory()) {\n \t\t\t\ttoFiles = toDir.listFiles();\n \t\t\t\tint toSize = toFiles.length;\n \t\n \t\t\t\t// check if this exact file exists in the new directory\n \t\t\t\tfor (int i = 0; i < toSize; i++) {\n \t\t\t\t\tString name = toFiles[i].getName();\n \t\t\t\t\tboolean isDir = toFiles[i].isDirectory();\n \t\t\t\t\tboolean found = false;\n \t\t\t\t\tfor (int j = 0; j < fromSize; j++) {\n \t\t\t\t\t\tif (name.equals(fromFiles[j].getName()) && isDir == fromFiles[j].isDirectory())\n \t\t\t\t\t\t\tfound = true;\n \t\t\t\t\t}\n \t\n \t\t\t\t\t// delete file if it can't be found or isn't the correct type\n \t\t\t\t\tif (!found) {\n \t\t\t\t\t\tif (isDir)\n \t\t\t\t\t\t\tPublishUtil.deleteDirectory(toFiles[i], null);\n \t\t\t\t\t\telse\n \t\t\t\t\t\t\ttoFiles[i].delete();\n \t\t\t\t\t}\n \t\t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tif (toDir.isFile())\n \t\t\t\t\ttoDir.delete();\n \t\t\t\ttoDir.mkdir();\n \t\t\t}\n \t\t\tmonitor.worked(50);\n \t\n \t\t\t// cycle through files and only copy when it doesn't exist\n \t\t\t// or is newer\n \t\t\ttoFiles = toDir.listFiles();\n \t\t\tint toSize = toFiles.length;\n \t\t\tint dw = 0;\n \t\t\tif (toSize > 0)\n \t\t\t\tdw = 500 / toSize;\n \t\n \t\t\tfor (int i = 0; i < fromSize; i++) {\n \t\t\t\tFile current = fromFiles[i];\n \t\n \t\t\t\t// check if this is a new or newer file\n \t\t\t\tboolean copy = true;\n \t\t\t\tif (!current.isDirectory()) {\n \t\t\t\t\tString name = current.getName();\n \t\t\t\t\tlong mod = current.lastModified();\n \t\t\t\t\tfor (int j = 0; j < toSize; j++) {\n \t\t\t\t\t\tif (name.equals(toFiles[j].getName()) && mod <= toFiles[j].lastModified())\n \t\t\t\t\t\t\tcopy = false;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\n \t\t\t\tif (copy) {\n \t\t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\t\tString toFile = to;\n \t\t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\t\ttoFile += File.separator;\n \t\t\t\t\ttoFile += current.getName();\n \t\t\t\t\tif (current.isFile()) {\n \t\t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\t\tmonitor.worked(dw);\n \t\t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\t\tsmartCopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, dw));\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.worked(500 - dw * toSize);\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error smart copying directory \" + from + \" - \" + to, e);\n \t\t}\n \t}",
"public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from); // set path of source directory from parent function\r\n Path dest = Paths.get(to); // set path of destination directory from parent function\r\n Files.copy(src, dest); //inbuilt function to copy files\r\n \r\n }",
"public static void copyTreeNoParent(File from, File to, FileFilter filter) throws IOException {\r\n File[] files;\r\n \r\n Check.checkArg(from.isDirectory());\r\n \r\n files = from.listFiles(filter);\r\n to.mkdirs();\r\n \r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n //File curto = new File(to, files[i].getName());\r\n //curto.mkdirs();\r\n copyTree(files[i], to, filter);\r\n }\r\n else {\r\n File curto = new File(to, files[i].getName());\r\n copyFile(files[i], curto);\r\n }\r\n }\r\n \r\n }",
"public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from);\r\n Path dest = Paths.get(to);\r\n Files.copy(src, dest, StandardCopyOption.REPLACE_EXISTING);\r\n }",
"private static void copyFile(String from, String to)\n\t{\n\t\tFile inputFile;\n\t File outputFile;\n\t\tint fIndex = from.indexOf(\"file:\");\n\t\tint tIndex = to.indexOf(\"file:\");\n\t\tif(fIndex < 0)\n\t\t\tinputFile = new File(from);\n\t\telse\n\t\t\tinputFile = new File(from.substring(fIndex + 5, from.length()));\n\t\tif(tIndex < 0)\n\t\t\toutputFile = new File(to);\n\t\telse\n\t\t\toutputFile = new File(to.substring(tIndex + 5, to.length())); \n\t\tcopyFile(inputFile, outputFile);\t\t\n\t}",
"public static void copyFile(final File from, final File toDir) throws IOException {\n if (!from.canRead()) {\n throw new IOException(\"Cannot read file '\" + from + \"'.\");\n }\n if (toDir.exists() && (!toDir.canWrite())) {\n throw new IOException(\"Cannot write to file '\" + toDir + \"'.\");\n }\n toDir.getParentFile().mkdirs();\n FileUtils.copyFile(from, toDir);\n }",
"public static void copyFile(final String fromPath, final String toPath) throws IOException {\n FileUtils.copyFileToDirectory(new File(fromPath), new File(toPath));\n }",
"public static void copyFile(File from, File to) throws IOException {\r\n FileInputStream in = new FileInputStream(from);\r\n copyFile(in, to);\r\n }",
"public void copyOne(String from, String to) {\n\t\tFile source = new File(from);\n\t\tif (sourceExists(source)) {\n\t\t\tFile target = new File(to);\n\t\t\ttry{\n\t\t\t\tif(!targetExists(target)){\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath());\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName()\n\t\t\t\t\t\t\t+ \" COPIED!\");\n\t\t\t\t} else if (target.exists() && confirmReplace()) {\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath(),\n\t\t\t\t\t\t\tREPLACE_EXISTING);\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName() + \" REPLACED!\");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"File WASN'T copied!\");\n\t\t\t\t}\n\t\t\t}catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public static IStatus copyFile(String from, String to) {\n \t\ttry {\n \t\t\treturn copyFile(new FileInputStream(from), to);\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t}\n \t}",
"public static void copyFolder(File src, File dest) throws IOException {\n\n\t\tif (src.isDirectory()) {\n\n\t\t\t// if directory not exists, create it\n\t\t\tif (!dest.exists()) {\n\t\t\t\tdest.mkdir();\n\t\t\t\t// System.out.println(\"Directory copied from \" + src + \" to \" +\n\t\t\t\t// dest);\n\t\t\t}\n\n\t\t\t// list all the directory contents\n\t\t\tString files[] = src.list();\n\n\t\t\tfor (String file : files) {\n\t\t\t\t// construct the src and dest file structure\n\t\t\t\tFile srcFile = new File(src, file);\n\t\t\t\tFile destFile = new File(dest, file);\n\t\t\t\t// recursive copy\n\t\t\t\tcopyFolder(srcFile, destFile);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// if file, then copy it\n\t\t\t// Use bytes stream to support all file types\n\t\t\tInputStream in = new FileInputStream(src);\n\t\t\tOutputStream out = new FileOutputStream(dest);\n\n\t\t\tbyte[] buffer = new byte[1024];\n\n\t\t\tint length;\n\t\t\t// copy the file content in bytes\n\t\t\twhile ((length = in.read(buffer)) > 0) {\n\t\t\t\tout.write(buffer, 0, length);\n\t\t\t}\n\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\t// System.out.println(\"File copied from \" + src + \" to \" + dest);\n\t\t}\n\t}",
"private int copy(String from, String to, int flag) {\n\n File fromFile = new File(rootPath + from);\n if (!fromFile.exists()) {\n return ERROR_FILE_NOT_EXIST;\n }\n\n if ((flag & FLAG_FORCE) != 0) {\n delete(to);\n }\n\n if (createFile(to) < 0) {\n return ERROR_FILE_ALREADY_EXIST;\n }\n\n File toFile = new File(rootPath + to);\n if (!toFile.setWritable(true)) {\n return ERROR;\n }\n\n try {\n BufferedInputStream inputStream = new BufferedInputStream(new FileInputStream(fromFile));\n BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(toFile));\n byte[] buf = new byte[BUF_SIZE];\n // TODO : it limits file size to INTEGER!!\n int offset = 0;\n int read = 0;\n while((read = inputStream.read(buf)) >= 0) {\n outputStream.write(buf, offset, read);\n offset += read;\n }\n inputStream.close();\n outputStream.close();\n } catch (FileNotFoundException e) {\n // file not found\n return ERROR_FILE_NOT_EXIST;\n } catch (IOException e) {\n // IO Exception\n return ERROR;\n }\n\n return OK;\n }",
"private void copyFolder(File sourceFolder, File destinationFolder) throws IOException {\n //Check if sourceFolder is a directory or file\n //If sourceFolder is file; then copy the file directly to new location\n if (sourceFolder.isDirectory()) {\n //Verify if destinationFolder is already present; If not then create it\n if (!destinationFolder.exists()) {\n destinationFolder.mkdir();\n logAppend(\"Directory created :: \" + destinationFolder);\n nothingDone=false;\n }\n\n //Get all files from source directory\n String files[] = sourceFolder.list();\n\n //Iterate over all files and copy them to destinationFolder one by one\n for (String file : files) {\n\n File srcFile = new File(sourceFolder, file);\n File destFile = new File(destinationFolder, file);\n\n //Recursive function call\n copyFolder(srcFile, destFile);\n }\n } else {\n\n long dateSrc = sourceFolder.lastModified();\n long dateDest = destinationFolder.lastModified();\n\n if (dateSrc > dateDest) {\n //Copy the file content from one place to another\n Files.copy(sourceFolder.toPath(), destinationFolder.toPath(), StandardCopyOption.REPLACE_EXISTING);\n logAppend(\"File copied :: \" + destinationFolder);\n nothingDone=false;\n }\n\n }\n }",
"public static IStatus copyFile(URL from, String to) {\n \t\ttry {\n \t\t\treturn copyFile(from.openStream(), to);\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t}\n \t}",
"public static void copyFile(final String fileName, final String fromDir, final String toDir)\n throws IOException {\n FileUtils.copyFile(new File(fromDir, fileName), new File(toDir, fileName));\n }",
"public static <T> void drain(Stack<T> from, Stack<T> to) {\n while (!from.isEmpty()) {\n to.push(from.pop());\n }\n }",
"public static void copyFile(InputStream in, File to) throws IOException {\r\n FileOutputStream out = new FileOutputStream(to);\r\n int len;\r\n byte[] buffer = new byte[4096];\r\n while ((len = in.read(buffer)) != -1) {\r\n out.write(buffer, 0, len);\r\n }\r\n out.close();\r\n in.close();\r\n }",
"public static void copyFiles(File src, File dest) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"copyFiles: Can not find source: \" + src.getAbsolutePath() + \".\");\n } else if (!src.canRead()) { //check to ensure we have rights to the source...\n throw new IOException(\"copyFiles: No right to source: \" + src.getAbsolutePath() + \".\");\n }\n //is this a directory copy?\n if (src.isDirectory()) {\n if (!dest.exists()) { //does the destination already exist?\n //if not we need to make it exist if possible (note this is mkdirs not mkdir)\n if (!dest.mkdirs()) {\n throw new IOException(\"copyFiles: Could not create direcotry: \" + dest.getAbsolutePath() + \".\");\n }\n }\n //get a listing of files...\n String list[] = src.list();\n //copy all the files in the list.\n for (int i = 0; i < list.length; i++) {\n File dest1 = new File(dest, list[i]);\n File src1 = new File(src, list[i]);\n copyFiles(src1, dest1);\n }\n } else {\n //This was not a directory, so lets just copy the file\n try {\n copy(new FileInputStream(src), new FileOutputStream(dest));\n } catch (IOException e) { //Error copying file...\n IOException wrapper = new IOException(\"copyFiles: Unable to copy file: \"\n + src.getAbsolutePath() + \"to\" + dest.getAbsolutePath() + \".\");\n wrapper.initCause(e);\n wrapper.setStackTrace(e.getStackTrace());\n throw wrapper;\n }\n }\n }",
"private void streamCopy(InputStream from, OutputStream to) {\r\n\t\ttry {\r\n\t\t\tint count = 0;\r\n\t\t\tbyte[] buffer = new byte[16*1024];\r\n\t\t\twhile ((count = from.read(buffer)) > 0) {\r\n\t\t\t\tto.write(buffer, 0, count);\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\tEventLogger.logConnectionException(logger, socket, e);\r\n\t\t}\r\n\t}",
"public static void copyPath(Path source, Path target) {\n try {\n Files.copy(source, target);\n if (Files.isDirectory(source)) {\n try (Stream<Path> files = Files.list(source)) {\n files.forEach(p -> copyPath(p, target.resolve(p.getFileName())));\n }\n }\n } catch (IOException e) { e.printStackTrace(); }\n }",
"public static void copyAll(File root, File dest) throws IOException {\n if(root.isDirectory()){\n for(File child : root.listFiles()){\n File childDest = new File(dest, child.getName());\n if(child.isDirectory()){\n if(!childDest.exists() && !childDest.mkdirs())\n throw new IOException(\"Failed to create dir \"+childDest.getPath());\n copyAll(child, childDest);\n }else{\n Files.copy(child.toPath(), childDest.toPath(), StandardCopyOption.COPY_ATTRIBUTES);\n }\n }\n }else{\n File childDest = new File(dest, root.getName());\n if(!dest.exists() && !dest.mkdirs())\n throw new IOException(\"Failed to create dir \"+dest.getPath());\n Files.copy(root.toPath(), childDest.toPath(), StandardCopyOption.COPY_ATTRIBUTES);\n }\n }",
"public static long copyFile(File source, File dest) throws IOException {\n\n\t\tif (source.isDirectory() || dest.isDirectory())\n\t\t\tthrow new IOException(\"wont copy directories\");\n\t\tInputStream i = null;\n\t\ttry {\n\t\t\ti = getInputStreamFromFile(source);\n\n\t\t\t// create parent directories\n\t\t\tif (dest.getParentFile().mkdirs()) {\n\t\t\t\t// all good\n\t\t\t} else\n\t\t\t\tthrow new IOException(\"\\\"\" + dest + \"\\\" cannot be created\");\n\t\t\treturn writeStreamToFile(i, dest);\n\n\t\t} finally {\n\t\t\tif (i != null)\n\t\t\t\ti.close();\n\t\t}\n\t}",
"public static void copyFolder(final String sourcePath, final String targetPath)\n\t{\n\t\tFile tfile = new File(targetPath);\n\t\ttfile.mkdirs();\n\t\tFile sfile = new File(sourcePath);\n\t\tfinal FilenameFilter ffilter = new FilenameFilter()\n\t\t{\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean accept(File dir, String name)\n\t\t\t{\n\t\t\t\tif( name.startsWith(\".svn\"))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tFile[] files = sfile.listFiles(ffilter);\n\t\t\n\t\tArrayList <File> cpFile = new ArrayList<File>();\n\t\tfor( int i=0;i<files.length;i++)\n\t\t{\n\t\t\tfinal File souFile = files[i];\n\t\t\tif( souFile.isDirectory())\n\t\t\t{\n\t\t\t\tfinal String souPath = souFile.getAbsolutePath();\n\t\t\t\tfinal String tarpath = targetPath + File.separator + souFile.getName();\n\t\t\t\ttraverseDir(souPath, ffilter, new IOnGetFileHandler()\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handle(File file)\n\t\t\t\t\t{\n//\t\t\t\t\t\tcopyFile(file.getAbsolutePath(), tarpath +File.separator + file.getName());\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}, new IOnGetFileHandler()\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handle(File file)\n\t\t\t\t\t{\n\t\t\t\t\t\tcopyFolder(file.getAbsolutePath(), tarpath);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}, null);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcpFile.add(souFile);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tcopyFiles(targetPath, cpFile);\n\t\t\n\t\t\n\t}",
"public static void copyDirectory(File destDir, File sourceDir, boolean mkdirs) throws Exception {\r\n\t\tif (!destDir.exists() && !destDir.isDirectory()) {\r\n\t\t\tif (mkdirs) destDir.mkdirs();\r\n\t\t\telse return;\r\n\t\t}\r\n\t\tFile[] containedFiles = sourceDir.listFiles();\r\n\t\tfor (int i = 0; i < containedFiles.length; i++) {\r\n\t\t\tFile aFile = containedFiles[i];\r\n\t\t\tif (aFile.isFile()) copy(destDir, aFile);\r\n\t\t\telse {\r\n\t\t\t\tString dirName = aFile.getName();\r\n\t\t\t\tFile newDir = new File(destDir.getAbsolutePath() + File.separatorChar + dirName);\r\n\t\t\t\tcopyDirectory(newDir, aFile, mkdirs);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void copyFolder(File sourceFolder, File destinationFolder) throws IOException {\n System.out.println(sourceFolder.toString());\n System.out.println(destinationFolder.toString());\n if (sourceFolder.isDirectory()) {\n //Verify if destinationFolder is already present; If not then create it\n if (!destinationFolder.exists()) {\n destinationFolder.mkdir();\n //System.out.println(\"Directory created :: \" + destinationFolder); // debug\n }\n\n //Get all files from source directory\n String files[] = sourceFolder.list();\n\n //Iterate over all files and copy them to destinationFolder one by one\n for (String file : files) {\n File srcFile = new File(sourceFolder, file);\n File destFile = new File(destinationFolder, file);\n\n //Recursive function call\n copyFolder(srcFile, destFile);\n }\n } else {\n Files.copy(\n sourceFolder.toPath(), destinationFolder.toPath(), StandardCopyOption.REPLACE_EXISTING);\n //System.out.println(\"File copied :: \" + destinationFolder); // debug\n }\n }",
"private static void copyFiles(File source, File dest) throws IOException {\n\t\tif(!source.equals(dest))\n\t\t\tFileUtils.copyFile(source, dest);\n\t}",
"public static void shift(RandomAccessFile file, long from, long to) throws IOException {\n long total = file.length();\n if (from < 0 || from >= total || to < 0)\n throw new IOException();\n else if (from == to) {\n file.seek(0);\n return;\n }\n final byte buf[] = new byte[4096];\n int res;\n if (from > to) {\n while (true) {\n file.seek(from);\n if ((res = file.read(buf)) <= 0) {\n file.setLength(to);\n file.seek(0);\n return;\n }\n file.seek(to);\n file.write(buf, 0, res);\n from = from + res;\n to = to + res;\n }\n } else {\n file.seek(total);\n for (long todo = to - from; todo > 0;) {\n if (todo >= buf.length) {\n file.write(buf);\n todo = todo - buf.length;\n } else {\n file.write(buf, 0, (int) todo);\n break;\n }\n }\n for (long todo = total - from; todo > 0; total = total - res, todo = todo - res) {\n if (todo > buf.length)\n res = buf.length;\n else\n res = (int) todo;\n file.seek(total - res);\n for (int done = 0; done < res;) {\n int r = file.read(buf, done, res - done);\n if (r <= 0)\n throw new IOException();\n else\n done += r;\n }\n file.seek(total - res + (to - from));\n file.write(buf, 0, res);\n }\n }\n file.seek(0);\n }",
"void copyFile(String sourceFile, String destinationFile, boolean overwrite) throws IOException;",
"public static void copyFileToDir(File src, File dst) throws IOException {\n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n File file = new File(dstAbsPath + File.separator + src.getName());\n copyFile(src, file);\n }",
"public int move(int from, int to) {\n // Gracefully handle items beyond end\n final int size = mItems.size();\n from = constrain(from, 0, size - 1);\n to = constrain(to, 0, size - 1);\n\n final Path item = mItems.remove(from);\n mItems.add(to, item);\n return to;\n }",
"public static void copyDirectory(File sourceDir, File targetDir) throws IOException {\n File[] srcFiles = sourceDir.listFiles();\n if (srcFiles != null) {\n for (int i = 0; i < srcFiles.length; i++) {\n File dest = new File(targetDir, srcFiles[i].getName());\n if (srcFiles[i].isDirectory() && FileUtils.safeIsRealDirectory(srcFiles[i])) {\n if (!dest.exists()) {\n dest.mkdirs();\n }\n copyDirectory(srcFiles[i], dest);\n } else {\n if (!dest.exists()) {\n dest.createNewFile();\n }\n copyFile(srcFiles[i].getAbsolutePath(), new File(targetDir,\n srcFiles[i].getName()).getAbsolutePath());\n }\n }\n }\n }",
"private static void copyFile(File in, File out)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFileChannel inChannel = new\tFileInputStream(in).getChannel();\n\t\t\tFileChannel outChannel = new FileOutputStream(out).getChannel();\n\t\t\tinChannel.transferTo(0, inChannel.size(), outChannel);\n\t\t\tinChannel.close();\n\t\t\toutChannel.close();\t\t\t\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.copyFile(): \" + e);\n\t\t}\n\n\t}",
"public static void copyFile(File source, File destination) throws IOException {\n\tFileChannel sourceChannel = null;\n\tFileChannel destinationChannel = null;\n\ttry {\n\t if (destination.exists()) {\n\t\tdestination.delete();\n\t }\n\t sourceChannel = new FileInputStream(source).getChannel();\n\t destinationChannel = new FileOutputStream(destination).getChannel();\n\t int maxCount = (64 * 1024 * 1024) - (32 * 1024);// magic number for Windows, 64Mb - 32Kb\n\t long size = sourceChannel.size();\n\t long position = 0;\n\t while (position < size) {\n\t\tposition += sourceChannel.transferTo(position, maxCount, destinationChannel);\n\t }\n\t} catch (IOException e) {\n\t throw e;\n\t} finally {\n\t if (null != sourceChannel) {\n\t\tsourceChannel.close();\n\t }\n\t if (null != destinationChannel) {\n\t\tdestinationChannel.close();\n\t }\n\t}\n }",
"public static void copyFileOrDirectory(String source, String destination) throws KubernetesPluginException {\n File src = new File(source);\n File dst = new File(destination);\n try {\n // if source is file\n if (Files.isRegularFile(Paths.get(source))) {\n if (Files.isDirectory(dst.toPath())) {\n // if destination is directory\n FileUtils.copyFileToDirectory(src, dst);\n } else {\n // if destination is file\n FileUtils.copyFile(src, dst);\n }\n } else if (Files.isDirectory(Paths.get(source))) {\n FileUtils.copyDirectory(src, dst);\n }\n } catch (IOException e) {\n throw new KubernetesPluginException(\"Error while copying file\", e);\n }\n }",
"public static void copyDirectories (File d1, File d2){\n //checks for the console\n System.out.println(\"->Executing copyDirectories\");\n \n if(!d1.isDirectory()){\n //We will search the files and then move them recursive\n copyFyles(d1, d2);\n }//end if directory\n else{\n //Copy d1 to d2, as they are files\n \n //Creating the directory d2 if it does not exist yet.\n if(!d2.exists()){\n d2.mkdir();\n System.out.println(\"Creating directory: \"+d2);\n }//end if creating directori\n \n /* 1. Obtein the list of the existing files in the directory\n 2. Call recursivily this method to copy each of the files \n */\n System.out.println(\"Searching in the directory: \"+d1);\n String files[] = d1.list();\n for(int i=0; i<files.length; i++)\n copyDirectories(new File(d1,files[i]), new File(d2,files[i]));\n System.out.println(\"We copied the files sucesfully\");\n }//end else files\n }",
"public static void copyPaths (Path path1, Path path2){\n // Creating files\n File d1 = path1.toFile();\n File d2 = path2.toFile();\n \n //checks for the console\n System.out.println(\"->Executing copyDirectories\");\n \n if(!d1.isDirectory()){\n //We will search the files and then move them recursive\n copyFyles(d1, d2);\n }//end if directory\n else{\n //Copy d1 to d2, as they are files\n \n //Creating the directory d2 if it does not exist yet.\n if(!d2.exists()){\n d2.mkdir();\n System.out.println(\"Creating directory: \"+d2);\n }//end if creating directori\n \n /* 1. Obtein the list of the existing files in the directory\n 2. Call recursivily this method to copy each of the files \n */\n System.out.println(\"Searching in the directory: \"+d1);\n String files[] = d1.list();\n for(int i=0; i<files.length; i++)\n copyDirectories(new File(d1,files[i]), new File(d2,files[i]));\n System.out.println(\"We copied the files sucesfully\");\n }//end else files\n }",
"void copyFile(String sourceFile, String destinationFile) throws IOException;",
"void copyToBranch(ID sourceBranchId, ID targetBranchId);",
"public static boolean copyFolderContents(String src, String dst, boolean recursive) {\n File srcDirectory = new File(src);\n File dstDirectory = new File(dst);\n if (srcDirectory.exists() && srcDirectory.isDirectory()) {\n if (!dstDirectory.exists()) {\n MessageGenerator.briefError(\"ERROR: Could find destination directory \" + dstDirectory.getAbsolutePath());\n }\n for (File file : srcDirectory.listFiles()) {\n if (!file.isDirectory()) {\n if (!copyFile(file.getAbsolutePath(), dstDirectory.getAbsolutePath())) {\n return false;\n }\n } else if (file.isDirectory() && recursive) {\n if (!copyFolder(file.getAbsolutePath(), dst, true)) {\n MessageGenerator.briefError(\"ERROR: While copying folder \" + file.getAbsolutePath() +\n \" to \" + dst + File.separator + file.getName());\n return false;\n }\n }\n }\n return true;\n }\n MessageGenerator.briefError(\"ERROR: copyFolderContents() - Cannot find directory: \" + src);\n return false;\n }",
"private static boolean backupAndCopyFile(File templateDir, File toDir, String filename) {\n File to = new File(toDir, filename);\n boolean rv = backupFile(to);\n File from = new File(templateDir, filename);\n boolean rv2 = WorkingDir.copyFile(from, to);\n return rv && rv2;\n }",
"private void copyResourcesFromDirectory(ContentCollection directory,\r\n\t String toSite_ref, Map<String, String> documentSecurityMap){\r\n \ttry {\r\n \tList<ContentEntity> members = directory.getMemberResources();\r\n \t for (Iterator<ContentEntity> iMbrs = members.iterator(); iMbrs\r\n \t\t .hasNext();) {\r\n \t\tContentEntity next = (ContentEntity) iMbrs.next();\r\n\r\n \t\tString thisEntityRef = next.getId();\r\n\r\n\r\n \t\t//if this is a directory\r\n \t\tif (\"org.sakaiproject.content.types.folder\".equals(next.getResourceType())){\r\n \t\tContentCollection subdirectory =(ContentCollection) next;\r\n\r\n \t\t\t//we get the new destination directory\r\n \t\tString toSubSite_ref = toSite_ref +\r\n \t\t\tthisEntityRef.substring(directory.getId().lastIndexOf(\"/\") + 1);\r\n\r\n \t\t//we call recursively the same function\r\n \t\tcopyResourcesFromDirectory(subdirectory,\r\n \t\t\ttoSubSite_ref, documentSecurityMap);\r\n \t\t}\r\n \t\telse{\r\n \t\tString permission = documentSecurityMap.get(thisEntityRef);\r\n\r\n \t\t// we copy if doc exists in CO or if it is doc references\r\n \t\tif (permission != null || \"org.sakaiproject.citation.impl.CitationList\".equals(next.getResourceType())) {\r\n \t\t contentHostingService.copyIntoFolder(thisEntityRef,\r\n \t\t\t toSite_ref);\r\n \t\t}\r\n \t\t}\r\n \t }\r\n \t} catch (Exception e) {\r\n \t log.error(\"Unable to copy the resources from directory\", e);\r\n \t}\r\n }",
"public static void copy(String owner, Path src, Path target) throws CWLException {\r\n final Path finalSrc = toFinalSrcPath(src);\r\n if (src.toFile().exists() && Files.isReadable(src)) {\r\n CopyOption[] options = new CopyOption[] {\r\n StandardCopyOption.COPY_ATTRIBUTES,\r\n StandardCopyOption.REPLACE_EXISTING\r\n };\r\n final Path finalTarget = toFinalTargetPath(src, target);\r\n if (!finalTarget.getParent().toFile().exists()) {\r\n logger.debug(\"mkdir \\\"{}\\\"\", finalTarget.getParent());\r\n mkdirs(owner, finalTarget.getParent());\r\n }\r\n logger.debug(\"copy \\\"{}\\\" to \\\"{}\\\"\", finalSrc, finalTarget);\r\n try {\r\n if (finalSrc.toFile().isDirectory()) {\r\n Files.walkFileTree(finalSrc, new FileVisitor<Path>() {\r\n @Override\r\n public FileVisitResult preVisitDirectory(Path dir,\r\n BasicFileAttributes attrs) throws IOException {\r\n Files.copy(dir, finalTarget.resolve(finalSrc.relativize(dir)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\r\n Files.copy(file, finalTarget.resolve(finalSrc.relativize(file)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\r\n throw exc;\r\n }\r\n });\r\n } else {\r\n Files.copy(finalSrc, finalTarget, options);\r\n }\r\n } catch (IOException e) {\r\n throw new CWLException(\r\n ResourceLoader.getMessage(\"cwl.io.copy.failed\",\r\n finalSrc.toString(),\r\n finalTarget.toString(),\r\n e.getMessage()),\r\n 255);\r\n }\r\n } else {\r\n throw new CWLException(ResourceLoader.getMessage(\"cwl.io.file.unaccessed\", finalSrc.toString()),\r\n 255);\r\n }\r\n }",
"public boolean appendFromTo(int from, int to){\n //TODO 04: Die Objekte einer Liste an eine andere anhängen und dabei die erste Liste leeren.\n if (0 <= from && from < allShelves.length && 0 <= to && to < allShelves.length && !allShelves[from].i) {\n List<File> list1 = allShelves[from];\n List<File> list2 = allShelves[to];\n\n list2.concat(list1);\n return true;\n }\n return false;\n }",
"private void copy(File src, File dst) throws IOException \r\n {\r\n InputStream in = new FileInputStream(src);\r\n OutputStream out = new FileOutputStream(dst);\r\n \r\n // Transfer bytes from in to out\r\n byte[] buf = new byte[1024];\r\n int len;\r\n while ((len = in.read(buf)) > 0) \r\n {\r\n out.write(buf, 0, len);\r\n }\r\n in.close();\r\n out.close();\r\n }",
"public static void Copy(File toCopy, File destination) throws IOException {\n\t\tInputStream in = new BufferedInputStream(new FileInputStream(toCopy));\n\t\tOutputStream out = new BufferedOutputStream(new FileOutputStream(destination));\n\n\t\tbyte[] buffer = new byte[1024];\n\t\tint lengthRead;\n\t\twhile ((lengthRead = in.read(buffer)) > 0) {\n\t\t\tout.write(buffer, 0, lengthRead);\n\t\t\tout.flush();\n\t\t}\n\t\tout.close();\n\t\tin.close();\n\t}",
"private void copyFile(String source, String destination) throws IOException {\n File inputFile = new File(source);\n File outputFile = new File(destination);\n\t\n BufferedInputStream in = new BufferedInputStream(\n\t\t\t\t new FileInputStream(inputFile));\n BufferedOutputStream out = new BufferedOutputStream(\n\t\t\t\t new FileOutputStream(outputFile));\n int c;\n\tbyte[] tmp = new byte[4096];\n\t\n while ((c = in.read(tmp, 0, 4096)) != -1)\n\t out.write(tmp, 0, c);\n\t\n in.close();\n out.close();\n }",
"public static final void copy(String source, String destination) {\n File sourceFile = new File(source);\n File destFile = new File(destination);\n\n if (destFile.exists()) {\n // Information error all ready exist the file\n }\n\n if (!sourceFile.exists()) {\n // General Server Error\n }\n\n if (sourceFile.isDirectory()) {\n copyDirectory(source, destination);\n } else {\n copyFile(source, destination);\n }\n\n //delete source folder after copy-paste\n }",
"static void copySubConfig(ServiceConfig from, ServiceConfig to)\n throws SMSException, SSOException {\n Set subConfigNames = from.getSubConfigNames();\n for (Iterator items = subConfigNames.iterator(); items.hasNext();) {\n String subConfigName = (String) items.next();\n ServiceConfig scf = from.getSubConfig(subConfigName);\n to.addSubConfig(subConfigName, scf.getSchemaID(),\n scf.getPriority(), scf.getAttributesWithoutDefaults());\n ServiceConfig sct = to.getSubConfig(subConfigName);\n copySubConfig(scf, sct);\n }\n }",
"public static IStatus copyFile(InputStream in, String to) {\n \t\tOutputStream out = null;\n \t\n \t\ttry {\n \t\t\tout = new FileOutputStream(to);\n \t\n \t\t\tint avail = in.read(buf);\n \t\t\twhile (avail > 0) {\n \t\t\t\tout.write(buf, 0, avail);\n \t\t\t\tavail = in.read(buf);\n \t\t\t}\n \t\t\treturn Status.OK_STATUS;\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t} finally {\n \t\t\ttry {\n \t\t\t\tif (in != null)\n \t\t\t\t\tin.close();\n \t\t\t} catch (Exception ex) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t\ttry {\n \t\t\t\tif (out != null)\n \t\t\t\t\tout.close();\n \t\t\t} catch (Exception ex) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t}\n \t}",
"public static boolean copyFileContent(Path fromFile, Path toFile) {\n try {\n List<String> fileContent = Files.readAllLines(fromFile);\n Files.write(toFile, fileContent);\n } catch (IOException e) {\n return false;\n }\n return true;\n }",
"public void move(int from, int to) {\n // Peek the top element without popping it, to remain in\n // consistent state if push throws an exception\n towers[to].push(towers[from].peek());\n towers[from].pop();\n numMoves++;\n }",
"public static void copyDirectory(File srcDir, File dstDir) throws IOException {\n if (srcDir.isDirectory()) {\n if (!dstDir.exists()) dstDir.mkdir();\n String[] children = srcDir.list();\n for (int i = 0; i < children.length; i++) copyDirectory(new File(srcDir, children[i]), new File(dstDir, children[i]));\n } else {\n copyFile(srcDir, dstDir);\n }\n }",
"void copyFolder(OrionCMContext ctx, Long sourceId, Long targetFolderId, List<SolutionParam> solutions) throws PhoenixDataAccessException, IOException;",
"private static long copy(InputStream from, OutputStream to) throws IOException {\n byte[] buf = new byte[BUFFER];\n long total = 0;\n while (true) {\n int r = from.read(buf);\n if (r == -1) {\n break;\n }\n to.write(buf, 0, r);\n total += r;\n }\n return total;\n }",
"private void moveFilesToDiffDirectory(Path sourcePath, Path destinationPath) {\n try {\n Files.move(sourcePath, destinationPath,\n StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n //moving file failed.\n e.printStackTrace();\n }\n }",
"private void importResourcesIntoSiteMigrate(String toSiteId,\r\n\t String fromSiteId) {\r\n\t// We first get the resources used in co (stored in documentSecurityMap)\r\n\tCOSerialized co =\r\n\t\tosylSiteService\r\n\t\t\t.getUnfusionnedSerializedCourseOutlineBySiteId(fromSiteId);\r\n\tCOModeledServer coModeled = new COModeledServer(co);\r\n\tcoModeled.XML2Model(true);\r\n\tcoModeled.model2XML();\r\n\tco.setContent(coModeled.getSerializedContent());\r\n\r\n\tMap<String, String> documentSecurityMap =\r\n\t\tcoModeled.getDocumentSecurityMap();\r\n\r\n\t// We loop over the resources of the site and copy the referenced ones\r\n\tString valFromSite_ref =\r\n\t\tcontentHostingService.getSiteCollection(fromSiteId);\r\n\tString valToSite_ref =\r\n\t\tcontentHostingService.getSiteCollection(toSiteId);\r\n\tString fromSite_ref =\r\n\t\tcontentHostingService.getReference(valFromSite_ref)\r\n\t\t\t.substring(8);\r\n\tString toSite_ref =\r\n\t\tcontentHostingService.getReference(valToSite_ref).substring(8);\r\n\r\n\tString id_work;\r\n\ttry {\r\n\t id_work = (fromSite_ref);\r\n\t ContentCollection directory =\r\n\t\t contentHostingService.getCollection(id_work);\r\n\r\n\t copyResourcesFromDirectory(directory,\r\n\t\t toSite_ref, documentSecurityMap);\r\n\t} catch (Exception e) {\r\n\t log.error(\"Unable to copy the resources during the site copy\", e);\r\n\t}\r\n }",
"private void copyFile(InputStream ins, OutputStream outs) throws IOException {\n byte[] buffer = new byte[1024];\n int read;\n while((read = ins.read(buffer)) != -1) {\n outs.write(buffer, 0, read);\n }\n }",
"public static void copyAll(File source, File dest, boolean replaceExisting) throws IOException {\n\n Files.walkFileTree(source.toPath(), new FileTreeWalker(FileTreeWalker.Action.COPY,\n source.toPath(), dest.toPath(), replaceExisting));\n\n }",
"public static void copyFile(File src, File dst) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"Source file does not exist: \" + src);\n }\n \n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n try (InputStream in = new FileInputStream(src); OutputStream out = new FileOutputStream(dst)) {\n\n // Transfer bytes from in to out\n byte[] buf = new byte[10240];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n } catch (IOException e) {\n logger.warn(\"Unable to copy file \" + e.getMessage(), e);\n throw new IOException(\"Unable to copy file \", e);\n }\n }",
"static void copyFile(File src, File dest) throws IOException {\r\n\t\tFileInputStream fis = new FileInputStream(src);\r\n\t\tFileOutputStream fos = new FileOutputStream (dest);\r\n\t\tbyte[] bytes = new byte[4*1048576];\r\n\t\tint numRead;\r\n\t\twhile ((numRead = fis.read(bytes)) > 0) {\r\n\t\t\tfos.write(bytes, 0, numRead);\r\n\t\t}\r\n\t\tfis.close();\r\n\t\tfos.close();\r\n\t}",
"@SuppressWarnings(\"resource\")\r\n\tpublic static synchronized void copyFile(File source, File dest)\r\n\t\t\tthrows IOException {\r\n\t\tFileChannel srcChannel = null;\r\n\t\tFileChannel dstChannel = null;\r\n\t\ttry {\r\n\t\t\tsrcChannel = new FileInputStream(source).getChannel();\r\n\t\t\tdstChannel = new FileOutputStream(dest).getChannel();\r\n\t\t\tdstChannel.transferFrom(srcChannel, 0, srcChannel.size());\r\n\t\t} finally {\r\n\t\t\tsrcChannel.close();\r\n\t\t\tdstChannel.close();\r\n\t\t}\r\n\t}",
"public Link(Node from, Node to) {\n\t this.from = from;\n\t this.to = to;\n\t}",
"public static void copy(URL src, File dst) throws IOException {\n\n try (InputStream in = src.openStream()) {\n try (OutputStream out = new FileOutputStream(dst)) {\n dst.mkdirs();\n copy(in, out);\n }\n }\n }",
"public static void copy(final ByteBuffer from, final int fromIndex, final int size, final ByteBuffer dest, final int toIndex) {\n final byte[] buf = new byte[size];\n\n // need an absolute bulk get\n int oldPosition = from.position();\n from.position(fromIndex);\n from.get(buf);\n from.position(oldPosition);\n\n // need an absolute bulk put\n oldPosition = dest.position();\n dest.position(toIndex);\n dest.put(buf);\n dest.position(oldPosition);\n }",
"@Override\n public void copyBlob(BlobId from, BlobId to) {\n BlobInfo toInfo = BlobInfo.newBuilder(to).build();\n CopyWriter w =\n storageProvider\n .get()\n .copy(CopyRequest.newBuilder().setSource(from).setTarget(toInfo).build());\n while (!w.isDone()) {\n w.copyChunk();\n }\n }",
"public void copyDirectory(File sourceLocation, File targetLocation)\r\n\t\t\tthrows IOException {\r\n\r\n\t\tif (sourceLocation.isDirectory()) {\r\n\t\t\tif (!targetLocation.exists()) {\r\n\t\t\t\ttargetLocation.mkdir();\r\n\t\t\t}\r\n\r\n\t\t\tString[] children = sourceLocation.list();\r\n\t\t\tfor (int i = 0; i < children.length; i++) {\r\n\t\t\t\tcopyDirectory(new File(sourceLocation, children[i]), new File(\r\n\t\t\t\t\t\ttargetLocation, children[i]));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tInputStream in = new FileInputStream(sourceLocation);\r\n\t\t\tOutputStream out = new FileOutputStream(targetLocation);\r\n\t\t\t// Copy the bits from instream to outstream\r\n\t\t\tbyte[] buf = new byte[1024];\r\n\t\t\tint len;\r\n\t\t\twhile ((len = in.read(buf)) > 0) {\r\n\t\t\t\tout.write(buf, 0, len);\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\tout.close();\r\n\t\t}\r\n\t}",
"public static boolean moveCopyRoot(String old, String newDir) {\n try {\n if (!readReadWriteFile())\n RootTools.remount(newDir, \"rw\");\n\n execute(\"cp -fr \" + getCommandLineString(old) + \" \"\n + getCommandLineString(newDir));\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n }",
"public Path copie(String source, String destination) throws IOException {\n Path root = Paths.get(source);\n Path cible = Paths.get(destination);\n\n Path copy;\n copy = Files.copy(root, cible.resolve(root.getFileName()), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\n\n return copy;\n }",
"protected Transition addTransitionSteps(Transition transition,\n InternalSystemEntryDelta entryDelta,\n Object fromState,\n Object toState)\n {\n // nothing to do if both states are equal!\n if(LangUtils.isEqual(fromState, toState))\n return transition;\n \n if(fromState == null)\n fromState = StateMachine.NONE;\n \n if(toState == null)\n toState = StateMachine.NONE;\n \n // when no state machine (empty agents) nothing to do...\n StateMachine stateMachine = entryDelta.getStateMachine();\n if(stateMachine == null)\n return transition;\n\n int distance = stateMachine.getDistance(fromState, toState);\n \n @SuppressWarnings(\"unchecked\")\n Collection<Map<String,String>> path =\n (Collection<Map<String,String>>) entryDelta.getStateMachine().findShortestPath(fromState,\n toState);\n for(Map<String, String> p : path)\n {\n Transition newTransition =\n addTransition(entryDelta, p.get(\"action\"), p.get(\"to\"), distance);\n newTransition.executeAfter(transition);\n transition = newTransition;\n }\n \n return transition;\n }",
"public static void copyFile(File src, File dst) throws IOException {\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(dst);\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) out.write(buf, 0, len);\n in.close();\n out.close();\n }",
"@SuppressWarnings(\"All\")\n public <T> void copy(MyList<? super T> to, MyList<? extends T> from) {\n\n System.out.println(\"from size \" + from.size);\n for (int i = 0; i < from.getSize(); i++) {\n to.add(from.getByIndex(i));\n }\n }",
"public static void copyRemoteFiles(String ip, String userName, String password, String sourcePath, String destinationPath) throws Exception {\n\tOutputStream outputStream = null;\n\tFTPClient ftpClient = null;\n\ttry {\n\t File destination = new File(destinationPath);\n\t ftpClient = new FTPClient();\n\t log.info(\"Connecting to ftp...\" + new Timestamp(System.currentTimeMillis()));\n\t ftpClient.connect(ip);\n\t ftpClient.login(userName, password);\n\t FTPFile[] files = ftpClient.listFiles(sourcePath);\n\t if (null != files && files.length > 0) {\n\t\tlog.info(\"Moving files \" + sourcePath + \" to \" + destinationPath + \" started...\" + new Timestamp(System.currentTimeMillis()));\n\t\tfor (FTPFile file : files) {\n\t\t outputStream = new FileOutputStream(new File(destination, file.getName()));\n\t\t String sourceFilePath = sourcePath + file.getName();\n\t\t ftpClient.retrieveFile(sourceFilePath, outputStream);\n\t\t closeOutputStream(outputStream);\n\t\t ftpClient.deleteFile(sourceFilePath);\n\t\t}\n\t\tlog.info(\"Moving files from \" + sourcePath + \" to \" + destinationPath + \" finished...\" + new Timestamp(System.currentTimeMillis()));\n\t } else {\n\t\tlog.info(\"No files found in \" + sourcePath);\n\t }\n\t} catch (Exception e) {\n\t log.info(\"Moving files from \" + sourcePath + \" to \" + destinationPath + \" failed...\" + new Timestamp(System.currentTimeMillis()));\n\t throw e;\n\t} finally {\n\t closeFtp(ftpClient);\n\t closeOutputStream(outputStream);\n\t}\n }",
"@Override\r\n\tpublic void transferItems(Robot from, Robot to)\r\n\t{\r\n\t\tfrom.transferItems(to);\r\n\t}",
"public static void copyDirectory(String destDirStr, String sourceDirStr, boolean mkdirs) throws Exception {\r\n\t\tFile destDir = new File(destDirStr);\r\n\t\tFile sourceDir = new File(sourceDirStr);\r\n\t\tcopyDirectory(destDir, sourceDir, mkdirs);\r\n\t}",
"public static <T,S,V extends Object> void merge(Map<T, HashMap<S, V>> to, Map<T, HashMap<S, V>> from) {\r\n\t\tfor(Entry<T, HashMap<S, V>> entry : from.entrySet()) {\r\n\t\t\tif(to.containsKey(entry.getKey())) {\r\n\t\t\t\tto.get(entry.getKey()).putAll(entry.getValue());\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tto.put(entry.getKey(), entry.getValue());\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void moveDirectory(String source, String target) throws IOException{\n Path sourceFilePath = Paths.get(PWD.getPath()+\"/\"+source);\n Path targetFilePath = Paths.get(PWD.getPath()+\"/\"+target);\n //using builtin move function which uses Paths\n Files.move(sourceFilePath,targetFilePath);\n }",
"public void copyFile(@NonNull File sourceFile, @NonNull File destFile) throws IOException {\n if (!destFile.getParentFile().exists()) {\n if (!destFile.getParentFile().mkdirs())\n Log.e(ConstantVariables.ERR, ConstantVariables.DIR_NOT_CREATED);\n } else {\n Log.e(ConstantVariables.ERR, ConstantVariables.DIR_ALREADY_EXISTS);\n }\n\n if (!destFile.exists()) {\n if (!destFile.createNewFile())\n Log.e(ConstantVariables.ERR, ConstantVariables.FILE_NOT_CREATED);\n } else\n Log.e(ConstantVariables.ERR, ConstantVariables.FILE_ALREADY_EXISTS);\n\n try (\n FileChannel source = new FileInputStream(sourceFile).getChannel();\n FileChannel destination = new FileOutputStream(destFile).getChannel();\n ) {\n destination.transferFrom(source, 0, source.size());\n }\n }",
"public void copyFile(File src, File dst) throws IOException {\n\t\tInputStream in = new FileInputStream(src);\n\t\tOutputStream out = new FileOutputStream(dst);\n\n\t\t// Transfer bytes from in to out\n\t\tbyte[] buf = new byte[1024];\n\t\tint len;\n\t\twhile ((len = in.read(buf)) > 0) {\n\t\t\tif(logger.isDebugEnabled())\n\t\t\t\tlogger.debug(\"Copiando fichero \" + src.getAbsolutePath() + \" a \"\n\t\t\t\t\t+ dst.getAbsolutePath());\n\t\t\tout.write(buf, 0, len);\n\t\t}\n\t\tin.close();\n\t\tout.close();\n\t}",
"private void moveTiles(ArrayList<MahjongSolitaireTile> from, ArrayList<MahjongSolitaireTile> to)\n {\n // GO THROUGH ALL THE TILES, TOP TO BOTTOM\n for (int i = from.size()-1; i >= 0; i--)\n {\n MahjongSolitaireTile tile = from.remove(i);\n \n // ONLY ADD IT IF IT'S NOT THERE ALREADY\n if (!to.contains(tile))\n to.add(tile);\n } \n }",
"public static void copyFileSourceToDestination(File src, File dest) throws IOException {\n\t\tInputStream is = null;\n\t\tOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(src);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\t// buffer size 1K\n\t\t\tbyte[] buf = new byte[1024];\n\t\t\tint bytesRead;\n\t\t\twhile ((bytesRead = is.read(buf)) > 0) {\n\t\t\t\tos.write(buf, 0, bytesRead);\n\t\t\t}\n\t\t} finally {\n\t\t\tis.close();\n\t\t\tos.close();\n\t\t}\n\t}",
"public void copyDirectories(File sourceFolder, File destinationFolder, Transformer<String> targetFileNameTransformer, boolean overwriteExistingFiles, String... fileNamesToIgnore)\n throws IOException {\n if (sourceFolder == null) {\n throw new IllegalArgumentException(\"src may not be null!\");\n }\n if (!sourceFolder.exists()) {\n throw new FileNotFoundException(\"source folder does not exist:\" + sourceFolder);\n }\n if (destinationFolder == null) {\n throw new IllegalArgumentException(\"dest may not be null!\");\n }\n Set<String> fileNamesToIgnoreSet = new HashSet<>();\n if (fileNamesToIgnore != null) {\n for (String fileNameToIgnore : fileNamesToIgnore) {\n if (fileNamesToIgnore == null) {\n continue;\n }\n fileNamesToIgnoreSet.add(fileNameToIgnore);\n }\n }\n copyRecursive(sourceFolder, destinationFolder, targetFileNameTransformer, overwriteExistingFiles, fileNamesToIgnoreSet);\n }",
"public UndirectedEdge(VType from, VType to) {\n\t\t// TODO: Add your code here\n\t\tsuper(from,to);\n\t}",
"public void copyDirectory(File srcDir, File dstDir) throws IOException {\n\t\tif (srcDir.isDirectory()) {\n\t\t\tif (srcDir.getName().startsWith(\".\")) {// Si es un directorio oculto\n\t\t\t\t\t\t\t\t\t\t\t\t\t// no lo copiamos\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Si el directorio no existe\n\t\t\tif (!dstDir.exists()) {\n\t\t\t\tif(logger.isDebugEnabled())\n\t\t\t\t\tlogger.debug(\"El directorio no existe lo creamos. \" + dstDir);\n\t\t\t\tdstDir.mkdirs();\n\t\t\t}\n\n\t\t\tString[] children = srcDir.list();\n\t\t\tfor (int i = 0; i < children.length; i++) {\n\n\t\t\t\tcopyDirectory(new File(srcDir, children[i]), new File(dstDir,\n\t\t\t\t\t\tchildren[i]));\n\n\t\t\t}\n\t\t} else {\n\t\t\t// This method is implemented in e1071 Copying a File\n\t\t\tcopyFile(srcDir, dstDir);\n\t\t}\n\t}",
"@Test\n public void testCdRelativePathOneDeepToMultiDeep() {\n FileTree myTree = new FileTree();\n String[] path1 = {\"directory2\" , \"/directory2/directory3\", \n \"/directory2/directory3/directory4\"};\n try {\n myTree.mkdir(path1);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"The directories could not be made.\");\n }\n try {\n myTree.cd(\"directory2\");\n myTree.cd(\"directory3/directory4\");\n } catch (NotDirectoryException e) {\n fail(\"Could not change to the directory\");\n }\n assertEquals(\"/directory2/directory3/directory4\", myTree.pwd());\n }",
"public boolean copy(File fileToLoadOrig, boolean withDuplicate, List<String> passedFiles) {\n //Let us get the current Date\n Date date = new Date();\n LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n int year = localDate.getYear();\n int month = localDate.getMonthValue();\n int day = localDate.getDayOfMonth();\n\n String destDirectoryPath = year + \"-\" + month + \"-\" + day;\n\n //check if directory is created\n\n File destDirecoty = new File(\"./testing/dest/\" + destDirectoryPath);\n System.out.println(\"the file path:\" + destDirecoty.getAbsolutePath());\n\n if (!destDirecoty.exists()) {\n System.out.println(\"creating a new directory with path:\" + destDirecoty.getAbsolutePath());\n boolean created = destDirecoty.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n System.out.println(\"Directory is created\");\n //Great, now let us check if the file already in the dirctory\n\n\n boolean duplicateFound = false;\n\n\n File[] sourceFiles = fileToLoadOrig.listFiles();\n\n for (File sourceFile : sourceFiles) {\n //let us get the file extension\n String sourceFileType = \"\";\n int location = sourceFile.getName().lastIndexOf('.');\n if (location > 0) {\n sourceFileType = sourceFile.getName().substring(location + 1);\n }\n //cool, let us go on\n String nestedDirectory;\n switch (sourceFileType) {\n case \"txt\":\n nestedDirectory = \"txt\";\n break;\n case \"pdf\":\n nestedDirectory = \"pdf\";\n break;\n case \"xls\":\n nestedDirectory = \"xls\";\n default:\n nestedDirectory = \"others\";\n }\n\n //check if the type directory is created or not\n File nestedDirecotyFile = new File(destDirecoty.getAbsolutePath()+\"/\" + nestedDirectory);\n System.out.println(\"the file path:\" + nestedDirecotyFile.getAbsolutePath());\n\n if (!nestedDirecotyFile.exists()) {\n System.out.println(\"creating a new directory with path:\" + nestedDirecotyFile.getAbsolutePath());\n boolean created = nestedDirecotyFile.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n\n\n\n File[] destinationFiles = nestedDirecotyFile.listFiles();\n\n for (File destinationFile : destinationFiles) {\n if (destinationFile.getName().equals(sourceFile.getName())) {\n if (withDuplicate) {\n int maxSeqNum = 0;\n //Let us find the last sequence of the destinationFile\n for (File fileForDuplicate : destinationFiles) {\n String[] fileParts = fileForDuplicate.getName().split(\"_\");\n if (fileParts.length == 2) {\n //got a split\n if (fileParts[0].equals(destinationFile.getName())) {\n maxSeqNum = Math.max(maxSeqNum, Integer.parseInt(fileParts[1]));\n }\n }else{\n new RuntimeException(\"Files were found with multiple _\");\n }\n }\n String newFilePath = sourceFile.getName() + \"_\" + (maxSeqNum + 1);\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + newFilePath));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n } else {\n // let us delete the destinationFile and replace it\n destinationFile.delete();\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n break;\n } else {\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n }\n\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n\n }\n return true;\n }",
"public static void copyCriteriaNoSelection(CriteriaQuery<?> from, CriteriaQuery<?> to) {\n\n\t// Copy Roots\n\tfor (Root<?> root : from.getRoots()) {\n\t Root<?> dest = to.from(root.getJavaType());\n\t dest.alias(getOrCreateAlias(root));\n\t copyJoins(root, dest);\n\t}\n\n\tto.groupBy(from.getGroupList());\n\tto.distinct(from.isDistinct());\n\tto.having(from.getGroupRestriction());\n\tto.where(from.getRestriction());\n\tto.orderBy(from.getOrderList());\n }",
"public static void appendClonedChildNodes(final Node destinationNode, final Node sourceNode, final boolean deep) {\n\t\tfinal NodeList sourceNodeList = sourceNode.getChildNodes(); //get the list of child nodes\n\t\tfinal int sourceNodeCount = sourceNodeList.getLength(); //find out how many nodes there are\n\t\tfor(int i = 0; i < sourceNodeCount; ++i) { //look at each of the source nodes\n\t\t\tfinal Node sourceChildNode = sourceNodeList.item(i); //get a reference to this child node\n\t\t\tdestinationNode.appendChild(sourceChildNode.cloneNode(deep)); //clone the node and add it to the destination node\n\t\t}\n\t}",
"public Builder toFolder(String toFolder) {\n if (toFolder == null) {\n throw new IllegalArgumentException(\"Illegal toFolder\");\n }\n this.destinationFolder = toFolder;\n return this;\n }",
"public void copyFile(String destination, String fileName, InputStream in) {\r\n try {\r\n // write the inputStream to a FileOutputStream\r\n OutputStream out = new FileOutputStream(new File(destination + fileName));\r\n int read = 0;\r\n byte[] bytes = new byte[1024];\r\n while ((read = in.read(bytes)) != -1) {\r\n out.write(bytes, 0, read);\r\n }\r\n in.close();\r\n out.flush();\r\n out.close();\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }",
"public boolean copyTo( final String _dest )\n\t{\n\t\tfinal FileStream destination = GlobalFileSystem.getFile( new File( _dest ).getParent() ) ;\n\t\tif( destination.exists() == false && destination.mkdirs() == false )\n\t\t{\n\t\t\tSystem.out.println( \"Failed to create directories.\" ) ;\n\t\t\treturn false ;\n\t\t}\n\n\t\tfinal FileStream stream = GlobalFileSystem.getFile( _dest ) ;\n\t\tif( stream == null )\n\t\t{\n\t\t\tSystem.out.println( \"Unable to acquire file stream for: \" + _dest ) ;\n\t\t\treturn false ;\n\t\t}\n\n\t\ttry( final ByteInStream in = getByteInStream() ;\n\t\t\t final ByteOutStream out = stream.getByteOutStream() )\n\t\t{\n\t\t\tif( out == null )\n\t\t\t{\n\t\t\t\treturn false ;\n\t\t\t}\n\n\t\t\tint length = 0 ;\n\t\t\tfinal byte[] buffer = new byte[48] ;\n\n\t\t\twhile( ( length = in.readBytes( buffer, 0, buffer.length ) ) > 0 )\n\t\t\t{\n\t\t\t\tout.writeBytes( buffer, 0, length ) ;\n\t\t\t}\n\n\t\t\treturn true ;\n\t\t}\n\t\tcatch( Exception ex )\n\t\t{\n\t\t\treturn false ;\n\t\t}\n\t}",
"public static boolean copyFolder(String srcDirectoryPath, String dstDirectoryPath, boolean recursive) {\n File srcDirectory = new File(srcDirectoryPath);\n File dstDirectory = new File(dstDirectoryPath + File.separator + srcDirectory.getName());\n if (srcDirectory.exists() && srcDirectory.isDirectory()) {\n if (!dstDirectory.exists()) {\n dstDirectory.mkdirs();\n }\n for (File file : srcDirectory.listFiles()) {\n if (!file.isDirectory()) {\n if (!copyFile(file.getAbsolutePath(), dstDirectory.getAbsolutePath() + File.separator + file.getName())) {\n return false;\n }\n } else if (file.isDirectory() && recursive) {\n if (!copyFolder(file.getAbsolutePath(), dstDirectory.getAbsolutePath(), true)) {\n return false;\n }\n }\n\n }\n return true;\n }\n MessageGenerator.briefError(\"ERROR: copyFolder() - Cannot find directory: \" + srcDirectoryPath);\n return false;\n }",
"public static void assign(Object to, Object from) {\n List<Method> getMethods = new ArrayList<>();\n List<Method> setMethods = new ArrayList<>();\n\n for (Method method: from.getClass().getMethods()) {//заполняем getMethods getter-ами\n if(isGetter(method)) {\n getMethods.add(method);\n }\n }\n\n for (Method method: to.getClass().getMethods()) {//заполняем getMethods setter-ами\n if(isSetter(method)) {\n setMethods.add(method);\n }\n }\n\n for (Method setMethod: setMethods) {\n String setMethodName = setMethod.getName().substring(3);\n for (Method getMethod: getMethods) {\n if (setMethodName.equals(getMethod.getName().substring(3)) &&\n CompareTypes(setMethod.getParameterTypes()[0], getMethod.getReturnType())) {\n try {\n setMethod.invoke(to, getMethod.invoke(from));\n } catch (Exception e) {\n System.out.println(e);\n }\n break;\n }\n }\n }\n }",
"public void copy(String name, String oldPath, String newPath);",
"Path getPathFromNodeTo(Node destination);",
"public static void copyFile(File sourceFile, File destFile)\n throws IOException {\n if (!destFile.exists()) {\n destFile.createNewFile();\n }\n FileChannel source = null;\n FileChannel destination = null;\n try {\n source = new FileInputStream(sourceFile).getChannel();\n destination = new FileOutputStream(destFile).getChannel();\n destination.transferFrom(source, 0, source.size());\n } catch (Exception e) {} finally {\n if (source != null) {\n source.close();\n }\n if (destination != null) {\n destination.close();\n }\n }\n }",
"private void copyFile(String source, String destination, Environment env) throws IOException, InvalidPathException {\n\t\tPath sourcePath = Paths.get(source);\n\t\tPath destinationPath = Paths.get(destination);\n\n\t\tif (sourcePath.equals(destinationPath)) {\n\t\t\tenv.writeln(\"The source and the destination can not be equal.\");\n\t\t\treturn;\n\t\t}\n\t\tif (!Files.exists(sourcePath)) {\n\t\t\tenv.writeln(\"The specified file does not exist.\");\n\t\t\treturn;\n\t\t}\n\t\tif (Files.isDirectory(sourcePath)) {\n\t\t\tenv.writeln(\"Copy command can not copy a directory.\");\n\t\t\treturn;\n\t\t}\n\t\tif (Files.isDirectory(destinationPath)) {\n\t\t\tdestinationPath = Paths.get(destinationPath.toString(), sourcePath.getFileName().toString());\n\t\t}\n\t\tif (Files.exists(destinationPath)) {\n\t\t\tenv.write(\n\t\t\t\t\t\"There already is a file with the same name at the specified destination. \\nDo you want to overwrite it? [y/n] \");\n\n\t\t\twhile (true) {\n\t\t\t\tString answer;\n\t\t\t\ttry {\n\t\t\t\t\tanswer = env.readLine().trim();\n\t\t\t\t} catch (ShellIOException ex) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (answer.equals(\"n\")) {\n\t\t\t\t\tenv.writeln(\"Operation canceled.\");\n\t\t\t\t\treturn;\n\t\t\t\t} else if (answer.equals(\"y\")) {\n\t\t\t\t\tenv.writeln(\"Operation confirmed.\");\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tenv.writeln(\"Invalid answer. Answer 'y' for 'yes' or 'n' for 'no'.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tBufferedInputStream inputStream = new BufferedInputStream(Files.newInputStream(sourcePath));\n\t\tBufferedOutputStream outputStream = new BufferedOutputStream(Files.newOutputStream(destinationPath));\n\t\twhile (true) {\n\t\t\tint b = inputStream.read();\n\t\t\tif (b == -1) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\toutputStream.write(b);\n\t\t}\n\n\t\tinputStream.close();\n\t\toutputStream.close();\n\t}",
"private void copyFile( final File source, final File target )\n throws MojoExecutionException\n {\n if ( source.exists() == false )\n {\n throw new MojoExecutionException( \"Source file '\" + source.getAbsolutePath() + \"' does not exist!\" );\n }\n if ( target.exists() == true )\n {\n throw new MojoExecutionException( \"Target file '\" + source.getAbsolutePath() + \"' already existing!\" );\n }\n\n try\n {\n this.logger.debug( \"Copying file from '\" + source.getAbsolutePath() + \"' to \" + \"'\"\n + target.getAbsolutePath() + \"'.\" );\n PtFileUtil.copyFile( source, target );\n }\n catch ( PtException e )\n {\n throw new MojoExecutionException( \"Could not copy file from '\" + source.getAbsolutePath() + \"' to \" + \"'\"\n + target.getAbsolutePath() + \"'!\", e );\n }\n }",
"public Array<T> copyOfRange(int from, int to)\n {\n assert to >= from;\n\n Array<T> out = Array.ofSize(to - from);\n out.copyFrom(this, from, 0, to - from);\n return out;\n }"
] |
[
"0.70327765",
"0.690213",
"0.68688947",
"0.6804266",
"0.65068424",
"0.6405091",
"0.63975483",
"0.6121372",
"0.60873413",
"0.6084764",
"0.59327704",
"0.5835516",
"0.5670306",
"0.56466717",
"0.5629168",
"0.5463019",
"0.5370012",
"0.5361035",
"0.5349899",
"0.53447807",
"0.5341301",
"0.5326881",
"0.52976596",
"0.52823365",
"0.52499187",
"0.5224453",
"0.52231634",
"0.52041864",
"0.5192603",
"0.51728994",
"0.50917786",
"0.5064629",
"0.50314134",
"0.50189865",
"0.50009465",
"0.4990658",
"0.49822396",
"0.49819034",
"0.49734947",
"0.49671805",
"0.4949813",
"0.4916495",
"0.49122056",
"0.49077135",
"0.49007127",
"0.487449",
"0.48448116",
"0.4841512",
"0.48000053",
"0.4773035",
"0.4770999",
"0.47707975",
"0.47595552",
"0.47471568",
"0.47260377",
"0.4723822",
"0.46737373",
"0.46714953",
"0.466182",
"0.4660591",
"0.4659678",
"0.46305686",
"0.4619028",
"0.4618163",
"0.4612391",
"0.4610818",
"0.46011594",
"0.45781183",
"0.4556703",
"0.45278758",
"0.45110747",
"0.44893283",
"0.44832885",
"0.447185",
"0.44684494",
"0.4467109",
"0.44523427",
"0.44474375",
"0.4426549",
"0.44242114",
"0.4420844",
"0.44098634",
"0.43897602",
"0.4387778",
"0.43855467",
"0.4378564",
"0.43767077",
"0.4373572",
"0.43705302",
"0.43653762",
"0.43551266",
"0.4341745",
"0.43401265",
"0.43393746",
"0.43392712",
"0.43335673",
"0.4327503",
"0.43180946",
"0.431163",
"0.4306575"
] |
0.6980775
|
1
|
Copy files or directories from 'from' to 'to'. Recursively descends if 'from' is a directory. Does not create 'from' tail directory in 'to', e.g.: from = c:/foo/bar contains a,b,c to = c:/temp > c:/temp/a c:/temp/b c:/temp/c
|
public static void copyTreeNoParent(File from, File to, FileFilter filter) throws IOException {
File[] files;
Check.checkArg(from.isDirectory());
files = from.listFiles(filter);
to.mkdirs();
for (int i = 0; i < files.length; i++) {
if (files[i].isDirectory()) {
//File curto = new File(to, files[i].getName());
//curto.mkdirs();
copyTree(files[i], to, filter);
}
else {
File curto = new File(to, files[i].getName());
copyFile(files[i], curto);
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static void copyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] files = fromDir.listFiles();\n \t\n \t\t\ttoDir.mkdir();\n \t\n \t\t\t// cycle through files\n \t\t\tint size = files.length;\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), size * 50);\n \t\n \t\t\tfor (int i = 0; i < size; i++) {\n \t\t\t\tFile current = files[i];\n \t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\tString toFile = to;\n \t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\ttoFile += File.separator;\n \t\t\t\ttoFile += current.getName();\n \t\t\t\tif (current.isFile()) {\n \t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\tmonitor.worked(50);\n \t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\tcopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, 50));\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying directory\", e);\n \t\t}\n \t}",
"public static void copyTree(File from, File to, FileFilter filter) throws IOException {\r\n File[] children;\r\n \r\n \tif (!from.exists()) {\r\n \t\tthrow new IOException (\"Source of copy \\'\" + from.getName() + \"\\' doesn't exist\");\r\n \t}\r\n \t\r\n \tif (to.getCanonicalPath().equals(from.getCanonicalPath())) {\r\n \t\tthrow new IOException (\"\\'\" + from.getName() + \"\\' cannot copy to itself\");\r\n \t}\r\n\r\n if (from.isDirectory()) {\r\n children = from.listFiles(filter);\r\n // just like cp command, if target exist, make a new folder into\r\n // the target, copy content into the target folder\r\n if (to.exists()) {\r\n \tif (to.isFile()) {\r\n \t\tthrow new IOException(\"Cannot overwrite non-directory \\'\" + to.getName() + \"\\' with directory \" + from.getName());\r\n \t}\r\n \t// copy into new directory name grafted after the existing one\r\n \tto = new File(to, from.getName());\r\n \tcopyTree(from, to, filter);\r\n \treturn;\r\n } else {\r\n \t// copy into new directory name\r\n \tto.mkdir(); \t\r\n for (int i = 0; i < children.length; i++) {\r\n File curto = new File(to, children[i].getName());\r\n \r\n copyTree(children[i], curto, filter);\r\n }\r\n return;\r\n }\r\n }\r\n else {\r\n \tif (to.isDirectory()) {\r\n \t\tto = new File (to, from.getName());\r\n \t}\r\n copyFile(from, to);\r\n return;\r\n }\r\n \r\n }",
"private static boolean copyDirectory(File from, File to)\n {\n return copyDirectory(from, to, (byte[])null);\n }",
"public static void smartCopyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] fromFiles = fromDir.listFiles();\n \t\t\tint fromSize = fromFiles.length;\n \t\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), 550);\n \t\n \t\t\tFile[] toFiles = null;\n \t\n \t\t\t// delete old files and directories from this directory\n \t\t\tif (toDir.exists() && toDir.isDirectory()) {\n \t\t\t\ttoFiles = toDir.listFiles();\n \t\t\t\tint toSize = toFiles.length;\n \t\n \t\t\t\t// check if this exact file exists in the new directory\n \t\t\t\tfor (int i = 0; i < toSize; i++) {\n \t\t\t\t\tString name = toFiles[i].getName();\n \t\t\t\t\tboolean isDir = toFiles[i].isDirectory();\n \t\t\t\t\tboolean found = false;\n \t\t\t\t\tfor (int j = 0; j < fromSize; j++) {\n \t\t\t\t\t\tif (name.equals(fromFiles[j].getName()) && isDir == fromFiles[j].isDirectory())\n \t\t\t\t\t\t\tfound = true;\n \t\t\t\t\t}\n \t\n \t\t\t\t\t// delete file if it can't be found or isn't the correct type\n \t\t\t\t\tif (!found) {\n \t\t\t\t\t\tif (isDir)\n \t\t\t\t\t\t\tPublishUtil.deleteDirectory(toFiles[i], null);\n \t\t\t\t\t\telse\n \t\t\t\t\t\t\ttoFiles[i].delete();\n \t\t\t\t\t}\n \t\t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tif (toDir.isFile())\n \t\t\t\t\ttoDir.delete();\n \t\t\t\ttoDir.mkdir();\n \t\t\t}\n \t\t\tmonitor.worked(50);\n \t\n \t\t\t// cycle through files and only copy when it doesn't exist\n \t\t\t// or is newer\n \t\t\ttoFiles = toDir.listFiles();\n \t\t\tint toSize = toFiles.length;\n \t\t\tint dw = 0;\n \t\t\tif (toSize > 0)\n \t\t\t\tdw = 500 / toSize;\n \t\n \t\t\tfor (int i = 0; i < fromSize; i++) {\n \t\t\t\tFile current = fromFiles[i];\n \t\n \t\t\t\t// check if this is a new or newer file\n \t\t\t\tboolean copy = true;\n \t\t\t\tif (!current.isDirectory()) {\n \t\t\t\t\tString name = current.getName();\n \t\t\t\t\tlong mod = current.lastModified();\n \t\t\t\t\tfor (int j = 0; j < toSize; j++) {\n \t\t\t\t\t\tif (name.equals(toFiles[j].getName()) && mod <= toFiles[j].lastModified())\n \t\t\t\t\t\t\tcopy = false;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\n \t\t\t\tif (copy) {\n \t\t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\t\tString toFile = to;\n \t\t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\t\ttoFile += File.separator;\n \t\t\t\t\ttoFile += current.getName();\n \t\t\t\t\tif (current.isFile()) {\n \t\t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\t\tmonitor.worked(dw);\n \t\t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\t\tsmartCopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, dw));\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.worked(500 - dw * toSize);\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error smart copying directory \" + from + \" - \" + to, e);\n \t\t}\n \t}",
"public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from); // set path of source directory from parent function\r\n Path dest = Paths.get(to); // set path of destination directory from parent function\r\n Files.copy(src, dest); //inbuilt function to copy files\r\n \r\n }",
"private static void copyFile(String from, String to)\n\t{\n\t\tFile inputFile;\n\t File outputFile;\n\t\tint fIndex = from.indexOf(\"file:\");\n\t\tint tIndex = to.indexOf(\"file:\");\n\t\tif(fIndex < 0)\n\t\t\tinputFile = new File(from);\n\t\telse\n\t\t\tinputFile = new File(from.substring(fIndex + 5, from.length()));\n\t\tif(tIndex < 0)\n\t\t\toutputFile = new File(to);\n\t\telse\n\t\t\toutputFile = new File(to.substring(tIndex + 5, to.length())); \n\t\tcopyFile(inputFile, outputFile);\t\t\n\t}",
"public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from);\r\n Path dest = Paths.get(to);\r\n Files.copy(src, dest, StandardCopyOption.REPLACE_EXISTING);\r\n }",
"public static void copyFile(final File from, final File toDir) throws IOException {\n if (!from.canRead()) {\n throw new IOException(\"Cannot read file '\" + from + \"'.\");\n }\n if (toDir.exists() && (!toDir.canWrite())) {\n throw new IOException(\"Cannot write to file '\" + toDir + \"'.\");\n }\n toDir.getParentFile().mkdirs();\n FileUtils.copyFile(from, toDir);\n }",
"public static void copyFile(final String fromPath, final String toPath) throws IOException {\n FileUtils.copyFileToDirectory(new File(fromPath), new File(toPath));\n }",
"public static void copyFile(File from, File to) throws IOException {\r\n FileInputStream in = new FileInputStream(from);\r\n copyFile(in, to);\r\n }",
"public void copyOne(String from, String to) {\n\t\tFile source = new File(from);\n\t\tif (sourceExists(source)) {\n\t\t\tFile target = new File(to);\n\t\t\ttry{\n\t\t\t\tif(!targetExists(target)){\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath());\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName()\n\t\t\t\t\t\t\t+ \" COPIED!\");\n\t\t\t\t} else if (target.exists() && confirmReplace()) {\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath(),\n\t\t\t\t\t\t\tREPLACE_EXISTING);\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName() + \" REPLACED!\");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"File WASN'T copied!\");\n\t\t\t\t}\n\t\t\t}catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public static IStatus copyFile(String from, String to) {\n \t\ttry {\n \t\t\treturn copyFile(new FileInputStream(from), to);\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t}\n \t}",
"private int copy(String from, String to, int flag) {\n\n File fromFile = new File(rootPath + from);\n if (!fromFile.exists()) {\n return ERROR_FILE_NOT_EXIST;\n }\n\n if ((flag & FLAG_FORCE) != 0) {\n delete(to);\n }\n\n if (createFile(to) < 0) {\n return ERROR_FILE_ALREADY_EXIST;\n }\n\n File toFile = new File(rootPath + to);\n if (!toFile.setWritable(true)) {\n return ERROR;\n }\n\n try {\n BufferedInputStream inputStream = new BufferedInputStream(new FileInputStream(fromFile));\n BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(toFile));\n byte[] buf = new byte[BUF_SIZE];\n // TODO : it limits file size to INTEGER!!\n int offset = 0;\n int read = 0;\n while((read = inputStream.read(buf)) >= 0) {\n outputStream.write(buf, offset, read);\n offset += read;\n }\n inputStream.close();\n outputStream.close();\n } catch (FileNotFoundException e) {\n // file not found\n return ERROR_FILE_NOT_EXIST;\n } catch (IOException e) {\n // IO Exception\n return ERROR;\n }\n\n return OK;\n }",
"private void copyFolder(File sourceFolder, File destinationFolder) throws IOException {\n //Check if sourceFolder is a directory or file\n //If sourceFolder is file; then copy the file directly to new location\n if (sourceFolder.isDirectory()) {\n //Verify if destinationFolder is already present; If not then create it\n if (!destinationFolder.exists()) {\n destinationFolder.mkdir();\n logAppend(\"Directory created :: \" + destinationFolder);\n nothingDone=false;\n }\n\n //Get all files from source directory\n String files[] = sourceFolder.list();\n\n //Iterate over all files and copy them to destinationFolder one by one\n for (String file : files) {\n\n File srcFile = new File(sourceFolder, file);\n File destFile = new File(destinationFolder, file);\n\n //Recursive function call\n copyFolder(srcFile, destFile);\n }\n } else {\n\n long dateSrc = sourceFolder.lastModified();\n long dateDest = destinationFolder.lastModified();\n\n if (dateSrc > dateDest) {\n //Copy the file content from one place to another\n Files.copy(sourceFolder.toPath(), destinationFolder.toPath(), StandardCopyOption.REPLACE_EXISTING);\n logAppend(\"File copied :: \" + destinationFolder);\n nothingDone=false;\n }\n\n }\n }",
"public static void copyFolder(File src, File dest) throws IOException {\n\n\t\tif (src.isDirectory()) {\n\n\t\t\t// if directory not exists, create it\n\t\t\tif (!dest.exists()) {\n\t\t\t\tdest.mkdir();\n\t\t\t\t// System.out.println(\"Directory copied from \" + src + \" to \" +\n\t\t\t\t// dest);\n\t\t\t}\n\n\t\t\t// list all the directory contents\n\t\t\tString files[] = src.list();\n\n\t\t\tfor (String file : files) {\n\t\t\t\t// construct the src and dest file structure\n\t\t\t\tFile srcFile = new File(src, file);\n\t\t\t\tFile destFile = new File(dest, file);\n\t\t\t\t// recursive copy\n\t\t\t\tcopyFolder(srcFile, destFile);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// if file, then copy it\n\t\t\t// Use bytes stream to support all file types\n\t\t\tInputStream in = new FileInputStream(src);\n\t\t\tOutputStream out = new FileOutputStream(dest);\n\n\t\t\tbyte[] buffer = new byte[1024];\n\n\t\t\tint length;\n\t\t\t// copy the file content in bytes\n\t\t\twhile ((length = in.read(buffer)) > 0) {\n\t\t\t\tout.write(buffer, 0, length);\n\t\t\t}\n\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\t// System.out.println(\"File copied from \" + src + \" to \" + dest);\n\t\t}\n\t}",
"private static void copyFiles(File source, File dest) throws IOException {\n\t\tif(!source.equals(dest))\n\t\t\tFileUtils.copyFile(source, dest);\n\t}",
"public static void copyFiles(File src, File dest) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"copyFiles: Can not find source: \" + src.getAbsolutePath() + \".\");\n } else if (!src.canRead()) { //check to ensure we have rights to the source...\n throw new IOException(\"copyFiles: No right to source: \" + src.getAbsolutePath() + \".\");\n }\n //is this a directory copy?\n if (src.isDirectory()) {\n if (!dest.exists()) { //does the destination already exist?\n //if not we need to make it exist if possible (note this is mkdirs not mkdir)\n if (!dest.mkdirs()) {\n throw new IOException(\"copyFiles: Could not create direcotry: \" + dest.getAbsolutePath() + \".\");\n }\n }\n //get a listing of files...\n String list[] = src.list();\n //copy all the files in the list.\n for (int i = 0; i < list.length; i++) {\n File dest1 = new File(dest, list[i]);\n File src1 = new File(src, list[i]);\n copyFiles(src1, dest1);\n }\n } else {\n //This was not a directory, so lets just copy the file\n try {\n copy(new FileInputStream(src), new FileOutputStream(dest));\n } catch (IOException e) { //Error copying file...\n IOException wrapper = new IOException(\"copyFiles: Unable to copy file: \"\n + src.getAbsolutePath() + \"to\" + dest.getAbsolutePath() + \".\");\n wrapper.initCause(e);\n wrapper.setStackTrace(e.getStackTrace());\n throw wrapper;\n }\n }\n }",
"private void streamCopy(InputStream from, OutputStream to) {\r\n\t\ttry {\r\n\t\t\tint count = 0;\r\n\t\t\tbyte[] buffer = new byte[16*1024];\r\n\t\t\twhile ((count = from.read(buffer)) > 0) {\r\n\t\t\t\tto.write(buffer, 0, count);\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\tEventLogger.logConnectionException(logger, socket, e);\r\n\t\t}\r\n\t}",
"public static void copyAll(File root, File dest) throws IOException {\n if(root.isDirectory()){\n for(File child : root.listFiles()){\n File childDest = new File(dest, child.getName());\n if(child.isDirectory()){\n if(!childDest.exists() && !childDest.mkdirs())\n throw new IOException(\"Failed to create dir \"+childDest.getPath());\n copyAll(child, childDest);\n }else{\n Files.copy(child.toPath(), childDest.toPath(), StandardCopyOption.COPY_ATTRIBUTES);\n }\n }\n }else{\n File childDest = new File(dest, root.getName());\n if(!dest.exists() && !dest.mkdirs())\n throw new IOException(\"Failed to create dir \"+dest.getPath());\n Files.copy(root.toPath(), childDest.toPath(), StandardCopyOption.COPY_ATTRIBUTES);\n }\n }",
"public static void copyDirectory(File destDir, File sourceDir, boolean mkdirs) throws Exception {\r\n\t\tif (!destDir.exists() && !destDir.isDirectory()) {\r\n\t\t\tif (mkdirs) destDir.mkdirs();\r\n\t\t\telse return;\r\n\t\t}\r\n\t\tFile[] containedFiles = sourceDir.listFiles();\r\n\t\tfor (int i = 0; i < containedFiles.length; i++) {\r\n\t\t\tFile aFile = containedFiles[i];\r\n\t\t\tif (aFile.isFile()) copy(destDir, aFile);\r\n\t\t\telse {\r\n\t\t\t\tString dirName = aFile.getName();\r\n\t\t\t\tFile newDir = new File(destDir.getAbsolutePath() + File.separatorChar + dirName);\r\n\t\t\t\tcopyDirectory(newDir, aFile, mkdirs);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static <T> void drain(Stack<T> from, Stack<T> to) {\n while (!from.isEmpty()) {\n to.push(from.pop());\n }\n }",
"public static void copyPath(Path source, Path target) {\n try {\n Files.copy(source, target);\n if (Files.isDirectory(source)) {\n try (Stream<Path> files = Files.list(source)) {\n files.forEach(p -> copyPath(p, target.resolve(p.getFileName())));\n }\n }\n } catch (IOException e) { e.printStackTrace(); }\n }",
"public static void copyFolder(final String sourcePath, final String targetPath)\n\t{\n\t\tFile tfile = new File(targetPath);\n\t\ttfile.mkdirs();\n\t\tFile sfile = new File(sourcePath);\n\t\tfinal FilenameFilter ffilter = new FilenameFilter()\n\t\t{\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean accept(File dir, String name)\n\t\t\t{\n\t\t\t\tif( name.startsWith(\".svn\"))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tFile[] files = sfile.listFiles(ffilter);\n\t\t\n\t\tArrayList <File> cpFile = new ArrayList<File>();\n\t\tfor( int i=0;i<files.length;i++)\n\t\t{\n\t\t\tfinal File souFile = files[i];\n\t\t\tif( souFile.isDirectory())\n\t\t\t{\n\t\t\t\tfinal String souPath = souFile.getAbsolutePath();\n\t\t\t\tfinal String tarpath = targetPath + File.separator + souFile.getName();\n\t\t\t\ttraverseDir(souPath, ffilter, new IOnGetFileHandler()\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handle(File file)\n\t\t\t\t\t{\n//\t\t\t\t\t\tcopyFile(file.getAbsolutePath(), tarpath +File.separator + file.getName());\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}, new IOnGetFileHandler()\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void handle(File file)\n\t\t\t\t\t{\n\t\t\t\t\t\tcopyFolder(file.getAbsolutePath(), tarpath);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}, null);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcpFile.add(souFile);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tcopyFiles(targetPath, cpFile);\n\t\t\n\t\t\n\t}",
"public static void copyFile(final String fileName, final String fromDir, final String toDir)\n throws IOException {\n FileUtils.copyFile(new File(fromDir, fileName), new File(toDir, fileName));\n }",
"public static IStatus copyFile(URL from, String to) {\n \t\ttry {\n \t\t\treturn copyFile(from.openStream(), to);\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t}\n \t}",
"public static void copyFolder(File sourceFolder, File destinationFolder) throws IOException {\n System.out.println(sourceFolder.toString());\n System.out.println(destinationFolder.toString());\n if (sourceFolder.isDirectory()) {\n //Verify if destinationFolder is already present; If not then create it\n if (!destinationFolder.exists()) {\n destinationFolder.mkdir();\n //System.out.println(\"Directory created :: \" + destinationFolder); // debug\n }\n\n //Get all files from source directory\n String files[] = sourceFolder.list();\n\n //Iterate over all files and copy them to destinationFolder one by one\n for (String file : files) {\n File srcFile = new File(sourceFolder, file);\n File destFile = new File(destinationFolder, file);\n\n //Recursive function call\n copyFolder(srcFile, destFile);\n }\n } else {\n Files.copy(\n sourceFolder.toPath(), destinationFolder.toPath(), StandardCopyOption.REPLACE_EXISTING);\n //System.out.println(\"File copied :: \" + destinationFolder); // debug\n }\n }",
"public static void copyFile(InputStream in, File to) throws IOException {\r\n FileOutputStream out = new FileOutputStream(to);\r\n int len;\r\n byte[] buffer = new byte[4096];\r\n while ((len = in.read(buffer)) != -1) {\r\n out.write(buffer, 0, len);\r\n }\r\n out.close();\r\n in.close();\r\n }",
"public static long copyFile(File source, File dest) throws IOException {\n\n\t\tif (source.isDirectory() || dest.isDirectory())\n\t\t\tthrow new IOException(\"wont copy directories\");\n\t\tInputStream i = null;\n\t\ttry {\n\t\t\ti = getInputStreamFromFile(source);\n\n\t\t\t// create parent directories\n\t\t\tif (dest.getParentFile().mkdirs()) {\n\t\t\t\t// all good\n\t\t\t} else\n\t\t\t\tthrow new IOException(\"\\\"\" + dest + \"\\\" cannot be created\");\n\t\t\treturn writeStreamToFile(i, dest);\n\n\t\t} finally {\n\t\t\tif (i != null)\n\t\t\t\ti.close();\n\t\t}\n\t}",
"public static void copyPaths (Path path1, Path path2){\n // Creating files\n File d1 = path1.toFile();\n File d2 = path2.toFile();\n \n //checks for the console\n System.out.println(\"->Executing copyDirectories\");\n \n if(!d1.isDirectory()){\n //We will search the files and then move them recursive\n copyFyles(d1, d2);\n }//end if directory\n else{\n //Copy d1 to d2, as they are files\n \n //Creating the directory d2 if it does not exist yet.\n if(!d2.exists()){\n d2.mkdir();\n System.out.println(\"Creating directory: \"+d2);\n }//end if creating directori\n \n /* 1. Obtein the list of the existing files in the directory\n 2. Call recursivily this method to copy each of the files \n */\n System.out.println(\"Searching in the directory: \"+d1);\n String files[] = d1.list();\n for(int i=0; i<files.length; i++)\n copyDirectories(new File(d1,files[i]), new File(d2,files[i]));\n System.out.println(\"We copied the files sucesfully\");\n }//end else files\n }",
"public static void shift(RandomAccessFile file, long from, long to) throws IOException {\n long total = file.length();\n if (from < 0 || from >= total || to < 0)\n throw new IOException();\n else if (from == to) {\n file.seek(0);\n return;\n }\n final byte buf[] = new byte[4096];\n int res;\n if (from > to) {\n while (true) {\n file.seek(from);\n if ((res = file.read(buf)) <= 0) {\n file.setLength(to);\n file.seek(0);\n return;\n }\n file.seek(to);\n file.write(buf, 0, res);\n from = from + res;\n to = to + res;\n }\n } else {\n file.seek(total);\n for (long todo = to - from; todo > 0;) {\n if (todo >= buf.length) {\n file.write(buf);\n todo = todo - buf.length;\n } else {\n file.write(buf, 0, (int) todo);\n break;\n }\n }\n for (long todo = total - from; todo > 0; total = total - res, todo = todo - res) {\n if (todo > buf.length)\n res = buf.length;\n else\n res = (int) todo;\n file.seek(total - res);\n for (int done = 0; done < res;) {\n int r = file.read(buf, done, res - done);\n if (r <= 0)\n throw new IOException();\n else\n done += r;\n }\n file.seek(total - res + (to - from));\n file.write(buf, 0, res);\n }\n }\n file.seek(0);\n }",
"private void copyResourcesFromDirectory(ContentCollection directory,\r\n\t String toSite_ref, Map<String, String> documentSecurityMap){\r\n \ttry {\r\n \tList<ContentEntity> members = directory.getMemberResources();\r\n \t for (Iterator<ContentEntity> iMbrs = members.iterator(); iMbrs\r\n \t\t .hasNext();) {\r\n \t\tContentEntity next = (ContentEntity) iMbrs.next();\r\n\r\n \t\tString thisEntityRef = next.getId();\r\n\r\n\r\n \t\t//if this is a directory\r\n \t\tif (\"org.sakaiproject.content.types.folder\".equals(next.getResourceType())){\r\n \t\tContentCollection subdirectory =(ContentCollection) next;\r\n\r\n \t\t\t//we get the new destination directory\r\n \t\tString toSubSite_ref = toSite_ref +\r\n \t\t\tthisEntityRef.substring(directory.getId().lastIndexOf(\"/\") + 1);\r\n\r\n \t\t//we call recursively the same function\r\n \t\tcopyResourcesFromDirectory(subdirectory,\r\n \t\t\ttoSubSite_ref, documentSecurityMap);\r\n \t\t}\r\n \t\telse{\r\n \t\tString permission = documentSecurityMap.get(thisEntityRef);\r\n\r\n \t\t// we copy if doc exists in CO or if it is doc references\r\n \t\tif (permission != null || \"org.sakaiproject.citation.impl.CitationList\".equals(next.getResourceType())) {\r\n \t\t contentHostingService.copyIntoFolder(thisEntityRef,\r\n \t\t\t toSite_ref);\r\n \t\t}\r\n \t\t}\r\n \t }\r\n \t} catch (Exception e) {\r\n \t log.error(\"Unable to copy the resources from directory\", e);\r\n \t}\r\n }",
"public static void copyDirectories (File d1, File d2){\n //checks for the console\n System.out.println(\"->Executing copyDirectories\");\n \n if(!d1.isDirectory()){\n //We will search the files and then move them recursive\n copyFyles(d1, d2);\n }//end if directory\n else{\n //Copy d1 to d2, as they are files\n \n //Creating the directory d2 if it does not exist yet.\n if(!d2.exists()){\n d2.mkdir();\n System.out.println(\"Creating directory: \"+d2);\n }//end if creating directori\n \n /* 1. Obtein the list of the existing files in the directory\n 2. Call recursivily this method to copy each of the files \n */\n System.out.println(\"Searching in the directory: \"+d1);\n String files[] = d1.list();\n for(int i=0; i<files.length; i++)\n copyDirectories(new File(d1,files[i]), new File(d2,files[i]));\n System.out.println(\"We copied the files sucesfully\");\n }//end else files\n }",
"public static boolean copyFolderContents(String src, String dst, boolean recursive) {\n File srcDirectory = new File(src);\n File dstDirectory = new File(dst);\n if (srcDirectory.exists() && srcDirectory.isDirectory()) {\n if (!dstDirectory.exists()) {\n MessageGenerator.briefError(\"ERROR: Could find destination directory \" + dstDirectory.getAbsolutePath());\n }\n for (File file : srcDirectory.listFiles()) {\n if (!file.isDirectory()) {\n if (!copyFile(file.getAbsolutePath(), dstDirectory.getAbsolutePath())) {\n return false;\n }\n } else if (file.isDirectory() && recursive) {\n if (!copyFolder(file.getAbsolutePath(), dst, true)) {\n MessageGenerator.briefError(\"ERROR: While copying folder \" + file.getAbsolutePath() +\n \" to \" + dst + File.separator + file.getName());\n return false;\n }\n }\n }\n return true;\n }\n MessageGenerator.briefError(\"ERROR: copyFolderContents() - Cannot find directory: \" + src);\n return false;\n }",
"public int move(int from, int to) {\n // Gracefully handle items beyond end\n final int size = mItems.size();\n from = constrain(from, 0, size - 1);\n to = constrain(to, 0, size - 1);\n\n final Path item = mItems.remove(from);\n mItems.add(to, item);\n return to;\n }",
"public static void copyDirectory(File sourceDir, File targetDir) throws IOException {\n File[] srcFiles = sourceDir.listFiles();\n if (srcFiles != null) {\n for (int i = 0; i < srcFiles.length; i++) {\n File dest = new File(targetDir, srcFiles[i].getName());\n if (srcFiles[i].isDirectory() && FileUtils.safeIsRealDirectory(srcFiles[i])) {\n if (!dest.exists()) {\n dest.mkdirs();\n }\n copyDirectory(srcFiles[i], dest);\n } else {\n if (!dest.exists()) {\n dest.createNewFile();\n }\n copyFile(srcFiles[i].getAbsolutePath(), new File(targetDir,\n srcFiles[i].getName()).getAbsolutePath());\n }\n }\n }\n }",
"public boolean appendFromTo(int from, int to){\n //TODO 04: Die Objekte einer Liste an eine andere anhängen und dabei die erste Liste leeren.\n if (0 <= from && from < allShelves.length && 0 <= to && to < allShelves.length && !allShelves[from].i) {\n List<File> list1 = allShelves[from];\n List<File> list2 = allShelves[to];\n\n list2.concat(list1);\n return true;\n }\n return false;\n }",
"public static void copyFileOrDirectory(String source, String destination) throws KubernetesPluginException {\n File src = new File(source);\n File dst = new File(destination);\n try {\n // if source is file\n if (Files.isRegularFile(Paths.get(source))) {\n if (Files.isDirectory(dst.toPath())) {\n // if destination is directory\n FileUtils.copyFileToDirectory(src, dst);\n } else {\n // if destination is file\n FileUtils.copyFile(src, dst);\n }\n } else if (Files.isDirectory(Paths.get(source))) {\n FileUtils.copyDirectory(src, dst);\n }\n } catch (IOException e) {\n throw new KubernetesPluginException(\"Error while copying file\", e);\n }\n }",
"void copyFile(String sourceFile, String destinationFile, boolean overwrite) throws IOException;",
"static void copySubConfig(ServiceConfig from, ServiceConfig to)\n throws SMSException, SSOException {\n Set subConfigNames = from.getSubConfigNames();\n for (Iterator items = subConfigNames.iterator(); items.hasNext();) {\n String subConfigName = (String) items.next();\n ServiceConfig scf = from.getSubConfig(subConfigName);\n to.addSubConfig(subConfigName, scf.getSchemaID(),\n scf.getPriority(), scf.getAttributesWithoutDefaults());\n ServiceConfig sct = to.getSubConfig(subConfigName);\n copySubConfig(scf, sct);\n }\n }",
"void copyFolder(OrionCMContext ctx, Long sourceId, Long targetFolderId, List<SolutionParam> solutions) throws PhoenixDataAccessException, IOException;",
"public static void copyFileToDir(File src, File dst) throws IOException {\n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n File file = new File(dstAbsPath + File.separator + src.getName());\n copyFile(src, file);\n }",
"private static void copyFile(File in, File out)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFileChannel inChannel = new\tFileInputStream(in).getChannel();\n\t\t\tFileChannel outChannel = new FileOutputStream(out).getChannel();\n\t\t\tinChannel.transferTo(0, inChannel.size(), outChannel);\n\t\t\tinChannel.close();\n\t\t\toutChannel.close();\t\t\t\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.copyFile(): \" + e);\n\t\t}\n\n\t}",
"private static boolean backupAndCopyFile(File templateDir, File toDir, String filename) {\n File to = new File(toDir, filename);\n boolean rv = backupFile(to);\n File from = new File(templateDir, filename);\n boolean rv2 = WorkingDir.copyFile(from, to);\n return rv && rv2;\n }",
"private void importResourcesIntoSiteMigrate(String toSiteId,\r\n\t String fromSiteId) {\r\n\t// We first get the resources used in co (stored in documentSecurityMap)\r\n\tCOSerialized co =\r\n\t\tosylSiteService\r\n\t\t\t.getUnfusionnedSerializedCourseOutlineBySiteId(fromSiteId);\r\n\tCOModeledServer coModeled = new COModeledServer(co);\r\n\tcoModeled.XML2Model(true);\r\n\tcoModeled.model2XML();\r\n\tco.setContent(coModeled.getSerializedContent());\r\n\r\n\tMap<String, String> documentSecurityMap =\r\n\t\tcoModeled.getDocumentSecurityMap();\r\n\r\n\t// We loop over the resources of the site and copy the referenced ones\r\n\tString valFromSite_ref =\r\n\t\tcontentHostingService.getSiteCollection(fromSiteId);\r\n\tString valToSite_ref =\r\n\t\tcontentHostingService.getSiteCollection(toSiteId);\r\n\tString fromSite_ref =\r\n\t\tcontentHostingService.getReference(valFromSite_ref)\r\n\t\t\t.substring(8);\r\n\tString toSite_ref =\r\n\t\tcontentHostingService.getReference(valToSite_ref).substring(8);\r\n\r\n\tString id_work;\r\n\ttry {\r\n\t id_work = (fromSite_ref);\r\n\t ContentCollection directory =\r\n\t\t contentHostingService.getCollection(id_work);\r\n\r\n\t copyResourcesFromDirectory(directory,\r\n\t\t toSite_ref, documentSecurityMap);\r\n\t} catch (Exception e) {\r\n\t log.error(\"Unable to copy the resources during the site copy\", e);\r\n\t}\r\n }",
"public static void copyFile(File source, File destination) throws IOException {\n\tFileChannel sourceChannel = null;\n\tFileChannel destinationChannel = null;\n\ttry {\n\t if (destination.exists()) {\n\t\tdestination.delete();\n\t }\n\t sourceChannel = new FileInputStream(source).getChannel();\n\t destinationChannel = new FileOutputStream(destination).getChannel();\n\t int maxCount = (64 * 1024 * 1024) - (32 * 1024);// magic number for Windows, 64Mb - 32Kb\n\t long size = sourceChannel.size();\n\t long position = 0;\n\t while (position < size) {\n\t\tposition += sourceChannel.transferTo(position, maxCount, destinationChannel);\n\t }\n\t} catch (IOException e) {\n\t throw e;\n\t} finally {\n\t if (null != sourceChannel) {\n\t\tsourceChannel.close();\n\t }\n\t if (null != destinationChannel) {\n\t\tdestinationChannel.close();\n\t }\n\t}\n }",
"public static final void copy(String source, String destination) {\n File sourceFile = new File(source);\n File destFile = new File(destination);\n\n if (destFile.exists()) {\n // Information error all ready exist the file\n }\n\n if (!sourceFile.exists()) {\n // General Server Error\n }\n\n if (sourceFile.isDirectory()) {\n copyDirectory(source, destination);\n } else {\n copyFile(source, destination);\n }\n\n //delete source folder after copy-paste\n }",
"void copyFile(String sourceFile, String destinationFile) throws IOException;",
"void copyToBranch(ID sourceBranchId, ID targetBranchId);",
"public static void copy(String owner, Path src, Path target) throws CWLException {\r\n final Path finalSrc = toFinalSrcPath(src);\r\n if (src.toFile().exists() && Files.isReadable(src)) {\r\n CopyOption[] options = new CopyOption[] {\r\n StandardCopyOption.COPY_ATTRIBUTES,\r\n StandardCopyOption.REPLACE_EXISTING\r\n };\r\n final Path finalTarget = toFinalTargetPath(src, target);\r\n if (!finalTarget.getParent().toFile().exists()) {\r\n logger.debug(\"mkdir \\\"{}\\\"\", finalTarget.getParent());\r\n mkdirs(owner, finalTarget.getParent());\r\n }\r\n logger.debug(\"copy \\\"{}\\\" to \\\"{}\\\"\", finalSrc, finalTarget);\r\n try {\r\n if (finalSrc.toFile().isDirectory()) {\r\n Files.walkFileTree(finalSrc, new FileVisitor<Path>() {\r\n @Override\r\n public FileVisitResult preVisitDirectory(Path dir,\r\n BasicFileAttributes attrs) throws IOException {\r\n Files.copy(dir, finalTarget.resolve(finalSrc.relativize(dir)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\r\n Files.copy(file, finalTarget.resolve(finalSrc.relativize(file)),\r\n StandardCopyOption.COPY_ATTRIBUTES);\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\r\n return FileVisitResult.CONTINUE;\r\n }\r\n\r\n @Override\r\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\r\n throw exc;\r\n }\r\n });\r\n } else {\r\n Files.copy(finalSrc, finalTarget, options);\r\n }\r\n } catch (IOException e) {\r\n throw new CWLException(\r\n ResourceLoader.getMessage(\"cwl.io.copy.failed\",\r\n finalSrc.toString(),\r\n finalTarget.toString(),\r\n e.getMessage()),\r\n 255);\r\n }\r\n } else {\r\n throw new CWLException(ResourceLoader.getMessage(\"cwl.io.file.unaccessed\", finalSrc.toString()),\r\n 255);\r\n }\r\n }",
"public void move(int from, int to) {\n // Peek the top element without popping it, to remain in\n // consistent state if push throws an exception\n towers[to].push(towers[from].peek());\n towers[from].pop();\n numMoves++;\n }",
"private void copyFile(String source, String destination) throws IOException {\n File inputFile = new File(source);\n File outputFile = new File(destination);\n\t\n BufferedInputStream in = new BufferedInputStream(\n\t\t\t\t new FileInputStream(inputFile));\n BufferedOutputStream out = new BufferedOutputStream(\n\t\t\t\t new FileOutputStream(outputFile));\n int c;\n\tbyte[] tmp = new byte[4096];\n\t\n while ((c = in.read(tmp, 0, 4096)) != -1)\n\t out.write(tmp, 0, c);\n\t\n in.close();\n out.close();\n }",
"public static boolean copyFileContent(Path fromFile, Path toFile) {\n try {\n List<String> fileContent = Files.readAllLines(fromFile);\n Files.write(toFile, fileContent);\n } catch (IOException e) {\n return false;\n }\n return true;\n }",
"private void moveFilesToDiffDirectory(Path sourcePath, Path destinationPath) {\n try {\n Files.move(sourcePath, destinationPath,\n StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n //moving file failed.\n e.printStackTrace();\n }\n }",
"public void copyDirectories(File sourceFolder, File destinationFolder, Transformer<String> targetFileNameTransformer, boolean overwriteExistingFiles, String... fileNamesToIgnore)\n throws IOException {\n if (sourceFolder == null) {\n throw new IllegalArgumentException(\"src may not be null!\");\n }\n if (!sourceFolder.exists()) {\n throw new FileNotFoundException(\"source folder does not exist:\" + sourceFolder);\n }\n if (destinationFolder == null) {\n throw new IllegalArgumentException(\"dest may not be null!\");\n }\n Set<String> fileNamesToIgnoreSet = new HashSet<>();\n if (fileNamesToIgnore != null) {\n for (String fileNameToIgnore : fileNamesToIgnore) {\n if (fileNamesToIgnore == null) {\n continue;\n }\n fileNamesToIgnoreSet.add(fileNameToIgnore);\n }\n }\n copyRecursive(sourceFolder, destinationFolder, targetFileNameTransformer, overwriteExistingFiles, fileNamesToIgnoreSet);\n }",
"private void moveTiles(ArrayList<MahjongSolitaireTile> from, ArrayList<MahjongSolitaireTile> to)\n {\n // GO THROUGH ALL THE TILES, TOP TO BOTTOM\n for (int i = from.size()-1; i >= 0; i--)\n {\n MahjongSolitaireTile tile = from.remove(i);\n \n // ONLY ADD IT IF IT'S NOT THERE ALREADY\n if (!to.contains(tile))\n to.add(tile);\n } \n }",
"public boolean copy(File fileToLoadOrig, boolean withDuplicate, List<String> passedFiles) {\n //Let us get the current Date\n Date date = new Date();\n LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n int year = localDate.getYear();\n int month = localDate.getMonthValue();\n int day = localDate.getDayOfMonth();\n\n String destDirectoryPath = year + \"-\" + month + \"-\" + day;\n\n //check if directory is created\n\n File destDirecoty = new File(\"./testing/dest/\" + destDirectoryPath);\n System.out.println(\"the file path:\" + destDirecoty.getAbsolutePath());\n\n if (!destDirecoty.exists()) {\n System.out.println(\"creating a new directory with path:\" + destDirecoty.getAbsolutePath());\n boolean created = destDirecoty.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n System.out.println(\"Directory is created\");\n //Great, now let us check if the file already in the dirctory\n\n\n boolean duplicateFound = false;\n\n\n File[] sourceFiles = fileToLoadOrig.listFiles();\n\n for (File sourceFile : sourceFiles) {\n //let us get the file extension\n String sourceFileType = \"\";\n int location = sourceFile.getName().lastIndexOf('.');\n if (location > 0) {\n sourceFileType = sourceFile.getName().substring(location + 1);\n }\n //cool, let us go on\n String nestedDirectory;\n switch (sourceFileType) {\n case \"txt\":\n nestedDirectory = \"txt\";\n break;\n case \"pdf\":\n nestedDirectory = \"pdf\";\n break;\n case \"xls\":\n nestedDirectory = \"xls\";\n default:\n nestedDirectory = \"others\";\n }\n\n //check if the type directory is created or not\n File nestedDirecotyFile = new File(destDirecoty.getAbsolutePath()+\"/\" + nestedDirectory);\n System.out.println(\"the file path:\" + nestedDirecotyFile.getAbsolutePath());\n\n if (!nestedDirecotyFile.exists()) {\n System.out.println(\"creating a new directory with path:\" + nestedDirecotyFile.getAbsolutePath());\n boolean created = nestedDirecotyFile.mkdirs();\n System.out.println(\"is file created:\" + created);\n }\n\n\n\n File[] destinationFiles = nestedDirecotyFile.listFiles();\n\n for (File destinationFile : destinationFiles) {\n if (destinationFile.getName().equals(sourceFile.getName())) {\n if (withDuplicate) {\n int maxSeqNum = 0;\n //Let us find the last sequence of the destinationFile\n for (File fileForDuplicate : destinationFiles) {\n String[] fileParts = fileForDuplicate.getName().split(\"_\");\n if (fileParts.length == 2) {\n //got a split\n if (fileParts[0].equals(destinationFile.getName())) {\n maxSeqNum = Math.max(maxSeqNum, Integer.parseInt(fileParts[1]));\n }\n }else{\n new RuntimeException(\"Files were found with multiple _\");\n }\n }\n String newFilePath = sourceFile.getName() + \"_\" + (maxSeqNum + 1);\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + newFilePath));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n } else {\n // let us delete the destinationFile and replace it\n destinationFile.delete();\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n break;\n } else {\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n }\n\n try {\n FileUtils.copyFile(sourceFile, new File(nestedDirecotyFile.getAbsoluteFile() + \"/\" + sourceFile.getName()));\n passedFiles.add(sourceFile.getAbsolutePath());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n\n }\n return true;\n }",
"public static void copyDirectory(File srcDir, File dstDir) throws IOException {\n if (srcDir.isDirectory()) {\n if (!dstDir.exists()) dstDir.mkdir();\n String[] children = srcDir.list();\n for (int i = 0; i < children.length; i++) copyDirectory(new File(srcDir, children[i]), new File(dstDir, children[i]));\n } else {\n copyFile(srcDir, dstDir);\n }\n }",
"public static void copyAll(File source, File dest, boolean replaceExisting) throws IOException {\n\n Files.walkFileTree(source.toPath(), new FileTreeWalker(FileTreeWalker.Action.COPY,\n source.toPath(), dest.toPath(), replaceExisting));\n\n }",
"private void copy(File src, File dst) throws IOException \r\n {\r\n InputStream in = new FileInputStream(src);\r\n OutputStream out = new FileOutputStream(dst);\r\n \r\n // Transfer bytes from in to out\r\n byte[] buf = new byte[1024];\r\n int len;\r\n while ((len = in.read(buf)) > 0) \r\n {\r\n out.write(buf, 0, len);\r\n }\r\n in.close();\r\n out.close();\r\n }",
"private static long copy(InputStream from, OutputStream to) throws IOException {\n byte[] buf = new byte[BUFFER];\n long total = 0;\n while (true) {\n int r = from.read(buf);\n if (r == -1) {\n break;\n }\n to.write(buf, 0, r);\n total += r;\n }\n return total;\n }",
"public static IStatus copyFile(InputStream in, String to) {\n \t\tOutputStream out = null;\n \t\n \t\ttry {\n \t\t\tout = new FileOutputStream(to);\n \t\n \t\t\tint avail = in.read(buf);\n \t\t\twhile (avail > 0) {\n \t\t\t\tout.write(buf, 0, avail);\n \t\t\t\tavail = in.read(buf);\n \t\t\t}\n \t\t\treturn Status.OK_STATUS;\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t} finally {\n \t\t\ttry {\n \t\t\t\tif (in != null)\n \t\t\t\t\tin.close();\n \t\t\t} catch (Exception ex) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t\ttry {\n \t\t\t\tif (out != null)\n \t\t\t\t\tout.close();\n \t\t\t} catch (Exception ex) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t}\n \t}",
"@SuppressWarnings(\"All\")\n public <T> void copy(MyList<? super T> to, MyList<? extends T> from) {\n\n System.out.println(\"from size \" + from.size);\n for (int i = 0; i < from.getSize(); i++) {\n to.add(from.getByIndex(i));\n }\n }",
"public static void copy(final ByteBuffer from, final int fromIndex, final int size, final ByteBuffer dest, final int toIndex) {\n final byte[] buf = new byte[size];\n\n // need an absolute bulk get\n int oldPosition = from.position();\n from.position(fromIndex);\n from.get(buf);\n from.position(oldPosition);\n\n // need an absolute bulk put\n oldPosition = dest.position();\n dest.position(toIndex);\n dest.put(buf);\n dest.position(oldPosition);\n }",
"@Override\n public void copyBlob(BlobId from, BlobId to) {\n BlobInfo toInfo = BlobInfo.newBuilder(to).build();\n CopyWriter w =\n storageProvider\n .get()\n .copy(CopyRequest.newBuilder().setSource(from).setTarget(toInfo).build());\n while (!w.isDone()) {\n w.copyChunk();\n }\n }",
"public static void Copy(File toCopy, File destination) throws IOException {\n\t\tInputStream in = new BufferedInputStream(new FileInputStream(toCopy));\n\t\tOutputStream out = new BufferedOutputStream(new FileOutputStream(destination));\n\n\t\tbyte[] buffer = new byte[1024];\n\t\tint lengthRead;\n\t\twhile ((lengthRead = in.read(buffer)) > 0) {\n\t\t\tout.write(buffer, 0, lengthRead);\n\t\t\tout.flush();\n\t\t}\n\t\tout.close();\n\t\tin.close();\n\t}",
"@Override\r\n\tpublic void transferItems(Robot from, Robot to)\r\n\t{\r\n\t\tfrom.transferItems(to);\r\n\t}",
"public static void copyCriteriaNoSelection(CriteriaQuery<?> from, CriteriaQuery<?> to) {\n\n\t// Copy Roots\n\tfor (Root<?> root : from.getRoots()) {\n\t Root<?> dest = to.from(root.getJavaType());\n\t dest.alias(getOrCreateAlias(root));\n\t copyJoins(root, dest);\n\t}\n\n\tto.groupBy(from.getGroupList());\n\tto.distinct(from.isDistinct());\n\tto.having(from.getGroupRestriction());\n\tto.where(from.getRestriction());\n\tto.orderBy(from.getOrderList());\n }",
"public static void copyDirectory(String destDirStr, String sourceDirStr, boolean mkdirs) throws Exception {\r\n\t\tFile destDir = new File(destDirStr);\r\n\t\tFile sourceDir = new File(sourceDirStr);\r\n\t\tcopyDirectory(destDir, sourceDir, mkdirs);\r\n\t}",
"public static boolean copyFolder(String srcDirectoryPath, String dstDirectoryPath, boolean recursive) {\n File srcDirectory = new File(srcDirectoryPath);\n File dstDirectory = new File(dstDirectoryPath + File.separator + srcDirectory.getName());\n if (srcDirectory.exists() && srcDirectory.isDirectory()) {\n if (!dstDirectory.exists()) {\n dstDirectory.mkdirs();\n }\n for (File file : srcDirectory.listFiles()) {\n if (!file.isDirectory()) {\n if (!copyFile(file.getAbsolutePath(), dstDirectory.getAbsolutePath() + File.separator + file.getName())) {\n return false;\n }\n } else if (file.isDirectory() && recursive) {\n if (!copyFolder(file.getAbsolutePath(), dstDirectory.getAbsolutePath(), true)) {\n return false;\n }\n }\n\n }\n return true;\n }\n MessageGenerator.briefError(\"ERROR: copyFolder() - Cannot find directory: \" + srcDirectoryPath);\n return false;\n }",
"public static void copyRemoteFiles(String ip, String userName, String password, String sourcePath, String destinationPath) throws Exception {\n\tOutputStream outputStream = null;\n\tFTPClient ftpClient = null;\n\ttry {\n\t File destination = new File(destinationPath);\n\t ftpClient = new FTPClient();\n\t log.info(\"Connecting to ftp...\" + new Timestamp(System.currentTimeMillis()));\n\t ftpClient.connect(ip);\n\t ftpClient.login(userName, password);\n\t FTPFile[] files = ftpClient.listFiles(sourcePath);\n\t if (null != files && files.length > 0) {\n\t\tlog.info(\"Moving files \" + sourcePath + \" to \" + destinationPath + \" started...\" + new Timestamp(System.currentTimeMillis()));\n\t\tfor (FTPFile file : files) {\n\t\t outputStream = new FileOutputStream(new File(destination, file.getName()));\n\t\t String sourceFilePath = sourcePath + file.getName();\n\t\t ftpClient.retrieveFile(sourceFilePath, outputStream);\n\t\t closeOutputStream(outputStream);\n\t\t ftpClient.deleteFile(sourceFilePath);\n\t\t}\n\t\tlog.info(\"Moving files from \" + sourcePath + \" to \" + destinationPath + \" finished...\" + new Timestamp(System.currentTimeMillis()));\n\t } else {\n\t\tlog.info(\"No files found in \" + sourcePath);\n\t }\n\t} catch (Exception e) {\n\t log.info(\"Moving files from \" + sourcePath + \" to \" + destinationPath + \" failed...\" + new Timestamp(System.currentTimeMillis()));\n\t throw e;\n\t} finally {\n\t closeFtp(ftpClient);\n\t closeOutputStream(outputStream);\n\t}\n }",
"private void copyFile(InputStream ins, OutputStream outs) throws IOException {\n byte[] buffer = new byte[1024];\n int read;\n while((read = ins.read(buffer)) != -1) {\n outs.write(buffer, 0, read);\n }\n }",
"protected Transition addTransitionSteps(Transition transition,\n InternalSystemEntryDelta entryDelta,\n Object fromState,\n Object toState)\n {\n // nothing to do if both states are equal!\n if(LangUtils.isEqual(fromState, toState))\n return transition;\n \n if(fromState == null)\n fromState = StateMachine.NONE;\n \n if(toState == null)\n toState = StateMachine.NONE;\n \n // when no state machine (empty agents) nothing to do...\n StateMachine stateMachine = entryDelta.getStateMachine();\n if(stateMachine == null)\n return transition;\n\n int distance = stateMachine.getDistance(fromState, toState);\n \n @SuppressWarnings(\"unchecked\")\n Collection<Map<String,String>> path =\n (Collection<Map<String,String>>) entryDelta.getStateMachine().findShortestPath(fromState,\n toState);\n for(Map<String, String> p : path)\n {\n Transition newTransition =\n addTransition(entryDelta, p.get(\"action\"), p.get(\"to\"), distance);\n newTransition.executeAfter(transition);\n transition = newTransition;\n }\n \n return transition;\n }",
"public static Set<MustAliasBUEdge> constructMove(Variable from, Variable to) {\n\t\tif (from == null || to == null)\n\t\t\tthrow new RuntimeException(\"Neither from nor to can be null!\");\n\t\tSet<MustAliasBUEdge> ret = new ArraySet<MustAliasBUEdge>();\n\t\t// Case 1: from \\notin ms && to \\notin ms\n\t\tMustAliasBUEdge c1 = new MustAliasBUEdge();\n\t\tc1.constraint = new AliasConstraint();\n\t\tSet<Variable> notInV1 = c1.constraint.getNotInVSet();\n\t\tnotInV1.add(from);\n\t\tnotInV1.add(to);\n\t\tret.add(c1);\n\t\t// Case 2: from \\in ms && to \\notin ms\n\t\tMustAliasBUEdge c2 = new MustAliasBUEdge();\n\t\tc2.constraint = new AliasConstraint();\n\t\tSet<Variable> notInV2 = c2.constraint.getNotInVSet();\n\t\tnotInV2.add(to);\n\t\tSet<Variable> inV2 = c2.constraint.getInVSet();\n\t\tinV2.add(from);\n\t\tc2.genSet.add(new Pair<Variable, Variable>(to, from));\n\t\tret.add(c2);\n\t\t// Case 3: from \\notin ms && to \\in ms\n\t\tMustAliasBUEdge c3 = new MustAliasBUEdge();\n\t\tc3.constraint = new AliasConstraint();\n\t\tSet<Variable> notInV3 = c3.constraint.getNotInVSet();\n\t\tnotInV3.add(from);\n\t\tSet<Variable> inV3 = c3.constraint.getInVSet();\n\t\tinV3.add(to);\n\t\tc3.killSet.add(to);\n\t\tret.add(c3);\n\t\t// Case 4: from \\in ms && to \\in ms\n\t\tMustAliasBUEdge c4 = new MustAliasBUEdge();\n\t\tc4.constraint = new AliasConstraint();\n\t\tSet<Variable> inV4 = c4.constraint.getInVSet();\n\t\tinV4.add(from);\n\t\tinV4.add(to);\n\t\tc4.killSet.add(to);\n\t\tc4.genSet.add(new Pair<Variable, Variable>(to, from));\n\t\tret.add(c4);\n\t\treturn ret;\n\t}",
"public void criarArvoreDeDiretorioLocal(String caminhoDestino, String raiz, String fs) {\r\n String caminhoDeCriacao;\r\n \r\n caminhoDeCriacao = caminhoDestino;\r\n if (new File(caminhoDeCriacao).mkdir())\r\n System.out.println(\"Diretorio Criado\");\r\n else\r\n System.out.println(\"Diretorio: \" + caminhoDeCriacao + \" nao criado\");\r\n \r\n ArrayList<String> filhos = new ArrayList<>(arvoreDeDiretorios.getSuccessors(raiz));\r\n \r\n for (String filho : filhos) {\r\n //new File(caminhoDeCriacao +fs + filho).mkdir();\r\n criarArvoreDeDiretorioLocal(caminhoDeCriacao + fs + filho, filho,fs);\r\n } \r\n }",
"public static <T,S,V extends Object> void merge(Map<T, HashMap<S, V>> to, Map<T, HashMap<S, V>> from) {\r\n\t\tfor(Entry<T, HashMap<S, V>> entry : from.entrySet()) {\r\n\t\t\tif(to.containsKey(entry.getKey())) {\r\n\t\t\t\tto.get(entry.getKey()).putAll(entry.getValue());\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tto.put(entry.getKey(), entry.getValue());\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void copyDirectory(File sourceLocation, File targetLocation)\r\n\t\t\tthrows IOException {\r\n\r\n\t\tif (sourceLocation.isDirectory()) {\r\n\t\t\tif (!targetLocation.exists()) {\r\n\t\t\t\ttargetLocation.mkdir();\r\n\t\t\t}\r\n\r\n\t\t\tString[] children = sourceLocation.list();\r\n\t\t\tfor (int i = 0; i < children.length; i++) {\r\n\t\t\t\tcopyDirectory(new File(sourceLocation, children[i]), new File(\r\n\t\t\t\t\t\ttargetLocation, children[i]));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tInputStream in = new FileInputStream(sourceLocation);\r\n\t\t\tOutputStream out = new FileOutputStream(targetLocation);\r\n\t\t\t// Copy the bits from instream to outstream\r\n\t\t\tbyte[] buf = new byte[1024];\r\n\t\t\tint len;\r\n\t\t\twhile ((len = in.read(buf)) > 0) {\r\n\t\t\t\tout.write(buf, 0, len);\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\tout.close();\r\n\t\t}\r\n\t}",
"@Test\n public void testCdRelativePathOneDeepToMultiDeep() {\n FileTree myTree = new FileTree();\n String[] path1 = {\"directory2\" , \"/directory2/directory3\", \n \"/directory2/directory3/directory4\"};\n try {\n myTree.mkdir(path1);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"The directories could not be made.\");\n }\n try {\n myTree.cd(\"directory2\");\n myTree.cd(\"directory3/directory4\");\n } catch (NotDirectoryException e) {\n fail(\"Could not change to the directory\");\n }\n assertEquals(\"/directory2/directory3/directory4\", myTree.pwd());\n }",
"public static boolean moveCopyRoot(String old, String newDir) {\n try {\n if (!readReadWriteFile())\n RootTools.remount(newDir, \"rw\");\n\n execute(\"cp -fr \" + getCommandLineString(old) + \" \"\n + getCommandLineString(newDir));\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n }",
"public void copyDirectories(File sourceFolder, File destinationFolder, boolean overwriteExistingFiles, String... fileNamesToIgnore) throws IOException {\n copyDirectories(sourceFolder, destinationFolder, null, overwriteExistingFiles, fileNamesToIgnore);\n }",
"public Link(Node from, Node to) {\n\t this.from = from;\n\t this.to = to;\n\t}",
"public Path copie(String source, String destination) throws IOException {\n Path root = Paths.get(source);\n Path cible = Paths.get(destination);\n\n Path copy;\n copy = Files.copy(root, cible.resolve(root.getFileName()), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\n\n return copy;\n }",
"static void copyFile(File src, File dest) throws IOException {\r\n\t\tFileInputStream fis = new FileInputStream(src);\r\n\t\tFileOutputStream fos = new FileOutputStream (dest);\r\n\t\tbyte[] bytes = new byte[4*1048576];\r\n\t\tint numRead;\r\n\t\twhile ((numRead = fis.read(bytes)) > 0) {\r\n\t\t\tfos.write(bytes, 0, numRead);\r\n\t\t}\r\n\t\tfis.close();\r\n\t\tfos.close();\r\n\t}",
"@Test\n public void testMkdirMultipleDirectoriesRelativePathMultipleDeep() {\n FileTree myTree = new FileTree();\n String[] path1 = {\"directory1\", \"directory2\"};\n String[] path2 = {\"directory1/subDirectory1\", \"directory2/subDirectory2\"};\n try {\n myTree.mkdir(path1);\n myTree.mkdir(path2);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"The directories could not be made.\");\n }\n assertEquals(myTree.hasDirectory(\"/directory1/subDirectory1\"), true);\n assertEquals(myTree.hasDirectory(\"/directory2/subDirectory2\"), true);\n }",
"public static void copyFile(File src, File dst) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"Source file does not exist: \" + src);\n }\n \n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n try (InputStream in = new FileInputStream(src); OutputStream out = new FileOutputStream(dst)) {\n\n // Transfer bytes from in to out\n byte[] buf = new byte[10240];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n } catch (IOException e) {\n logger.warn(\"Unable to copy file \" + e.getMessage(), e);\n throw new IOException(\"Unable to copy file \", e);\n }\n }",
"protected void moveChildsWithName(String name, Node from, Node to){\n\t\tNode nodeIterator = from.getFirstChild();\n\t\tFINDTARGETS:\n\t\twhile (nodeIterator != null){\n\t\t\tif (name.equals(nodeIterator.getLocalName())) {\n\t\t\t\tfrom.removeChild(nodeIterator);\n\t\t\t\tto.appendChild(nodeIterator);\n\t\t\t\tbreak FINDTARGETS;\n\t\t\t}\n\t\t\tnodeIterator = nodeIterator.getNextSibling();\n\t\t}\n\t}",
"@SuppressWarnings(\"resource\")\r\n\tpublic static synchronized void copyFile(File source, File dest)\r\n\t\t\tthrows IOException {\r\n\t\tFileChannel srcChannel = null;\r\n\t\tFileChannel dstChannel = null;\r\n\t\ttry {\r\n\t\t\tsrcChannel = new FileInputStream(source).getChannel();\r\n\t\t\tdstChannel = new FileOutputStream(dest).getChannel();\r\n\t\t\tdstChannel.transferFrom(srcChannel, 0, srcChannel.size());\r\n\t\t} finally {\r\n\t\t\tsrcChannel.close();\r\n\t\t\tdstChannel.close();\r\n\t\t}\r\n\t}",
"public void moveDirectory(String source, String target) throws IOException{\n Path sourceFilePath = Paths.get(PWD.getPath()+\"/\"+source);\n Path targetFilePath = Paths.get(PWD.getPath()+\"/\"+target);\n //using builtin move function which uses Paths\n Files.move(sourceFilePath,targetFilePath);\n }",
"static <K extends Comparable<? super K>, V> Iterator<Map.Entry<K, V>> createWithBounds(\n @Nullable Node<K, V> root,\n @Nullable K pFromKey,\n boolean pFromInclusive,\n @Nullable K pToKey,\n boolean pToInclusive) {\n if (root == null) {\n return Collections.emptyIterator();\n } else {\n return new EntryInOrderIterator<>(root, pFromKey, pFromInclusive, pToKey, pToInclusive);\n }\n }",
"public static void assign(Object to, Object from) {\n List<Method> getMethods = new ArrayList<>();\n List<Method> setMethods = new ArrayList<>();\n\n for (Method method: from.getClass().getMethods()) {//заполняем getMethods getter-ами\n if(isGetter(method)) {\n getMethods.add(method);\n }\n }\n\n for (Method method: to.getClass().getMethods()) {//заполняем getMethods setter-ами\n if(isSetter(method)) {\n setMethods.add(method);\n }\n }\n\n for (Method setMethod: setMethods) {\n String setMethodName = setMethod.getName().substring(3);\n for (Method getMethod: getMethods) {\n if (setMethodName.equals(getMethod.getName().substring(3)) &&\n CompareTypes(setMethod.getParameterTypes()[0], getMethod.getReturnType())) {\n try {\n setMethod.invoke(to, getMethod.invoke(from));\n } catch (Exception e) {\n System.out.println(e);\n }\n break;\n }\n }\n }\n }",
"public static void appendClonedChildNodes(final Node destinationNode, final Node sourceNode, final boolean deep) {\n\t\tfinal NodeList sourceNodeList = sourceNode.getChildNodes(); //get the list of child nodes\n\t\tfinal int sourceNodeCount = sourceNodeList.getLength(); //find out how many nodes there are\n\t\tfor(int i = 0; i < sourceNodeCount; ++i) { //look at each of the source nodes\n\t\t\tfinal Node sourceChildNode = sourceNodeList.item(i); //get a reference to this child node\n\t\t\tdestinationNode.appendChild(sourceChildNode.cloneNode(deep)); //clone the node and add it to the destination node\n\t\t}\n\t}",
"public Array<T> copyOfRange(int from, int to)\n {\n assert to >= from;\n\n Array<T> out = Array.ofSize(to - from);\n out.copyFrom(this, from, 0, to - from);\n return out;\n }",
"public UndirectedEdge(VType from, VType to) {\n\t\t// TODO: Add your code here\n\t\tsuper(from,to);\n\t}",
"public boolean copyTo( final String _dest )\n\t{\n\t\tfinal FileStream destination = GlobalFileSystem.getFile( new File( _dest ).getParent() ) ;\n\t\tif( destination.exists() == false && destination.mkdirs() == false )\n\t\t{\n\t\t\tSystem.out.println( \"Failed to create directories.\" ) ;\n\t\t\treturn false ;\n\t\t}\n\n\t\tfinal FileStream stream = GlobalFileSystem.getFile( _dest ) ;\n\t\tif( stream == null )\n\t\t{\n\t\t\tSystem.out.println( \"Unable to acquire file stream for: \" + _dest ) ;\n\t\t\treturn false ;\n\t\t}\n\n\t\ttry( final ByteInStream in = getByteInStream() ;\n\t\t\t final ByteOutStream out = stream.getByteOutStream() )\n\t\t{\n\t\t\tif( out == null )\n\t\t\t{\n\t\t\t\treturn false ;\n\t\t\t}\n\n\t\t\tint length = 0 ;\n\t\t\tfinal byte[] buffer = new byte[48] ;\n\n\t\t\twhile( ( length = in.readBytes( buffer, 0, buffer.length ) ) > 0 )\n\t\t\t{\n\t\t\t\tout.writeBytes( buffer, 0, length ) ;\n\t\t\t}\n\n\t\t\treturn true ;\n\t\t}\n\t\tcatch( Exception ex )\n\t\t{\n\t\t\treturn false ;\n\t\t}\n\t}",
"public String copySite(String siteFrom, String siteTo) throws Exception {\n\t\tList<String> oldSiteToolIdList = new Vector<String>();\r\n\t\tList<String> newSiteToolIdList = new Vector<String>();\r\n\t\tSite newSite = null;\r\n\t\tSite oldSite = null;\r\n\t\tString mainToolCopied = null;\r\n\r\n\t\tnewSite = siteService.getSite(siteTo);\r\n\t\toldSite = siteService.getSite(siteFrom);\r\n\t\t\r\n\t\tString syllabusLocalePropName = ServerConfigurationService.getString(SYLLABUS_LOCALE_SITE_PROPERTY_NAME_KEY, \"hec_syllabus_locale\");\r\n\r\n\t\tString newSiteLocale = nullGuard(newSite.getProperties().getProperty(syllabusLocalePropName));\r\n\t\tString oldSiteLocale = nullGuard(oldSite.getProperties().getProperty(syllabusLocalePropName));\r\n\r\n\t\t// Refuse to copy if locale is different\r\n\t\tif (!newSiteLocale.equals(oldSiteLocale)) {\r\n\t\t\treturn \"cannot-copy-locale\";\r\n\t\t}\r\n\r\n\t\tString syllabusTemplateIdPropName = \"tenjin_template\";\r\n\t\t\r\n\t\tString newSiteTemplateId = nullGuard(newSite.getProperties().getProperty(syllabusTemplateIdPropName));\r\n\t\tString oldSiteTemplateId = nullGuard(oldSite.getProperties().getProperty(syllabusTemplateIdPropName));\r\n\t\t\r\n\t\t// Refuse to copy if templateId is different, permit if one of them is null\r\n\t\tif (newSiteTemplateId.length() > 0 && oldSiteTemplateId.length() > 0) {\r\n\t\t\tif(!newSiteTemplateId.equals(oldSiteTemplateId)) {\r\n\t\t\t\treturn \"cannot-copy-template\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// list all site tools which are displayed on its own page\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<SitePage> sitePages = oldSite.getPages();\r\n\t\tif (sitePages != null) {\r\n\t\t\tfor (SitePage page : sitePages) {\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<ToolConfiguration> pageToolsList = page.getTools(0);\r\n\t\t\t\t// we only handle one tool per page case\r\n\t\t\t\tif (page.getLayout() == SitePage.LAYOUT_SINGLE_COL\r\n\t\t\t\t\t\t&& pageToolsList.size() == 1) {\r\n\t\t\t\t\toldSiteToolIdList.add(pageToolsList.get(0).getToolId());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tsitePages = newSite.getPages();\r\n\t\tif (sitePages != null) {\r\n\t\t\tfor (SitePage page : sitePages) {\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tList<ToolConfiguration> pageToolsList = page.getTools(0);\r\n\t\t\t\t// we only handle one tool per page case\r\n\t\t\t\tif (page.getLayout() == SitePage.LAYOUT_SINGLE_COL\r\n\t\t\t\t\t\t&& pageToolsList.size() == 1) {\r\n\t\t\t\t\tnewSiteToolIdList.add(pageToolsList.get(0).getToolId());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (oldSiteToolIdList.contains(TENJIN_TOOL_ID) && newSiteToolIdList.contains(TENJIN_TOOL_ID)) {\r\n\t\t\tcopySiteWithTenjin(newSiteToolIdList, oldSite, newSite);\r\n\t\t\tmainToolCopied = \"TENJIN\";\r\n\t\t}\r\n\t\telse if (oldSiteToolIdList.contains(\"sakai.opensyllabus.tool\") && newSiteToolIdList.contains(\"sakai.opensyllabus.tool\")) {\r\n\t\t\tcopySiteWithOpenSyllabus(siteFrom, siteTo);\r\n\t\t\tmainToolCopied = \"OPENSYLLABUS\";\r\n\t\t}\r\n\r\n\t\treturn mainToolCopied;\r\n\t}",
"@Test\n public void testCdRelativePathMultiDeepToOneDeeper() {\n FileTree myTree = new FileTree();\n String[] path1 = {\"directory2\" , \"/directory2/directory3\", \n \"/directory2/directory3/directory4\"};\n try {\n myTree.mkdir(path1);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"The directories could not be made.\");\n }\n try {\n myTree.cd(\"/directory2/directory3\");\n myTree.cd(\"directory4\");\n } catch (NotDirectoryException e) {\n fail(\"Could not change to the directory\");\n }\n assertEquals(\"/directory2/directory3/directory4\", myTree.pwd());\n }",
"public void copyFile(@NonNull File sourceFile, @NonNull File destFile) throws IOException {\n if (!destFile.getParentFile().exists()) {\n if (!destFile.getParentFile().mkdirs())\n Log.e(ConstantVariables.ERR, ConstantVariables.DIR_NOT_CREATED);\n } else {\n Log.e(ConstantVariables.ERR, ConstantVariables.DIR_ALREADY_EXISTS);\n }\n\n if (!destFile.exists()) {\n if (!destFile.createNewFile())\n Log.e(ConstantVariables.ERR, ConstantVariables.FILE_NOT_CREATED);\n } else\n Log.e(ConstantVariables.ERR, ConstantVariables.FILE_ALREADY_EXISTS);\n\n try (\n FileChannel source = new FileInputStream(sourceFile).getChannel();\n FileChannel destination = new FileOutputStream(destFile).getChannel();\n ) {\n destination.transferFrom(source, 0, source.size());\n }\n }",
"@Override\r\n\tpublic void copy(String from, String to) {\n\t\t\r\n\t}",
"public void copyDirectory(File srcDir, File dstDir) throws IOException {\n\t\tif (srcDir.isDirectory()) {\n\t\t\tif (srcDir.getName().startsWith(\".\")) {// Si es un directorio oculto\n\t\t\t\t\t\t\t\t\t\t\t\t\t// no lo copiamos\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Si el directorio no existe\n\t\t\tif (!dstDir.exists()) {\n\t\t\t\tif(logger.isDebugEnabled())\n\t\t\t\t\tlogger.debug(\"El directorio no existe lo creamos. \" + dstDir);\n\t\t\t\tdstDir.mkdirs();\n\t\t\t}\n\n\t\t\tString[] children = srcDir.list();\n\t\t\tfor (int i = 0; i < children.length; i++) {\n\n\t\t\t\tcopyDirectory(new File(srcDir, children[i]), new File(dstDir,\n\t\t\t\t\t\tchildren[i]));\n\n\t\t\t}\n\t\t} else {\n\t\t\t// This method is implemented in e1071 Copying a File\n\t\t\tcopyFile(srcDir, dstDir);\n\t\t}\n\t}",
"public static void copy(URL src, File dst) throws IOException {\n\n try (InputStream in = src.openStream()) {\n try (OutputStream out = new FileOutputStream(dst)) {\n dst.mkdirs();\n copy(in, out);\n }\n }\n }",
"public void copyFile(String destination, String fileName, InputStream in) {\r\n try {\r\n // write the inputStream to a FileOutputStream\r\n OutputStream out = new FileOutputStream(new File(destination + fileName));\r\n int read = 0;\r\n byte[] bytes = new byte[1024];\r\n while ((read = in.read(bytes)) != -1) {\r\n out.write(bytes, 0, read);\r\n }\r\n in.close();\r\n out.flush();\r\n out.close();\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }"
] |
[
"0.70557237",
"0.69955915",
"0.69946826",
"0.6980535",
"0.6632526",
"0.6353734",
"0.62642336",
"0.5932849",
"0.5877656",
"0.5850667",
"0.5818426",
"0.5667379",
"0.5628145",
"0.56225836",
"0.5515801",
"0.5321025",
"0.5315379",
"0.5296059",
"0.5287542",
"0.52483726",
"0.52448565",
"0.5228568",
"0.5224478",
"0.5215871",
"0.5197811",
"0.5189884",
"0.5123099",
"0.51168674",
"0.51146924",
"0.5102693",
"0.50910896",
"0.50870335",
"0.5076995",
"0.5048418",
"0.50307053",
"0.50236547",
"0.49797443",
"0.4963118",
"0.4925418",
"0.49084505",
"0.488154",
"0.48483688",
"0.4807355",
"0.47890416",
"0.4785478",
"0.47717264",
"0.47701743",
"0.47590598",
"0.47584864",
"0.4746233",
"0.47167748",
"0.4708586",
"0.4690393",
"0.46794415",
"0.46516755",
"0.46488363",
"0.46304393",
"0.46215183",
"0.46055833",
"0.4590899",
"0.45728102",
"0.45726538",
"0.45629337",
"0.4557241",
"0.45277613",
"0.45213515",
"0.451991",
"0.4496504",
"0.44963983",
"0.44945964",
"0.44922888",
"0.44882435",
"0.4482033",
"0.44737297",
"0.44712886",
"0.44509664",
"0.4438853",
"0.44383356",
"0.44288096",
"0.44192073",
"0.44155928",
"0.44049886",
"0.43952155",
"0.43882647",
"0.43863365",
"0.4372746",
"0.43614206",
"0.43585044",
"0.4351144",
"0.43410912",
"0.43192378",
"0.4296164",
"0.42954272",
"0.42778102",
"0.42746606",
"0.42684102",
"0.42639104",
"0.42632803",
"0.42602408",
"0.42545977"
] |
0.6721886
|
4
|
Copy from an input stream to a file
|
public static void copyFile(InputStream in, File to) throws IOException {
FileOutputStream out = new FileOutputStream(to);
int len;
byte[] buffer = new byte[4096];
while ((len = in.read(buffer)) != -1) {
out.write(buffer, 0, len);
}
out.close();
in.close();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private void copyFile(InputStream ins, OutputStream outs) throws IOException {\n byte[] buffer = new byte[1024];\n int read;\n while((read = ins.read(buffer)) != -1) {\n outs.write(buffer, 0, read);\n }\n }",
"protected void writeFromStreamToStream(InputStream source, OutputStream destination) throws IOException {\n byte[] buffer = new byte[4096]; // A buffer to hold file contents\n int bytesRead; \n while((bytesRead = source.read(buffer)) != -1) { // Read bytes until EOF\n destination.write(buffer, 0, bytesRead); \n }\n \t}",
"private static void copyFile(InputStream is, OutputStream os) throws IOException {\n\n final byte[] buf = new byte[4096];\n int cnt = is.read(buf, 0, buf.length);\n while (cnt >= 0) {\n os.write(buf, 0, cnt);\n cnt = is.read(buf, 0, buf.length);\n }\n os.flush();\n }",
"public void copyFile(InputStream inputStream, OutputStream outputStream) throws IOException\n {\n byte[] buffer = new byte[1024];\n int length;\n while ((length = inputStream.read(buffer)) > 0)\n outputStream.write(buffer, 0, length);\n inputStream.close();\n outputStream.close();\n }",
"public static void copyFileFromInputStream(InputStream is, String newPath) throws IOException {\n FileOutputStream fs = null;\n try {\n int bytesum = 0;\n int byteread = 0;\n if (is != null) {\n\n fs = new FileOutputStream(newPath);\n byte[] buffer = new byte[1024];\n int length;\n while ((byteread = is.read(buffer)) != -1) {\n bytesum += byteread;\n System.out.println(bytesum);\n fs.write(buffer, 0, byteread);\n }\n is.close();\n }\n } catch (Exception e) {\n System.out.println(\"Copy Failed\");\n e.printStackTrace();\n\n } finally {\n try {\n is.close();\n fs.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }",
"public void copyFile(String destination, String fileName, InputStream in) {\r\n try {\r\n // write the inputStream to a FileOutputStream\r\n OutputStream out = new FileOutputStream(new File(destination + fileName));\r\n int read = 0;\r\n byte[] bytes = new byte[1024];\r\n while ((read = in.read(bytes)) != -1) {\r\n out.write(bytes, 0, read);\r\n }\r\n in.close();\r\n out.flush();\r\n out.close();\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }",
"private static void copyFile(File in, File out)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFileChannel inChannel = new\tFileInputStream(in).getChannel();\n\t\t\tFileChannel outChannel = new FileOutputStream(out).getChannel();\n\t\t\tinChannel.transferTo(0, inChannel.size(), outChannel);\n\t\t\tinChannel.close();\n\t\t\toutChannel.close();\t\t\t\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.copyFile(): \" + e);\n\t\t}\n\n\t}",
"public static void copy(InputStream input, OutputStream output) throws IOException {\n try {\n byte[] buffer = new byte[GCSFetcher.BUFFER_SIZE];\n int bytesRead = input.read(buffer);\n while (bytesRead != -1) {\n output.write(buffer, 0, bytesRead);\n bytesRead = input.read(buffer);\n }\n } finally {\n input.close();\n output.close();\n }\n }",
"private void streamCopy(InputStream in, OutputStream out) throws IOException {\t \n\t\tsynchronized (in) {\n\t\t\tsynchronized (out) {\n\t\t\t\tbyte[] buffer = new byte[256];\n\t\t\t\twhile (true) {\n\t \t\tint bytesRead = in.read(buffer);\n\t \t\tif (bytesRead == -1) break;\n\t \t\tout.write(buffer, 0, bytesRead);\n\t \t}\n\t \t}\n\t }\n\t}",
"public static void copyStream(InputStream in, OutputStream out) throws IOException {\n IOUtils.copy(in, out);\n in.close();\n out.close();\n }",
"public static void copyStream(InputStream in, OutputStream out) throws IOException {\n\n IOUtilities.copy(in, out);\n }",
"public static IStatus copyFile(InputStream in, String to) {\n \t\tOutputStream out = null;\n \t\n \t\ttry {\n \t\t\tout = new FileOutputStream(to);\n \t\n \t\t\tint avail = in.read(buf);\n \t\t\twhile (avail > 0) {\n \t\t\t\tout.write(buf, 0, avail);\n \t\t\t\tavail = in.read(buf);\n \t\t\t}\n \t\t\treturn Status.OK_STATUS;\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t} finally {\n \t\t\ttry {\n \t\t\t\tif (in != null)\n \t\t\t\t\tin.close();\n \t\t\t} catch (Exception ex) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t\ttry {\n \t\t\t\tif (out != null)\n \t\t\t\t\tout.close();\n \t\t\t} catch (Exception ex) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t}\n \t}",
"public static void copyStream(InputStream input, OutputStream output)\n throws IOException {\n if (input == null || output == null) {\n return;\n }\n IOUtils.copy(input, output);\n }",
"public static int copyInputStream(InputStream in, File destination) throws IOException {\n FileOutputStream out = new FileOutputStream(destination);\n BufferedOutputStream bufferedOut = new BufferedOutputStream(out, 1024 * 8);\n return copyInputStream(in, bufferedOut);\n }",
"private static void copy(InputStream in, OutputStream out) throws IOException {\n byte[] buffer = new byte[4096];\n while (true) {\n int bytesRead = in.read(buffer);\n if (bytesRead < 0) {\n break;\n }\n out.write(buffer, 0, bytesRead);\n }\n }",
"private void streamCopy(InputStream from, OutputStream to) {\r\n\t\ttry {\r\n\t\t\tint count = 0;\r\n\t\t\tbyte[] buffer = new byte[16*1024];\r\n\t\t\twhile ((count = from.read(buffer)) > 0) {\r\n\t\t\t\tto.write(buffer, 0, count);\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\tEventLogger.logConnectionException(logger, socket, e);\r\n\t\t}\r\n\t}",
"private void copyFile(String source, String destination) throws IOException {\n File inputFile = new File(source);\n File outputFile = new File(destination);\n\t\n BufferedInputStream in = new BufferedInputStream(\n\t\t\t\t new FileInputStream(inputFile));\n BufferedOutputStream out = new BufferedOutputStream(\n\t\t\t\t new FileOutputStream(outputFile));\n int c;\n\tbyte[] tmp = new byte[4096];\n\t\n while ((c = in.read(tmp, 0, 4096)) != -1)\n\t out.write(tmp, 0, c);\n\t\n in.close();\n out.close();\n }",
"private void copy(File src, File dst) throws IOException \r\n {\r\n InputStream in = new FileInputStream(src);\r\n OutputStream out = new FileOutputStream(dst);\r\n \r\n // Transfer bytes from in to out\r\n byte[] buf = new byte[1024];\r\n int len;\r\n while ((len = in.read(buf)) > 0) \r\n {\r\n out.write(buf, 0, len);\r\n }\r\n in.close();\r\n out.close();\r\n }",
"public boolean copy(String path, InputStream is) throws SystemException;",
"public static void copy(InputStream input, OutputStream output) throws IOException {\n copy(input, output, DEFAULT_BUFFER_SIZE);\n }",
"public static final void copyInputStream(InputStream in, OutputStream out) throws IOException {\r\n\t\tcopyInputStream(1024, in, out);\r\n\t}",
"@Test(groups = \"Integration\")\n public void testCopyStreamTo() throws Exception {\n String contents = \"abc\";\n File dest = new File(Os.tmp(), \"sssMachineLocationTest_dest.tmp\");\n try {\n host.copyTo(Streams.newInputStreamWithContents(contents), dest.getAbsolutePath());\n assertEquals(\"abc\", Files.readFirstLine(dest, Charsets.UTF_8));\n } finally {\n dest.delete();\n }\n }",
"private static boolean copyToFile(InputStream inputStream, File destFile) {\n if (inputStream == null || destFile == null) return false;\n try {\n OutputStream out = new FileOutputStream(destFile);\n try {\n byte[] buffer = new byte[4096];\n int bytesRead;\n while ((bytesRead = inputStream.read(buffer)) >= 0) {\n out.write(buffer, 0, bytesRead);\n }\n } finally {\n out.close();\n }\n return true;\n } catch (IOException e) {\n return false;\n }\n }",
"public static void write(InputStream is, File file) throws IOException {\n OutputStream os = null;\n try {\n os = new FileOutputStream(file);\n byte[] buffer = new byte[BUFFER_SIZE];\n int count;\n while ((count = is.read(buffer)) != -1) {\n os.write(buffer, 0, count);\n }\n os.flush();\n } finally {\n close(is);\n close(os);\n }\n }",
"public static void writeFile(InputStream in, String outputFile) throws IOException {\n OutputStream out = new FileOutputStream(outputFile);\n IOUtils.copy(in, out);\n in.close();\n out.close();\n }",
"@Test\n public void testCopyFileUsingStream() throws Exception {\n long start = System.nanoTime();\n CopyFile.copyFileUsingStream(sourceFile, streamDestFile);\n System.out.println(\"Time taken by file stream using:\" + (System.nanoTime() - start) / 1000);\n }",
"public void copyStreamContent(InputStream inputStream, OutputStream outputStream)\r\n\tthrows IOException {\r\n\t\tbyte[] theCopyBuffer = new byte[BUFFER_SIZE];\r\n\t\tint theNumberOfBytesRead;\r\n\r\n\t\ttheNumberOfBytesRead = inputStream.read(theCopyBuffer);\r\n\t\twhile (theNumberOfBytesRead != -1) {\r\n\t\t\toutputStream.write(theCopyBuffer, 0, theNumberOfBytesRead);\r\n\t\t\ttheNumberOfBytesRead = inputStream.read(theCopyBuffer);\r\n\t\t}\r\n\t}",
"private static void copy(InputStream is, OutputStream os) throws IOException {\n\t\t int i;\n\t\t byte[] b = new byte[1024];\n\t\t while((i=is.read(b))!=-1) {\n\t\t os.write(b, 0, i);\n\t\t }\n\n\t\t}",
"public static boolean copyToFile(InputStream inputStream, File destFile) {\n try {\n if (destFile.exists()) {\n destFile.delete();\n }\n FileOutputStream out = new FileOutputStream(destFile);\n try {\n byte[] buffer = new byte[4096];\n int bytesRead;\n while ((bytesRead = inputStream.read(buffer)) >= 0) {\n out.write(buffer, 0, bytesRead);\n }\n } finally {\n out.flush();\n try {\n out.getFD().sync();\n } catch (IOException e) {\n }\n out.close();\n }\n return true;\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }",
"public boolean copyToFile(InputStream inputStream, File file) {\n FileOutputStream fileOutputStream;\n try {\n fileOutputStream = new FileOutputStream(file, true);\n byte[] bArr = new byte[4096];\n while (true) {\n int read = inputStream.read(bArr);\n if (read < 0) {\n break;\n }\n fileOutputStream.write(bArr, 0, read);\n }\n fileOutputStream.close();\n return true;\n } catch (IOException e) {\n Log.d(\"ANRManager\", \"copyToFile fail\");\n return false;\n } catch (Throwable th) {\n fileOutputStream.flush();\n try {\n fileOutputStream.getFD().sync();\n } catch (IOException e2) {\n Log.d(\"ANRManager\", \"copyToFile: getFD fail\");\n }\n fileOutputStream.close();\n }\n }",
"public void readAndWrite() {\n Scanner scanner = new Scanner(System.in);\n String s = scanner.nextLine();\n List<String> passedFiles = new ArrayList<>();\n copy(new File(s), true, passedFiles);\n\n }",
"private static void copyFile(Path srcPath, Path destPath) throws IOException {\n try (FileWriter outputStream = new FileWriter(destPath.toFile().getAbsolutePath(), false);\n FileReader inputStream = new FileReader(srcPath.toFile().getAbsolutePath())) {\n int i;\n while ((i = inputStream.read()) != -1) {\n outputStream.write(toChars(i));\n }\n }\n }",
"@Override\r\n\tpublic void putFile(InputStream is, String targetLocation) throws FileSystemUtilException {\r\n\t\tthrow new FileSystemUtilException(\"000000\",null,Level.ERROR,null);\t\r\n\r\n\t}",
"static void copyFile(File src, File dest) throws IOException {\r\n\t\tFileInputStream fis = new FileInputStream(src);\r\n\t\tFileOutputStream fos = new FileOutputStream (dest);\r\n\t\tbyte[] bytes = new byte[4*1048576];\r\n\t\tint numRead;\r\n\t\twhile ((numRead = fis.read(bytes)) > 0) {\r\n\t\t\tfos.write(bytes, 0, numRead);\r\n\t\t}\r\n\t\tfis.close();\r\n\t\tfos.close();\r\n\t}",
"public void copyFileChannel(String inputFile, String outputFile) throws IOException {\n\t\tFileInputStream inputStream = new FileInputStream(inputFile);\n\t\tFileOutputStream outputStream = new FileOutputStream(outputFile);\n\n\t\tFileChannel inChannel = inputStream.getChannel();\n\t\tFileChannel outChannel = outputStream.getChannel();\n\n\t\tinChannel.transferTo(0, inChannel.size(), outChannel);\n\n\t\tinputStream.close();\n\t\toutputStream.close();\n\t}",
"protected void redirectStream (InputStream inputStream, OutputStream outputStream)\n throws IOException\n {\n this.logDebug(\"redirectStream 1/2: inputStream = \" + inputStream);\n\n byte[] buffer = new byte[1024];\n int amount = 0;\n while ( (amount = inputStream.read(buffer)) > 0 )\n outputStream.write(buffer, 0, amount);\n outputStream.flush();\n\n this.logDebug(\"redirectStream 2/2\");\n }",
"public static InputStream makeCopy(InputStream input) throws IOException {\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n copyStream(input, out);\n return new ByteArrayInputStream(out.toByteArray());\n }",
"public static final void copyInputStream(int bufferSize, InputStream in, OutputStream out) throws IOException {\r\n\t\tbyte[] buffer = new byte[bufferSize];\r\n\t int len;\r\n\r\n\t while((len = in.read(buffer)) >= 0)\r\n\t out.write(buffer, 0, len);\r\n\r\n\t \r\n\t in.close();\r\n\t out.flush();\r\n\t out.close();\r\n\t \r\n\t}",
"public static void copyStream(InputStream is, OutputStream os) throws IOException {\r\n copyStream(is, os, DEFAULT_STREAM_BUFFER_SIZE);\r\n }",
"public static void copyStream(InputStream input, OutputStream output,\n int expected) throws IOException {\n if (input == null || output == null) {\n return;\n }\n if (expected <= 0) {\n copyStream(input, output);\n }\n else {\n byte[] bytes = new byte[Math.min(expected, BUFSIZE)];\n\n int totalRead = 0;\n int bytesRead = 0;\n\n while (totalRead < expected) {\n bytesRead = input.read(bytes, 0, bytes.length);\n output.write(bytes, 0, bytesRead);\n totalRead = totalRead + bytesRead;\n }\n output.flush();\n }\n }",
"public void transfer(InputStream in, OutputStream out) throws IOException {\n int byteIn;\n while ((byteIn = in.read()) != -1) {\n out.write(byteIn);\n }\n out.flush();\n }",
"public static void stream(final InputStream in, final OutputStream out) throws IOException {\n\t\tfinal byte buffer[] = new byte[BUFFER_SIZE];\r\n\t\tint len = buffer.length;\r\n\t\twhile (true) {\r\n\t\t\tlen = in.read(buffer);\r\n\t\t\tif (len == -1) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tout.write(buffer, 0, len);\r\n\t\t}\r\n\t\tout.flush();\r\n\t}",
"public static boolean copyToFile(InputStream inputStream, File destFile) {\n\t\ttry {\n\t\t\tif (destFile.exists()) {\n\t\t\t\tdestFile.delete();\n\t\t\t}\n\t\t\tFileOutputStream out = new FileOutputStream(destFile);\n\t\t\ttry {\n\t\t\t\tbyte[] buffer = new byte[4096];\n\t\t\t\tint bytesRead;\n\t\t\t\twhile ((bytesRead = inputStream.read(buffer)) >= 0) {\n\t\t\t\t\tout.write(buffer, 0, bytesRead);\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tout.flush();\n\t\t\t\ttry {\n\t\t\t\t\tout.getFD().sync();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t}\n\t\t\t\tout.close();\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (IOException e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"@Override\n public long writeData(InputStream in) {\n try {\n return IOUtils.copy(in, new FileOutputStream(getFile()));\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }",
"public static void copyFile(File src, File dst) throws IOException {\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(dst);\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) out.write(buf, 0, len);\n in.close();\n out.close();\n }",
"public GridFSInputFile createFile(InputStream in) {\n\treturn createFile(in, null);\n }",
"private static long copy(InputStream from, OutputStream to) throws IOException {\n byte[] buf = new byte[BUFFER];\n long total = 0;\n while (true) {\n int r = from.read(buf);\n if (r == -1) {\n break;\n }\n to.write(buf, 0, r);\n total += r;\n }\n return total;\n }",
"public static void CopyStream(InputStream is, OutputStream os)\n {\n //int total = 0;\n //int size =0;\n\n try\n {\n byte[] bytes = new byte[DEFAULT_BUFFER_SIZE];\n int count;\n while ((count = is.read(bytes, 0, DEFAULT_BUFFER_SIZE)) != -1)\n os.write(bytes, 0, count);\n }\n catch (Exception exp)\n {\n exp.printStackTrace();\n }\n finally\n {\n closeSilently(is, os);\n }\n }",
"public static void saveUploadedFile(InputStream in, String destination, String filename) {\n File dir = new File(destination);\n if (!dir.exists()) {\n dir.mkdir();\n }\n File upload = new File(Paths.get(destination, filename).toString());\n\n try {\n Files.copy(in, upload.toPath());\n } catch (IOException ex) {\n throw new ServerProcedureException(\"Server procedure error. Please try later!\");\n }\n }",
"private void writeToFile(InputStream uploadedInputStream,\n String uploadedFileLocation) {\n try {\n OutputStream out = new FileOutputStream(new File(\n uploadedFileLocation));\n int read = 0;\n byte[] bytes = new byte[1024];\n\n out = new FileOutputStream(new File(uploadedFileLocation));\n while ((read = uploadedInputStream.read(bytes)) != -1) {\n out.write(bytes, 0, read);\n }\n out.flush();\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void copyFile(String inputFile, String outputFile)\r\n\t{\r\n\t\tif(new File(inputFile).exists())\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tInputStream in = new FileInputStream(inputFile);\r\n\t\t\t\tOutputStream out = new FileOutputStream(outputFile);\r\n\t\t\t\t// Transfer bytes from in to out\r\n\t\t\t\tbyte[] buf = new byte[1024];\r\n\t\t\t\tint length;\r\n\t\t\t\twhile ((length = in.read(buf)) > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tout.write(buf, 0, length);\r\n\t\t\t\t}\r\n\t\t\t\tin.close();\r\n\t\t\t\tout.close();\r\n\t\t\t\tSystem.out.println(inputFile + \" file copied to \" + outputFile);\r\n\t\t\t\tLog.info(inputFile + \" file copied.\");\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) \r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}",
"public static void transfer(InputStream in, OutputStream out, int offset, int size) throws IOException\n {\n // Read bytes and write to destination until eof\n byte[] buf = new byte[size];\n System.out.println(\"What is it here?\\n\"+buf);\n int lengthBuff = in.read(buf);\n System.out.println(\"The length is: \"+lengthBuff);\n while (lengthBuff != 0)\n {\n out.write(buf, 0, lengthBuff);\n }\n System.out.println(\"End!\");\n }",
"public void put(Bitstream bitstream, InputStream in) throws IOException {\n try {\n File file = getFile(bitstream);\n\n // Make the parent dirs if necessary\n File parent = file.getParentFile();\n if (!parent.exists()) {\n parent.mkdirs();\n }\n //Create the corresponding file and open it\n file.createNewFile();\n\n try (\n FileOutputStream fos = new FileOutputStream(file);\n // Read through a digest input stream that will work out the MD5\n DigestInputStream dis = new DigestInputStream(in, MessageDigest.getInstance(CSA));\n ) {\n Utils.bufferedCopy(dis, fos);\n in.close();\n\n bitstream.setSizeBytes(file.length());\n bitstream.setChecksum(Utils.toHex(dis.getMessageDigest().digest()));\n bitstream.setChecksumAlgorithm(CSA);\n } catch (NoSuchAlgorithmException nsae) {\n // Should never happen\n log.warn(\"Caught NoSuchAlgorithmException\", nsae);\n }\n } catch (Exception e) {\n log.error(\"put(\" + bitstream.getInternalId() + \", inputstream)\", e);\n throw new IOException(e);\n }\n }",
"Stream<In> getInputStream();",
"private static void copyFile(String from, String to)\n\t{\n\t\tFile inputFile;\n\t File outputFile;\n\t\tint fIndex = from.indexOf(\"file:\");\n\t\tint tIndex = to.indexOf(\"file:\");\n\t\tif(fIndex < 0)\n\t\t\tinputFile = new File(from);\n\t\telse\n\t\t\tinputFile = new File(from.substring(fIndex + 5, from.length()));\n\t\tif(tIndex < 0)\n\t\t\toutputFile = new File(to);\n\t\telse\n\t\t\toutputFile = new File(to.substring(tIndex + 5, to.length())); \n\t\tcopyFile(inputFile, outputFile);\t\t\n\t}",
"public static final void duplicateStream(InputStream in, OutputStream... out) throws IOException {\r\n\t\tduplicateStream(1024, in, out);\r\n\t}",
"void copyFile(String sourceFile, String destinationFile) throws IOException;",
"void getFile(String path, OutputStream stream) throws NotFoundException, IOException;",
"public static void copyStreamSilently(InputStream in, OutputStream out) {\n try {\n copyStream(in, out);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static final void duplicateStream(int bufferSize, InputStream in, OutputStream... out) throws IOException {\r\n\t\tbyte[] buffer = new byte[bufferSize];\r\n\t\tint len;\r\n\t\t\r\n\t while((len = in.read(buffer)) >= 0) {\r\n\t \tfor(OutputStream o : out)\r\n\t\t o.write(buffer, 0, len);\r\n\t }\r\n\t \r\n\t for(OutputStream o : out) {\r\n\t \to.flush();\r\n\t \to.close();\r\n\t }\r\n\t \r\n\t in.close();\r\n\t\t\r\n\t}",
"public void copyFile(File src, File dst) throws IOException {\n\t\tInputStream in = new FileInputStream(src);\n\t\tOutputStream out = new FileOutputStream(dst);\n\n\t\t// Transfer bytes from in to out\n\t\tbyte[] buf = new byte[1024];\n\t\tint len;\n\t\twhile ((len = in.read(buf)) > 0) {\n\t\t\tif(logger.isDebugEnabled())\n\t\t\t\tlogger.debug(\"Copiando fichero \" + src.getAbsolutePath() + \" a \"\n\t\t\t\t\t+ dst.getAbsolutePath());\n\t\t\tout.write(buf, 0, len);\n\t\t}\n\t\tin.close();\n\t\tout.close();\n\t}",
"@SuppressWarnings(\"resource\")\r\n\tpublic static synchronized void copyFile(File source, File dest)\r\n\t\t\tthrows IOException {\r\n\t\tFileChannel srcChannel = null;\r\n\t\tFileChannel dstChannel = null;\r\n\t\ttry {\r\n\t\t\tsrcChannel = new FileInputStream(source).getChannel();\r\n\t\t\tdstChannel = new FileOutputStream(dest).getChannel();\r\n\t\t\tdstChannel.transferFrom(srcChannel, 0, srcChannel.size());\r\n\t\t} finally {\r\n\t\t\tsrcChannel.close();\r\n\t\t\tdstChannel.close();\r\n\t\t}\r\n\t}",
"private static void readToFile(InputStream in, File localFile) throws IOException, FileNotFoundException {\n\t\tOutputStream output = null;\n\t\ttry {\n\t\t\toutput = new FileOutputStream(localFile);\n\t\t\t// download the file\n\t\t\tin = new BufferedInputStream(in);\n\t\t\tbyte data[] = new byte[1024];\n\t\t\tint count;\n\t\t\twhile ((count = in.read(data)) != -1) {\n\t\t\t\toutput.write(data, 0, count);\n\t\t\t}\n\t\t\toutput.flush();\n\t\t\toutput.close();\n\t\t}\n\t\tfinally {\n\t\t\tif(output != null) {\n\t\t\t\toutput.flush(); // close the local file in any case\n\t\t\t\toutput.close();\n\t\t\t}\n\t\t}\n\t}",
"public final static void pipe(final InputStream in, final OutputStream out)\n {\n new Thread(new Runnable()\n {\n @Override\n public void run()\n {\n try\n {\n IOUtils.copy(in, out);\n }\n catch (IOException e)\n {\n // Do nothing\n }\n }\n }).start();\n }",
"public static long copy(InputStream from, OutputStream to) throws IOException {\n // Copied from guava com.google.common.io.ByteStreams because its API is unstable (beta)\n checkNotNull(from);\n checkNotNull(to);\n byte[] buf = new byte[MAX_BUFFER_LENGTH];\n long total = 0;\n while (true) {\n int r = from.read(buf);\n if (r == -1) {\n break;\n }\n to.write(buf, 0, r);\n total += r;\n }\n return total;\n }",
"private void writeToFile(InputStream uploadedInputStream,\n\t\tString uploadedFileLocation) {\n\n\t\ttry {\n\t\t\tOutputStream out = new FileOutputStream(new File(\n\t\t\t\t\tuploadedFileLocation));\n\t\t\tint read = 0;\n\t\t\tbyte[] bytes = new byte[1024];\n\n\t\t\tout = new FileOutputStream(new File(uploadedFileLocation));\n\t\t\twhile ((read = uploadedInputStream.read(bytes)) != -1) {\n\t\t\t\tout.write(bytes, 0, read);\n\t\t\t}\n\t\t\tout.flush();\n\t\t\tout.close();\n\t\t} catch (IOException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"private void copyInputFile(String originalFilePath, String destinationFilePath) {\n String inputType = ((DataMapperDiagramEditor) workBenchPart.getSite().getWorkbenchWindow().getActivePage()\n .getActiveEditor()).getInputSchemaType();\n\n if (null != originalFilePath && null != destinationFilePath\n && (inputType.equals(\"XML\") || inputType.equals(\"JSON\") || inputType.equals(\"CSV\"))) {\n File originalFile = new File(originalFilePath);\n File copiedFile = new File(destinationFilePath);\n try {\n FileUtils.copyFile(originalFile, copiedFile);\n assert (copiedFile).exists();\n\t\t\t\tassert (Files.readAllLines(originalFile.toPath(), Charset.defaultCharset())\n\t\t\t\t\t\t.equals(Files.readAllLines(copiedFile.toPath(), Charset.defaultCharset())));\n } catch (IOException e) {\n log.error(\"IO error occured while saving the datamapper input file!\", e);\n }\n } else if (null != destinationFilePath) {\n clearContent(new File(destinationFilePath));\n }\n }",
"public static int copyInputStream(InputStream in, OutputStream out) throws IOException {\n int bytesCopied = 0;\n byte[] buffer = new byte[1024];\n int bytesReadToBuffer;\n while ((bytesReadToBuffer = in.read(buffer)) >= 0) {\n out.write(buffer, 0, bytesReadToBuffer);\n bytesCopied += bytesReadToBuffer;\n }\n in.close();\n out.close();\n return bytesCopied;\n }",
"private void writeToFile(InputStream uploadedInputStream,\n\t\t\tString uploadedFileLocation) {\n\n\t\ttry {\n\t\t\tOutputStream out = new FileOutputStream(new File(\n\t\t\t\t\tuploadedFileLocation));\n\t\t\tint read = 0;\n\t\t\tbyte[] bytes = new byte[1024];\n\n\t\t\tout = new FileOutputStream(new File(uploadedFileLocation));\n\t\t\twhile ((read = uploadedInputStream.read(bytes)) != -1) {\n\t\t\t\tout.write(bytes, 0, read);\n\t\t\t}\n\t\t\tout.flush();\n\t\t\tout.close();\n\t\t} catch (IOException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"private void writeToFile(InputStream uploadedInputStream,\n\t\t\tString uploadedFileLocation) {\n\n\t\ttry {\n\t\t\tOutputStream out = new FileOutputStream(new File(\n\t\t\t\t\tuploadedFileLocation));\n\t\t\tint read = 0;\n\t\t\tbyte[] bytes = new byte[1024];\n\n\t\t\tout = new FileOutputStream(new File(uploadedFileLocation));\n\t\t\twhile ((read = uploadedInputStream.read(bytes)) != -1) {\n\t\t\t\tout.write(bytes, 0, read);\n\t\t\t}\n\t\t\tout.flush();\n\t\t\tout.close();\n\t\t} catch (IOException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public static String readFileFromInputStream(final InputStream is) throws IOException\n\t{\n\t\tfinal BufferedReader input = new BufferedReader(new InputStreamReader(\n\t\t\t\tis, FILE_CHARSET_NAME));\n\t\ttry\n\t\t{\n\t\t\tfinal StringBuilder contents = new StringBuilder(BUFFER_SIZE);\n\n\t\t\t// copy from input stream\n\t\t\tfinal char[] charBuffer = new char[BUFFER_SIZE];\n\t\t\tint len;\n\t\t\twhile ((len = input.read(charBuffer)) > 0)\n\t\t\t{\n\t\t\t\tcontents.append(charBuffer, 0, len);\n\t\t\t}\n\n\t\t\treturn contents.toString().replaceAll(\"\\r\\n\", \"\\n\");\n\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tinput.close();\n\t\t}\n\t}",
"public StreamGobbler(InputStream from, PrintStream to) {\n\t\tinput = from;\n\t\toutput = to;\n\t}",
"public static void copyFile(File source, File destination) throws IOException {\n\tFileChannel sourceChannel = null;\n\tFileChannel destinationChannel = null;\n\ttry {\n\t if (destination.exists()) {\n\t\tdestination.delete();\n\t }\n\t sourceChannel = new FileInputStream(source).getChannel();\n\t destinationChannel = new FileOutputStream(destination).getChannel();\n\t int maxCount = (64 * 1024 * 1024) - (32 * 1024);// magic number for Windows, 64Mb - 32Kb\n\t long size = sourceChannel.size();\n\t long position = 0;\n\t while (position < size) {\n\t\tposition += sourceChannel.transferTo(position, maxCount, destinationChannel);\n\t }\n\t} catch (IOException e) {\n\t throw e;\n\t} finally {\n\t if (null != sourceChannel) {\n\t\tsourceChannel.close();\n\t }\n\t if (null != destinationChannel) {\n\t\tdestinationChannel.close();\n\t }\n\t}\n }",
"public void copy(){\n\t\tFileInputStream is = null;\n\t\tFileOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(source);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\tif(dest.exists())\n\t\t\t\tdest.delete();\n\t\t\tint i = -1;\n\t\t\twhile((i = is.read()) != -1)\n\t\t\t\tos.write(i);\n\t\t\tsource.deleteOnExit();\n\t\t} catch (IOException e) {\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t} finally {\n\t\t\tif(is != null)\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (IOException ignored) {}\n\t\t\tif(os != null)\n\t\t\t\ttry {\n\t\t\t\t\tos.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t\t\t}\n\t\t}\n\t}",
"public static void copy2(RandomAccessFile input, OutputStream output, long start, long length) throws IOException {\r\n\r\n\t\tbyte[] buffer = new byte[DEFAULT_BUFFER_SIZE];\r\n\t\tint read;\r\n\r\n\t\tif (input.length() == length) {\r\n\t\t\t// Write full range.\r\n\t\t\twhile ((read = input.read(buffer)) > 0) {\r\n\t\t\t\tByteArrayOutputStream bais = new ByteArrayOutputStream((int)length);\r\n\t\t\t\tbais.write(buffer, 0, read);\r\n//\t\t\t\toutput.write(buffer, 0, read);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Write partial range.\r\n\t\t\tinput.seek(start);\r\n\t\t\tlong toRead = length;\r\n\r\n\t\t\twhile ((read = input.read(buffer)) > 0) {\r\n\t\t\t\tif ((toRead -= read) > 0) {\r\n\t\t\t\t\tByteArrayOutputStream bais = new ByteArrayOutputStream((int)length);\r\n\t\t\t\t\tbais.write(buffer, 0, read);\r\n//\t\t\t\t\toutput.write(buffer, 0, read);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tByteArrayOutputStream bais = new ByteArrayOutputStream((int)length);\r\n//\t\t\t\t\tByteArrayOutputStream bais = new ByteArrayOutputStream((int)length);\r\n\t\t\t\t\tbais.write(buffer, 0, (int)toRead + read);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private File checkContent(InputStream input, HashResult hashResult)\n throws IOException, NoSuchAlgorithmException {\n File tmpFile = File.createTempFile(\"imported\", \"\", null);\n\n MessageDigest md = MessageDigest.getInstance(hashResult.getAlgorithm());\n\n if (md == null) {\n throw new RuntimeException(\"No digest could be obtained\");\n }\n\n FileOutputStream fos = null;\n\n try {\n fos = new FileOutputStream(tmpFile);\n } finally {\n IOUtil.safeClose(fos);\n }\n\n try {\n StreamUtil.copy(input, fos, -1, null, true, md);\n } finally {\n IOUtil.safeClose(fos);\n }\n\n if (!hashResult.equalsBytes(md.digest())) {\n throw new IllegalArgumentException(\"Checksum error: Expected = '\"\n\t + ByteArray.toHexString(hashResult.getBytes()) + \"', Found = '\"\n\t + ByteArray.toHexString(md.digest()) + \"'\");\n }\n\n return tmpFile;\n }",
"public static void copyInputToOutput(\n InputStream input,\n OutputStream output,\n long byteCount)\n throws IOException {\n int bytes;\n long length;\n \n BufferedInputStream in = new BufferedInputStream(input);\n BufferedOutputStream out = new BufferedOutputStream(output);\n \n byte[] buffer;\n buffer = new byte[8192];\n \n for (length = byteCount; length > 0;) {\n bytes = (int) (length > 8192 ? 8192 : length);\n \n try {\n bytes = in.read(buffer, 0, bytes);\n } catch (IOException ex) {\n try {\n in.close();\n out.close();\n } catch (IOException ex1) {\n }\n throw new IOException(\n \"Reading input stream, \" + ex.getMessage());\n }\n \n if (bytes < 0)\n break;\n \n length -= bytes;\n \n try {\n out.write(buffer, 0, bytes);\n } catch (IOException ex) {\n try {\n in.close();\n out.close();\n } catch (IOException ex1) {\n }\n throw new IOException(\n \"Writing output stream, \" + ex.getMessage());\n }\n }\n \n try {\n in.close();\n out.close();\n } catch (IOException ex) {\n throw new IOException(\"Closing file streams, \" + ex.getMessage());\n }\n }",
"public static void copy(byte[] in, OutputStream out) throws IOException {\n if (in == null) throw new IllegalArgumentException(\"No input byte array specified\");\n if (out == null) throw new IllegalArgumentException(\"No OutputStream specified\");\n out.write(in);\n }",
"private static void copyFirstVersion(RandomAccessFile input, OutputStream output, long start, long length) throws IOException {\r\n\r\n\t\tbyte[] buffer = new byte[DEFAULT_BUFFER_SIZE];\r\n\t\tint read;\r\n\r\n\r\n\t\tif (input.length() == length) {\r\n\r\n\t\t\tByteArrayInputStream bai = new ByteArrayInputStream(buffer);\r\n\t\t\t// Write full range.\r\n\t\t\twhile ((read = bai.read(buffer)) > 0) {\r\n\t\t\t\tByteArrayOutputStream bao = new ByteArrayOutputStream();\r\n//\t\t\t\tbai.read(buffer, 0, (int) length);\r\n\t\t\t\tbao.write(buffer, 0,(int) length);\r\n//\t\t\t\toutput.write(buffer, 0, read);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Write partial range.\r\n//\t\t\tinput.seek(start);\r\n\t\t\tlong toRead = length;\r\n//\r\n//\t\t\twhile ((read = input.read(buffer)) > 0) {\r\n//\t\t\t\tif ((toRead -= read) > 0) {\r\n//\t\t\t\t\toutput.write(buffer, 0, read);\r\n//\t\t\t\t} else {\r\n//\t\t\t\t\toutput.write(buffer, 0, (int) toRead + read);\r\n//\t\t\t\t\tbreak;\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n\r\n\t\t\tByteArrayInputStream bai = new ByteArrayInputStream(buffer);\r\n\t\t\tByteArrayOutputStream bao = new ByteArrayOutputStream();\r\n\t\t\twhile ((read = bai.read(buffer)) > 0) {\r\n\t\t\t\tif((toRead -= read) > 0) {\r\n\t\t\t\t\tbao.write(buffer, 0, read);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbao.write(buffer,0,(int)toRead + read);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// bai.read(buffer, 0, (int) length);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void copyInputStreamToFile(Context context, String name)\n throws IOException {\n\n try (FileOutputStream outputStream = new FileOutputStream(string_FILENAME + name)) {\n\n int read;\n byte[] bytes = new byte[1024];\n while ((read = context.getAssets().open(\"training.ipynb\").read(bytes)) != -1) {\n outputStream.write(bytes, 0, read);\n }\n }\n }",
"protected abstract InputStream getInStreamImpl(String filename) throws IOException;",
"@Test(groups = \"Integration\")\n public void testCopyFileTo() throws Exception {\n File dest = Os.newTempFile(getClass(), \".dest.tmp\");\n File src = Os.newTempFile(getClass(), \".src.tmp\");\n try {\n Files.write(\"abc\", src, Charsets.UTF_8);\n host.copyTo(src, dest);\n assertEquals(\"abc\", Files.readFirstLine(dest, Charsets.UTF_8));\n } finally {\n src.delete();\n dest.delete();\n }\n }",
"public void copyWithPrintBuffer() throws IOException {\n\t\tBufferedReader in = null;\n\t\tPrintWriter out = null;\n\t\tlong startTime, elapsedTime;\n\t\tString line;\n\n\t\tstartTime = System.nanoTime();\n\t\ttry {\n\t\t\tin = new BufferedReader(new FileReader(inFileStr));\n\t\t\tout = new PrintWriter(new FileWriter(outFileStr));\n\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tout.write(line);\n\t\t\t}\n\t\t} finally {\n\t\t\tif (in != null)\n\t\t\t\tin.close();\n\t\t\tif (out != null)\n\t\t\t\tout.close();\n\t\t}\n\t\telapsedTime = System.nanoTime() - startTime;\n\t\tSystem.out\n\t\t\t\t.println(\"copyWithPrintBuffer() [\" + new File(inFileStr).length() / (elapsedTime / 1000.0) + \" MB/S]\");\n\t}",
"public StreamReader(InputStream input) throws IOException {\r\n\t\tthis.setInput(input);\r\n\t}",
"private static void extractFile(ZipInputStream inStreamZip, FSDataOutputStream destDirectory) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(destDirectory);\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = inStreamZip.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }",
"private static Path saveTempFile(InputStream input) throws IOException {\n\t\tPath tempFile = Files.createTempFile(null, \".csv\");\n\t\tFiles.copy(input, tempFile, StandardCopyOption.REPLACE_EXISTING);\n\n\t\tinput.close();\n\n\t\t// TODO delete tempFile\n\t\treturn tempFile;\n\t}",
"private void addTextfileToOutputStream(OutputStream outputStream) {\n Log.i(TAG, \"adding file to outputstream...\");\n byte[] buffer = new byte[1024];\n int bytesRead;\n try {\n BufferedInputStream inputStream = new BufferedInputStream(\n new FileInputStream(Upload_File));\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n outputStream.write(buffer, 0, bytesRead);\n }\n } catch (IOException e) {\n Log.i(TAG, \"problem converting input stream to output stream: \" + e);\n e.printStackTrace();\n }\n }",
"public static void copyFileSourceToDestination(File src, File dest) throws IOException {\n\t\tInputStream is = null;\n\t\tOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(src);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\t// buffer size 1K\n\t\t\tbyte[] buf = new byte[1024];\n\t\t\tint bytesRead;\n\t\t\twhile ((bytesRead = is.read(buf)) > 0) {\n\t\t\t\tos.write(buf, 0, bytesRead);\n\t\t\t}\n\t\t} finally {\n\t\t\tis.close();\n\t\t\tos.close();\n\t\t}\n\t}",
"private void copyJpeg(InputStream in, OutputStream out) throws\n\t\tIOException\n\t{\n\t\tboolean notFinished = true;\n\t\tlong copiedBytes = 3;\n\t\tdo\n\t\t{\n\t\t\tint v1 = in.read();\n\t\t\tif (v1 == 0xff) // marker\n\t\t\t{\n\t\t\t\tint v2 = in.read();\n\t\t\t\tif (v2 < 0) // end of file\n\t\t\t\t{\n\t\t\t\t\tout.write(0xff);\n\t\t\t\t\tcopiedBytes++;\n\t\t\t\t\tnotFinished = false;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\tif (v2 == 0xd9) // embedded JPEG stream ended\n\t\t\t\t{\n\t\t\t\t\t// copy the end of stream marker\n\t\t\t\t\tout.write(0xff);\n\t\t\t\t\tout.write(0xd9);\n\t\t\t\t\tcopiedBytes += 2;\n\t\t\t\t\tnotFinished = false;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// copy the two bytes, just a marker of the embedded JPEG\n\t\t\t\t\tout.write(0xff);\n\t\t\t\t\tout.write(v2);\n\t\t\t\t\tcopiedBytes += 2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\tif (v1 == -1) // unexpected end of input file\n\t\t\t{\n\t\t\t\tnotFinished = false;\n\t\t\t}\n\t\t\telse // just copy that value\n\t\t\t{\n\t\t\t\tout.write(v1);\n\t\t\t\tcopiedBytes++;\n\t\t\t}\n\t\t}\n\t\twhile (notFinished);\n\t\ttotalBytes += copiedBytes;\n\t\tif (!quiet)\n\t\t{\n\t\t\tSystem.out.println(\" (\" + copiedBytes + \" bytes)\");\n\t\t}\n\t\ttotalOutputFiles++;\n\t\t// close output stream\n\t\ttry\n\t\t{\n\t\t\tout.close();\n\t\t}\n\t\tcatch (IOException ioe)\n\t\t{\n\t\t\t// ignore error when closing output stream\n\t\t}\n\t}",
"public static void copy(InputStream input, OutputStream output, int bufferSize) throws IOException {\n bufferSize = Math.max(Math.min(MAX_BUFFER_SIZE, bufferSize), MIN_BUFFER_SIZE);\n try(InputStream in = get(input); OutputStream out = get(output)) {\n byte[] buf = new byte[bufferSize];\n int r;\n while((r = in.read(buf)) != -1) {\n out.write(buf, 0, r);\n }\n }\n }",
"private File saveToFile(InputStream uploadedInputStream,\n\t\t\t\t\t\t\tString uploadedFileLocation) {\n\t\t// Declare an output stream.\n\t\tFile newFile = null;\n\t\ttry {\n\t\t\tOutputStream out = null;\n\t\t\t// number of bytes read\n\t\t\tint read = 0;\n\t\t\t// 1024-byte buffer\n\t\t\tbyte[] bytes = new byte[1024];\n\t\t\t// Assign file output stream.\n\t\t\tnewFile = new File(uploadedFileLocation);\n\t\t\tout = new FileOutputStream(newFile);\n\t\t\t// Read the file until no more bytes are read.\n\t\t\twhile ((read = uploadedInputStream.read(bytes)) != -1) {\n\t\t\t\t// Write these bytes.\n\t\t\t\tout.write(bytes, 0, read);\n\t\t\t}\n\t\t\t// Flush it.\n\t\t\tout.flush();\n\t\t\t// Close it.\n\t\t\tout.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn newFile;\n\t}",
"InputStream getInputStream() throws IOException;",
"InputStream getInputStream() throws IOException;",
"InputStream getInputStream() throws IOException;",
"public static long copy(InputStream input, OutputStream output, byte[] buffer) throws IOException {\n long count = 0;\n int bytesRead = 0;\n while (-1 != (bytesRead = input.read(buffer))) {\n output.write(buffer, 0, bytesRead);\n count += bytesRead;\n }\n return count;\n }",
"public File preProcessFile(InputStream in) throws IOException {\n\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm:ss\");\n\t\tLOG.info(\"BIOPAX Conversion started \"\n\t\t\t\t+ sdf.format(Calendar.getInstance().getTime()));\n\n\t\tif (in == null) {\n\t\t\tthrow new IllegalArgumentException(\"Input File: \" + \" is not found\");\n\t\t}\n\n\t\tSimpleIOHandler simpleIO = new SimpleIOHandler(BioPAXLevel.L3);\n\n\t\t// create a Paxtools Model from the BioPAX L3 RDF/XML input file (stream)\n\t\torg.biopax.paxtools.model.Model model = simpleIO.convertFromOWL(in);\n\t\t// - and the input stream 'in' gets closed inside the above method call\n\n\t\t// set for the IO to output full URIs:\n\n\t\tsimpleIO.absoluteUris(true);\n\n\t\tFile fullUriBiopaxInput = File.createTempFile(\"paxtools\", \".owl\");\n\n\t\tfullUriBiopaxInput.deleteOnExit(); // delete on JVM exits\n\t\tFileOutputStream outputStream = new FileOutputStream(fullUriBiopaxInput);\n\n\t\t// write to an output stream (back to RDF/XML)\n\n\t\tsimpleIO.convertToOWL((org.biopax.paxtools.model.Model) model,\toutputStream); // it closes the stream internally\n\n\t\tLOG.info(\"BIOPAX Conversion finished \" + sdf.format(Calendar.getInstance().getTime()));\n\t\treturn fullUriBiopaxInput;\n\t}",
"public static void Copy(File toCopy, File destination) throws IOException {\n\t\tInputStream in = new BufferedInputStream(new FileInputStream(toCopy));\n\t\tOutputStream out = new BufferedOutputStream(new FileOutputStream(destination));\n\n\t\tbyte[] buffer = new byte[1024];\n\t\tint lengthRead;\n\t\twhile ((lengthRead = in.read(buffer)) > 0) {\n\t\t\tout.write(buffer, 0, lengthRead);\n\t\t\tout.flush();\n\t\t}\n\t\tout.close();\n\t\tin.close();\n\t}",
"public static int copy(InputStream in, OutputStream out) throws IOException {\n if (in == null) throw new IllegalArgumentException(\"No InputStream specified\");\n if (out == null) throw new IllegalArgumentException(\"No OutputStream specified\");\n int byteCount = 0;\n byte[] buffer = new byte[BUFFER_SIZE];\n int bytesRead;\n while ((bytesRead = in.read(buffer)) != -1) {\n out.write(buffer, 0, bytesRead);\n byteCount += bytesRead;\n }\n out.flush();\n return byteCount;\n }",
"void copyFile(String sourceFile, String destinationFile, boolean overwrite) throws IOException;",
"public void copyFile(File src, File dst) throws IOException {\n File file = new File(dst + File.separator + src.getName());\n file.createNewFile();\n Log.i(\"pictureSelect\", \"Dest file: \" + file.getAbsolutePath());\n\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(file);\n\n // Transfer bytes from in to out\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n in.close();\n out.close();\n scanSD(file);\n }"
] |
[
"0.7210888",
"0.6881252",
"0.6868957",
"0.66319484",
"0.65760803",
"0.6443956",
"0.6413198",
"0.6407801",
"0.6403256",
"0.6372442",
"0.6357866",
"0.6332997",
"0.6329483",
"0.6326049",
"0.6317874",
"0.630162",
"0.62209857",
"0.6154725",
"0.6148575",
"0.61187315",
"0.6083587",
"0.59506845",
"0.5926694",
"0.59030926",
"0.5854606",
"0.5852824",
"0.58106464",
"0.5780688",
"0.5773417",
"0.5751262",
"0.5730993",
"0.5703384",
"0.56769127",
"0.5675146",
"0.5659213",
"0.56524",
"0.5641768",
"0.56342417",
"0.5628592",
"0.5625056",
"0.56024146",
"0.55938053",
"0.5571214",
"0.55547017",
"0.5549364",
"0.5518117",
"0.5510114",
"0.5505717",
"0.5494368",
"0.5489929",
"0.5477564",
"0.54747367",
"0.545536",
"0.54456",
"0.54411477",
"0.5408861",
"0.54064107",
"0.5402864",
"0.5400307",
"0.5384658",
"0.53659505",
"0.5365936",
"0.53571355",
"0.53435594",
"0.533019",
"0.5329513",
"0.53293914",
"0.5323949",
"0.5322585",
"0.5322585",
"0.53048265",
"0.529192",
"0.5287203",
"0.52833074",
"0.5264933",
"0.5260742",
"0.5259813",
"0.52586293",
"0.5258624",
"0.52582973",
"0.52549016",
"0.52422184",
"0.52379686",
"0.52362645",
"0.5235048",
"0.5231506",
"0.5228751",
"0.52222955",
"0.52149785",
"0.52124214",
"0.5211507",
"0.5209414",
"0.5209414",
"0.5209414",
"0.5208466",
"0.52069116",
"0.51776314",
"0.51704156",
"0.51690376",
"0.5168366"
] |
0.7277662
|
0
|
Copy a single file from 'from' to 'to'
|
public static void copyFile(File from, File to) throws IOException {
FileInputStream in = new FileInputStream(from);
copyFile(in, to);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private static void copyFile(String from, String to)\n\t{\n\t\tFile inputFile;\n\t File outputFile;\n\t\tint fIndex = from.indexOf(\"file:\");\n\t\tint tIndex = to.indexOf(\"file:\");\n\t\tif(fIndex < 0)\n\t\t\tinputFile = new File(from);\n\t\telse\n\t\t\tinputFile = new File(from.substring(fIndex + 5, from.length()));\n\t\tif(tIndex < 0)\n\t\t\toutputFile = new File(to);\n\t\telse\n\t\t\toutputFile = new File(to.substring(tIndex + 5, to.length())); \n\t\tcopyFile(inputFile, outputFile);\t\t\n\t}",
"public void copyOne(String from, String to) {\n\t\tFile source = new File(from);\n\t\tif (sourceExists(source)) {\n\t\t\tFile target = new File(to);\n\t\t\ttry{\n\t\t\t\tif(!targetExists(target)){\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath());\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName()\n\t\t\t\t\t\t\t+ \" COPIED!\");\n\t\t\t\t} else if (target.exists() && confirmReplace()) {\n\t\t\t\t\tFiles.copy(source.toPath(), target.toPath(),\n\t\t\t\t\t\t\tREPLACE_EXISTING);\n\t\t\t\t\tSystem.out.println(\"File \" + target.getName() + \" REPLACED!\");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"File WASN'T copied!\");\n\t\t\t\t}\n\t\t\t}catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from);\r\n Path dest = Paths.get(to);\r\n Files.copy(src, dest, StandardCopyOption.REPLACE_EXISTING);\r\n }",
"public static void copyFile(String from, String to) throws IOException{\r\n Path src = Paths.get(from); // set path of source directory from parent function\r\n Path dest = Paths.get(to); // set path of destination directory from parent function\r\n Files.copy(src, dest); //inbuilt function to copy files\r\n \r\n }",
"public static IStatus copyFile(String from, String to) {\n \t\ttry {\n \t\t\treturn copyFile(new FileInputStream(from), to);\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t}\n \t}",
"public static void copyFile(InputStream in, File to) throws IOException {\r\n FileOutputStream out = new FileOutputStream(to);\r\n int len;\r\n byte[] buffer = new byte[4096];\r\n while ((len = in.read(buffer)) != -1) {\r\n out.write(buffer, 0, len);\r\n }\r\n out.close();\r\n in.close();\r\n }",
"private int copy(String from, String to, int flag) {\n\n File fromFile = new File(rootPath + from);\n if (!fromFile.exists()) {\n return ERROR_FILE_NOT_EXIST;\n }\n\n if ((flag & FLAG_FORCE) != 0) {\n delete(to);\n }\n\n if (createFile(to) < 0) {\n return ERROR_FILE_ALREADY_EXIST;\n }\n\n File toFile = new File(rootPath + to);\n if (!toFile.setWritable(true)) {\n return ERROR;\n }\n\n try {\n BufferedInputStream inputStream = new BufferedInputStream(new FileInputStream(fromFile));\n BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(toFile));\n byte[] buf = new byte[BUF_SIZE];\n // TODO : it limits file size to INTEGER!!\n int offset = 0;\n int read = 0;\n while((read = inputStream.read(buf)) >= 0) {\n outputStream.write(buf, offset, read);\n offset += read;\n }\n inputStream.close();\n outputStream.close();\n } catch (FileNotFoundException e) {\n // file not found\n return ERROR_FILE_NOT_EXIST;\n } catch (IOException e) {\n // IO Exception\n return ERROR;\n }\n\n return OK;\n }",
"private void copy(File src, File dst) throws IOException \r\n {\r\n InputStream in = new FileInputStream(src);\r\n OutputStream out = new FileOutputStream(dst);\r\n \r\n // Transfer bytes from in to out\r\n byte[] buf = new byte[1024];\r\n int len;\r\n while ((len = in.read(buf)) > 0) \r\n {\r\n out.write(buf, 0, len);\r\n }\r\n in.close();\r\n out.close();\r\n }",
"void copyFile(String sourceFile, String destinationFile) throws IOException;",
"private static void copyFile(File in, File out)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFileChannel inChannel = new\tFileInputStream(in).getChannel();\n\t\t\tFileChannel outChannel = new FileOutputStream(out).getChannel();\n\t\t\tinChannel.transferTo(0, inChannel.size(), outChannel);\n\t\t\tinChannel.close();\n\t\t\toutChannel.close();\t\t\t\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.copyFile(): \" + e);\n\t\t}\n\n\t}",
"public static IStatus copyFile(URL from, String to) {\n \t\ttry {\n \t\t\treturn copyFile(from.openStream(), to);\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t}\n \t}",
"private void copyFile(String source, String destination) throws IOException {\n File inputFile = new File(source);\n File outputFile = new File(destination);\n\t\n BufferedInputStream in = new BufferedInputStream(\n\t\t\t\t new FileInputStream(inputFile));\n BufferedOutputStream out = new BufferedOutputStream(\n\t\t\t\t new FileOutputStream(outputFile));\n int c;\n\tbyte[] tmp = new byte[4096];\n\t\n while ((c = in.read(tmp, 0, 4096)) != -1)\n\t out.write(tmp, 0, c);\n\t\n in.close();\n out.close();\n }",
"private void copyFile(InputStream ins, OutputStream outs) throws IOException {\n byte[] buffer = new byte[1024];\n int read;\n while((read = ins.read(buffer)) != -1) {\n outs.write(buffer, 0, read);\n }\n }",
"void copyFile(String sourceFile, String destinationFile, boolean overwrite) throws IOException;",
"public static IStatus copyFile(InputStream in, String to) {\n \t\tOutputStream out = null;\n \t\n \t\ttry {\n \t\t\tout = new FileOutputStream(to);\n \t\n \t\t\tint avail = in.read(buf);\n \t\t\twhile (avail > 0) {\n \t\t\t\tout.write(buf, 0, avail);\n \t\t\t\tavail = in.read(buf);\n \t\t\t}\n \t\t\treturn Status.OK_STATUS;\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying file\", e);\n \t\t\treturn new Status(IStatus.ERROR, TomcatPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorCopyingFile, new String[] {to, e.getLocalizedMessage()}), e);\n \t\t} finally {\n \t\t\ttry {\n \t\t\t\tif (in != null)\n \t\t\t\t\tin.close();\n \t\t\t} catch (Exception ex) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t\ttry {\n \t\t\t\tif (out != null)\n \t\t\t\t\tout.close();\n \t\t\t} catch (Exception ex) {\n \t\t\t\t// ignore\n \t\t\t}\n \t\t}\n \t}",
"private static void copyFile(File scrFile, File file) {\n\t\r\n}",
"static void copyFile(File src, File dest) throws IOException {\r\n\t\tFileInputStream fis = new FileInputStream(src);\r\n\t\tFileOutputStream fos = new FileOutputStream (dest);\r\n\t\tbyte[] bytes = new byte[4*1048576];\r\n\t\tint numRead;\r\n\t\twhile ((numRead = fis.read(bytes)) > 0) {\r\n\t\t\tfos.write(bytes, 0, numRead);\r\n\t\t}\r\n\t\tfis.close();\r\n\t\tfos.close();\r\n\t}",
"@SuppressWarnings(\"resource\")\r\n\tpublic static synchronized void copyFile(File source, File dest)\r\n\t\t\tthrows IOException {\r\n\t\tFileChannel srcChannel = null;\r\n\t\tFileChannel dstChannel = null;\r\n\t\ttry {\r\n\t\t\tsrcChannel = new FileInputStream(source).getChannel();\r\n\t\t\tdstChannel = new FileOutputStream(dest).getChannel();\r\n\t\t\tdstChannel.transferFrom(srcChannel, 0, srcChannel.size());\r\n\t\t} finally {\r\n\t\t\tsrcChannel.close();\r\n\t\t\tdstChannel.close();\r\n\t\t}\r\n\t}",
"public static void copyFile(final String fromPath, final String toPath) throws IOException {\n FileUtils.copyFileToDirectory(new File(fromPath), new File(toPath));\n }",
"public void copyFile(String destination, String fileName, InputStream in) {\r\n try {\r\n // write the inputStream to a FileOutputStream\r\n OutputStream out = new FileOutputStream(new File(destination + fileName));\r\n int read = 0;\r\n byte[] bytes = new byte[1024];\r\n while ((read = in.read(bytes)) != -1) {\r\n out.write(bytes, 0, read);\r\n }\r\n in.close();\r\n out.flush();\r\n out.close();\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }",
"public static void copyFile(File src, File dst) throws IOException {\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(dst);\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) out.write(buf, 0, len);\n in.close();\n out.close();\n }",
"private void streamCopy(InputStream from, OutputStream to) {\r\n\t\ttry {\r\n\t\t\tint count = 0;\r\n\t\t\tbyte[] buffer = new byte[16*1024];\r\n\t\t\twhile ((count = from.read(buffer)) > 0) {\r\n\t\t\t\tto.write(buffer, 0, count);\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\tEventLogger.logConnectionException(logger, socket, e);\r\n\t\t}\r\n\t}",
"public static void copyFile(File source, File destination) throws IOException {\n\tFileChannel sourceChannel = null;\n\tFileChannel destinationChannel = null;\n\ttry {\n\t if (destination.exists()) {\n\t\tdestination.delete();\n\t }\n\t sourceChannel = new FileInputStream(source).getChannel();\n\t destinationChannel = new FileOutputStream(destination).getChannel();\n\t int maxCount = (64 * 1024 * 1024) - (32 * 1024);// magic number for Windows, 64Mb - 32Kb\n\t long size = sourceChannel.size();\n\t long position = 0;\n\t while (position < size) {\n\t\tposition += sourceChannel.transferTo(position, maxCount, destinationChannel);\n\t }\n\t} catch (IOException e) {\n\t throw e;\n\t} finally {\n\t if (null != sourceChannel) {\n\t\tsourceChannel.close();\n\t }\n\t if (null != destinationChannel) {\n\t\tdestinationChannel.close();\n\t }\n\t}\n }",
"public void copyFile(File src, File dst) throws IOException {\n\t\tInputStream in = new FileInputStream(src);\n\t\tOutputStream out = new FileOutputStream(dst);\n\n\t\t// Transfer bytes from in to out\n\t\tbyte[] buf = new byte[1024];\n\t\tint len;\n\t\twhile ((len = in.read(buf)) > 0) {\n\t\t\tif(logger.isDebugEnabled())\n\t\t\t\tlogger.debug(\"Copiando fichero \" + src.getAbsolutePath() + \" a \"\n\t\t\t\t\t+ dst.getAbsolutePath());\n\t\t\tout.write(buf, 0, len);\n\t\t}\n\t\tin.close();\n\t\tout.close();\n\t}",
"public void copyFile(String src, String dst) throws IOException {\n\n\t\tFile srcFile = new File(src);\n\t\tFile dstFile = new File(dst);\n\n\t\tcopyFile(srcFile, dstFile);\n\t}",
"public static void Copy(File toCopy, File destination) throws IOException {\n\t\tInputStream in = new BufferedInputStream(new FileInputStream(toCopy));\n\t\tOutputStream out = new BufferedOutputStream(new FileOutputStream(destination));\n\n\t\tbyte[] buffer = new byte[1024];\n\t\tint lengthRead;\n\t\twhile ((lengthRead = in.read(buffer)) > 0) {\n\t\t\tout.write(buffer, 0, lengthRead);\n\t\t\tout.flush();\n\t\t}\n\t\tout.close();\n\t\tin.close();\n\t}",
"@Test(groups = \"Integration\")\n public void testCopyFileTo() throws Exception {\n File dest = Os.newTempFile(getClass(), \".dest.tmp\");\n File src = Os.newTempFile(getClass(), \".src.tmp\");\n try {\n Files.write(\"abc\", src, Charsets.UTF_8);\n host.copyTo(src, dest);\n assertEquals(\"abc\", Files.readFirstLine(dest, Charsets.UTF_8));\n } finally {\n src.delete();\n dest.delete();\n }\n }",
"public static void copyFile(final File from, final File toDir) throws IOException {\n if (!from.canRead()) {\n throw new IOException(\"Cannot read file '\" + from + \"'.\");\n }\n if (toDir.exists() && (!toDir.canWrite())) {\n throw new IOException(\"Cannot write to file '\" + toDir + \"'.\");\n }\n toDir.getParentFile().mkdirs();\n FileUtils.copyFile(from, toDir);\n }",
"public void copy(){\n\t\tFileInputStream is = null;\n\t\tFileOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(source);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\tif(dest.exists())\n\t\t\t\tdest.delete();\n\t\t\tint i = -1;\n\t\t\twhile((i = is.read()) != -1)\n\t\t\t\tos.write(i);\n\t\t\tsource.deleteOnExit();\n\t\t} catch (IOException e) {\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t} finally {\n\t\t\tif(is != null)\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (IOException ignored) {}\n\t\t\tif(os != null)\n\t\t\t\ttry {\n\t\t\t\t\tos.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t\t\t}\n\t\t}\n\t}",
"public static void copyFile(File src, File dst) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"Source file does not exist: \" + src);\n }\n \n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n try (InputStream in = new FileInputStream(src); OutputStream out = new FileOutputStream(dst)) {\n\n // Transfer bytes from in to out\n byte[] buf = new byte[10240];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n } catch (IOException e) {\n logger.warn(\"Unable to copy file \" + e.getMessage(), e);\n throw new IOException(\"Unable to copy file \", e);\n }\n }",
"@Override\n public void copyBlob(BlobId from, BlobId to) {\n BlobInfo toInfo = BlobInfo.newBuilder(to).build();\n CopyWriter w =\n storageProvider\n .get()\n .copy(CopyRequest.newBuilder().setSource(from).setTarget(toInfo).build());\n while (!w.isDone()) {\n w.copyChunk();\n }\n }",
"void copyFile(File sourcefile, File targetfile) throws Exception {\n\t\tif(targetfile.exists()) targetfile.delete();\n\t\ttargetfile.createNewFile();\n\t\tFileChannel source = null;\n\t\tFileChannel target = null;\n\t\ttry{\n\t\t\tsource = new FileInputStream(sourcefile).getChannel();\n\t\t\ttarget = new FileOutputStream(targetfile).getChannel();\n\t\t\ttarget.transferFrom(source, 0, source.size());\n\t\t}\n\t\tfinally{\n\t\t\tif(source!=null) source.close();\n\t\t\tif(target!=null) target.close();\n\t\t}\n\t\ttargetfile.setLastModified(sourcefile.lastModified());\n\t}",
"public boolean copy(String path, InputStream is) throws SystemException;",
"private void copyFile( final File source, final File target )\n throws MojoExecutionException\n {\n if ( source.exists() == false )\n {\n throw new MojoExecutionException( \"Source file '\" + source.getAbsolutePath() + \"' does not exist!\" );\n }\n if ( target.exists() == true )\n {\n throw new MojoExecutionException( \"Target file '\" + source.getAbsolutePath() + \"' already existing!\" );\n }\n\n try\n {\n this.logger.debug( \"Copying file from '\" + source.getAbsolutePath() + \"' to \" + \"'\"\n + target.getAbsolutePath() + \"'.\" );\n PtFileUtil.copyFile( source, target );\n }\n catch ( PtException e )\n {\n throw new MojoExecutionException( \"Could not copy file from '\" + source.getAbsolutePath() + \"' to \" + \"'\"\n + target.getAbsolutePath() + \"'!\", e );\n }\n }",
"public static void copyFile(final String fileName, final String fromDir, final String toDir)\n throws IOException {\n FileUtils.copyFile(new File(fromDir, fileName), new File(toDir, fileName));\n }",
"private static boolean copyDirectory(File from, File to)\n {\n return copyDirectory(from, to, (byte[])null);\n }",
"public static void copyFileSourceToDestination(File src, File dest) throws IOException {\n\t\tInputStream is = null;\n\t\tOutputStream os = null;\n\t\ttry {\n\t\t\tis = new FileInputStream(src);\n\t\t\tos = new FileOutputStream(dest);\n\t\t\t// buffer size 1K\n\t\t\tbyte[] buf = new byte[1024];\n\t\t\tint bytesRead;\n\t\t\twhile ((bytesRead = is.read(buf)) > 0) {\n\t\t\t\tos.write(buf, 0, bytesRead);\n\t\t\t}\n\t\t} finally {\n\t\t\tis.close();\n\t\t\tos.close();\n\t\t}\n\t}",
"public static boolean copyFileContent(Path fromFile, Path toFile) {\n try {\n List<String> fileContent = Files.readAllLines(fromFile);\n Files.write(toFile, fileContent);\n } catch (IOException e) {\n return false;\n }\n return true;\n }",
"public void copyFile(File src, File dst) throws IOException {\n File file = new File(dst + File.separator + src.getName());\n file.createNewFile();\n Log.i(\"pictureSelect\", \"Dest file: \" + file.getAbsolutePath());\n\n InputStream in = new FileInputStream(src);\n OutputStream out = new FileOutputStream(file);\n\n // Transfer bytes from in to out\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n in.close();\n out.close();\n scanSD(file);\n }",
"private static void copyFile(InputStream is, OutputStream os) throws IOException {\n\n final byte[] buf = new byte[4096];\n int cnt = is.read(buf, 0, buf.length);\n while (cnt >= 0) {\n os.write(buf, 0, cnt);\n cnt = is.read(buf, 0, buf.length);\n }\n os.flush();\n }",
"public String copy(MultipartFile file) throws IOException;",
"static void copyFile(File srcFile, File destFile) {\n\t\ttry {\n\t\t\tLong start = System.currentTimeMillis();\n\t\t\tdestFile.createNewFile();\n\t\t\tInputStream oInStream = new FileInputStream(srcFile);\n\t\t\tOutputStream oOutStream = new FileOutputStream(destFile);\n\n\t\t\t// Transfer bytes from in to out\n\t\t\tbyte[] oBytes = new byte[1024];\n\t\t\tint nLength;\n\t\t\tBufferedInputStream oBuffInputStream = \n\t\t\t\t\tnew BufferedInputStream( oInStream );\n\t\t\twhile ((nLength = oBuffInputStream.read(oBytes)) > 0) {\n\t\t\t\toOutStream.write(oBytes, 0, nLength);\n\t\t\t}\n\t\t\toInStream.close();\n\t\t\toOutStream.close();\n\t\t\tLong end = System.currentTimeMillis();\n\t\t\tSystem.out.println((end-start));\n\t\t} catch (IOException e) {\n\t\t\tlogger.info(\"Error in creating the excels :\" +e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public static boolean copyFile(String src, String dst) {\n FileChannel inChannel = null;\n FileChannel outChannel = null;\n try {\n inChannel = new FileInputStream(new File(src)).getChannel();\n outChannel = new FileOutputStream(new File(dst)).getChannel();\n inChannel.transferTo(0, inChannel.size(), outChannel);\n } catch (FileNotFoundException e) {\n MessageGenerator.briefError(\"ERROR could not find/access file(s): \" + src + \" and/or \" + dst);\n return false;\n } catch (IOException e) {\n MessageGenerator.briefError(\"ERROR copying file: \" + src + \" to \" + dst);\n return false;\n } finally {\n try {\n if (inChannel != null)\n inChannel.close();\n if (outChannel != null)\n outChannel.close();\n } catch (IOException e) {\n MessageGenerator.briefError(\"Error closing files involved in copying: \" + src + \" and \" + dst);\n return false;\n }\n }\n return true;\n }",
"public static void copyFile(File sourceFile, File destFile)\n throws IOException {\n if (!destFile.exists()) {\n destFile.createNewFile();\n }\n FileChannel source = null;\n FileChannel destination = null;\n try {\n source = new FileInputStream(sourceFile).getChannel();\n destination = new FileOutputStream(destFile).getChannel();\n destination.transferFrom(source, 0, source.size());\n } catch (Exception e) {} finally {\n if (source != null) {\n source.close();\n }\n if (destination != null) {\n destination.close();\n }\n }\n }",
"private static long copy(InputStream from, OutputStream to) throws IOException {\n byte[] buf = new byte[BUFFER];\n long total = 0;\n while (true) {\n int r = from.read(buf);\n if (r == -1) {\n break;\n }\n to.write(buf, 0, r);\n total += r;\n }\n return total;\n }",
"@Override\r\n\tpublic void copy(String from, String to) {\n\t\t\r\n\t}",
"public static void copy(File file, File file2) {\n Throwable th;\n Throwable th2;\n Throwable th3;\n Throwable th4 = null;\n FileInputStream fileInputStream = new FileInputStream(file);\n FileOutputStream fileOutputStream = new FileOutputStream(file2);\n byte[] bArr = new byte[1024];\n while (true) {\n int read = fileInputStream.read(bArr);\n if (read > 0) {\n fileOutputStream.write(bArr, 0, read);\n } else {\n fileOutputStream.close();\n fileInputStream.close();\n return;\n }\n }\n throw th2;\n if (th4 == null) {\n }\n throw th;\n throw th;\n if (th3 != null) {\n try {\n fileOutputStream.close();\n } catch (Throwable th5) {\n }\n } else {\n fileOutputStream.close();\n }\n throw th2;\n }",
"private void copyFile(String source, String destination, Environment env) throws IOException, InvalidPathException {\n\t\tPath sourcePath = Paths.get(source);\n\t\tPath destinationPath = Paths.get(destination);\n\n\t\tif (sourcePath.equals(destinationPath)) {\n\t\t\tenv.writeln(\"The source and the destination can not be equal.\");\n\t\t\treturn;\n\t\t}\n\t\tif (!Files.exists(sourcePath)) {\n\t\t\tenv.writeln(\"The specified file does not exist.\");\n\t\t\treturn;\n\t\t}\n\t\tif (Files.isDirectory(sourcePath)) {\n\t\t\tenv.writeln(\"Copy command can not copy a directory.\");\n\t\t\treturn;\n\t\t}\n\t\tif (Files.isDirectory(destinationPath)) {\n\t\t\tdestinationPath = Paths.get(destinationPath.toString(), sourcePath.getFileName().toString());\n\t\t}\n\t\tif (Files.exists(destinationPath)) {\n\t\t\tenv.write(\n\t\t\t\t\t\"There already is a file with the same name at the specified destination. \\nDo you want to overwrite it? [y/n] \");\n\n\t\t\twhile (true) {\n\t\t\t\tString answer;\n\t\t\t\ttry {\n\t\t\t\t\tanswer = env.readLine().trim();\n\t\t\t\t} catch (ShellIOException ex) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (answer.equals(\"n\")) {\n\t\t\t\t\tenv.writeln(\"Operation canceled.\");\n\t\t\t\t\treturn;\n\t\t\t\t} else if (answer.equals(\"y\")) {\n\t\t\t\t\tenv.writeln(\"Operation confirmed.\");\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tenv.writeln(\"Invalid answer. Answer 'y' for 'yes' or 'n' for 'no'.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tBufferedInputStream inputStream = new BufferedInputStream(Files.newInputStream(sourcePath));\n\t\tBufferedOutputStream outputStream = new BufferedOutputStream(Files.newOutputStream(destinationPath));\n\t\twhile (true) {\n\t\t\tint b = inputStream.read();\n\t\t\tif (b == -1) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\toutputStream.write(b);\n\t\t}\n\n\t\tinputStream.close();\n\t\toutputStream.close();\n\t}",
"public static final void copy(String source, String destination) {\n File sourceFile = new File(source);\n File destFile = new File(destination);\n\n if (destFile.exists()) {\n // Information error all ready exist the file\n }\n\n if (!sourceFile.exists()) {\n // General Server Error\n }\n\n if (sourceFile.isDirectory()) {\n copyDirectory(source, destination);\n } else {\n copyFile(source, destination);\n }\n\n //delete source folder after copy-paste\n }",
"public static void smartCopyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] fromFiles = fromDir.listFiles();\n \t\t\tint fromSize = fromFiles.length;\n \t\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), 550);\n \t\n \t\t\tFile[] toFiles = null;\n \t\n \t\t\t// delete old files and directories from this directory\n \t\t\tif (toDir.exists() && toDir.isDirectory()) {\n \t\t\t\ttoFiles = toDir.listFiles();\n \t\t\t\tint toSize = toFiles.length;\n \t\n \t\t\t\t// check if this exact file exists in the new directory\n \t\t\t\tfor (int i = 0; i < toSize; i++) {\n \t\t\t\t\tString name = toFiles[i].getName();\n \t\t\t\t\tboolean isDir = toFiles[i].isDirectory();\n \t\t\t\t\tboolean found = false;\n \t\t\t\t\tfor (int j = 0; j < fromSize; j++) {\n \t\t\t\t\t\tif (name.equals(fromFiles[j].getName()) && isDir == fromFiles[j].isDirectory())\n \t\t\t\t\t\t\tfound = true;\n \t\t\t\t\t}\n \t\n \t\t\t\t\t// delete file if it can't be found or isn't the correct type\n \t\t\t\t\tif (!found) {\n \t\t\t\t\t\tif (isDir)\n \t\t\t\t\t\t\tPublishUtil.deleteDirectory(toFiles[i], null);\n \t\t\t\t\t\telse\n \t\t\t\t\t\t\ttoFiles[i].delete();\n \t\t\t\t\t}\n \t\t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tif (toDir.isFile())\n \t\t\t\t\ttoDir.delete();\n \t\t\t\ttoDir.mkdir();\n \t\t\t}\n \t\t\tmonitor.worked(50);\n \t\n \t\t\t// cycle through files and only copy when it doesn't exist\n \t\t\t// or is newer\n \t\t\ttoFiles = toDir.listFiles();\n \t\t\tint toSize = toFiles.length;\n \t\t\tint dw = 0;\n \t\t\tif (toSize > 0)\n \t\t\t\tdw = 500 / toSize;\n \t\n \t\t\tfor (int i = 0; i < fromSize; i++) {\n \t\t\t\tFile current = fromFiles[i];\n \t\n \t\t\t\t// check if this is a new or newer file\n \t\t\t\tboolean copy = true;\n \t\t\t\tif (!current.isDirectory()) {\n \t\t\t\t\tString name = current.getName();\n \t\t\t\t\tlong mod = current.lastModified();\n \t\t\t\t\tfor (int j = 0; j < toSize; j++) {\n \t\t\t\t\t\tif (name.equals(toFiles[j].getName()) && mod <= toFiles[j].lastModified())\n \t\t\t\t\t\t\tcopy = false;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\n \t\t\t\tif (copy) {\n \t\t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\t\tString toFile = to;\n \t\t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\t\ttoFile += File.separator;\n \t\t\t\t\ttoFile += current.getName();\n \t\t\t\t\tif (current.isFile()) {\n \t\t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\t\tmonitor.worked(dw);\n \t\t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\t\tsmartCopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, dw));\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.worked(500 - dw * toSize);\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error smart copying directory \" + from + \" - \" + to, e);\n \t\t}\n \t}",
"private static void copyFile(Path srcPath, Path destPath) throws IOException {\n try (FileWriter outputStream = new FileWriter(destPath.toFile().getAbsolutePath(), false);\n FileReader inputStream = new FileReader(srcPath.toFile().getAbsolutePath())) {\n int i;\n while ((i = inputStream.read()) != -1) {\n outputStream.write(toChars(i));\n }\n }\n }",
"private static void copyFiles(File source, File dest) throws IOException {\n\t\tif(!source.equals(dest))\n\t\t\tFileUtils.copyFile(source, dest);\n\t}",
"@Test(groups = \"Integration\")\n public void testCopyStreamTo() throws Exception {\n String contents = \"abc\";\n File dest = new File(Os.tmp(), \"sssMachineLocationTest_dest.tmp\");\n try {\n host.copyTo(Streams.newInputStreamWithContents(contents), dest.getAbsolutePath());\n assertEquals(\"abc\", Files.readFirstLine(dest, Charsets.UTF_8));\n } finally {\n dest.delete();\n }\n }",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\tcopy(new RandomAccessFile(\"copyfrom.jpg\", \"r\"), new RandomAccessFile(\"copyto.jpg\",\"rw\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void copyFileTo(String sourceFilename, String targetFilename)\r\n\tthrows FileNotFoundException, IOException {\r\n\t\tString theFileContent = readStringFromFile(sourceFilename);\r\n\t\toverwriteStringToFile(theFileContent, targetFilename);\r\n\t}",
"public void copyFile(InputStream inputStream, OutputStream outputStream) throws IOException\n {\n byte[] buffer = new byte[1024];\n int length;\n while ((length = inputStream.read(buffer)) > 0)\n outputStream.write(buffer, 0, length);\n inputStream.close();\n outputStream.close();\n }",
"public static void shift(RandomAccessFile file, long from, long to) throws IOException {\n long total = file.length();\n if (from < 0 || from >= total || to < 0)\n throw new IOException();\n else if (from == to) {\n file.seek(0);\n return;\n }\n final byte buf[] = new byte[4096];\n int res;\n if (from > to) {\n while (true) {\n file.seek(from);\n if ((res = file.read(buf)) <= 0) {\n file.setLength(to);\n file.seek(0);\n return;\n }\n file.seek(to);\n file.write(buf, 0, res);\n from = from + res;\n to = to + res;\n }\n } else {\n file.seek(total);\n for (long todo = to - from; todo > 0;) {\n if (todo >= buf.length) {\n file.write(buf);\n todo = todo - buf.length;\n } else {\n file.write(buf, 0, (int) todo);\n break;\n }\n }\n for (long todo = total - from; todo > 0; total = total - res, todo = todo - res) {\n if (todo > buf.length)\n res = buf.length;\n else\n res = (int) todo;\n file.seek(total - res);\n for (int done = 0; done < res;) {\n int r = file.read(buf, done, res - done);\n if (r <= 0)\n throw new IOException();\n else\n done += r;\n }\n file.seek(total - res + (to - from));\n file.write(buf, 0, res);\n }\n }\n file.seek(0);\n }",
"private static void cp(File f1,File f2) throws IOException{\n\t\tFileInputStream fi=new FileInputStream(f1);\r\n\t\tFileOutputStream fo=new FileOutputStream(f2);\r\n\t\tBufferedOutputStream bof=new BufferedOutputStream(fo);\r\n\t\tBufferedInputStream bis=new BufferedInputStream(fi);\r\n\t\tbyte[] buffer=new byte[1024];\r\n\t\tint off=0;\r\n\t\tint length=1024;\r\n\t\twhile(true){\r\n\t\t\tif(fi.available()<1024){\r\n\t\t\t\tlength=fi.available();}\r\n\t\tbis.read(buffer, off, length);\r\n\t\tbof.write(buffer, off, length);\r\n//\t\tfi.read(buffer, off,length);\r\n//\t\tfo.write(buffer, off, length);\r\n\t\tif(length<1024){\r\n\t\t\tSystem.out.println(f1+\"-->\"+f2+\"复制完成!\");\r\n\t\t\tbof.flush();\r\n\t\t\tfi.close();\r\n\t\t\tfo.close();\r\n\t\t\treturn;}\r\n\t\t}\r\n\t\t\r\n\t}",
"public void copy(String name, String oldPath, String newPath);",
"public void copyFile(String oldPath, String newPath) {\n\t\ttry {\n\t\t\tint byteread = 0;\n\t\t\tFile oldfile = new File(oldPath);\n\t\t\tif (oldfile.exists()) {\n\t\t\t\tFileInputStream oldStream = new FileInputStream(oldPath);\n\t\t\t\tFileOutputStream newStream = new FileOutputStream(newPath);\n\t\t\t\tbyte[] buffer = new byte[1024];\n\t\t\t\twhile ((byteread = oldStream.read(buffer)) != -1) {\n\t\t\t\t\tnewStream.write(buffer, 0, byteread);\n\t\t\t\t}\n\t\t\t\tnewStream.close();\n\t\t\t\toldStream.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test\n public void testCopyFileUsingStream() throws Exception {\n long start = System.nanoTime();\n CopyFile.copyFileUsingStream(sourceFile, streamDestFile);\n System.out.println(\"Time taken by file stream using:\" + (System.nanoTime() - start) / 1000);\n }",
"public static void copyTree(File from, File to, FileFilter filter) throws IOException {\r\n File[] children;\r\n \r\n \tif (!from.exists()) {\r\n \t\tthrow new IOException (\"Source of copy \\'\" + from.getName() + \"\\' doesn't exist\");\r\n \t}\r\n \t\r\n \tif (to.getCanonicalPath().equals(from.getCanonicalPath())) {\r\n \t\tthrow new IOException (\"\\'\" + from.getName() + \"\\' cannot copy to itself\");\r\n \t}\r\n\r\n if (from.isDirectory()) {\r\n children = from.listFiles(filter);\r\n // just like cp command, if target exist, make a new folder into\r\n // the target, copy content into the target folder\r\n if (to.exists()) {\r\n \tif (to.isFile()) {\r\n \t\tthrow new IOException(\"Cannot overwrite non-directory \\'\" + to.getName() + \"\\' with directory \" + from.getName());\r\n \t}\r\n \t// copy into new directory name grafted after the existing one\r\n \tto = new File(to, from.getName());\r\n \tcopyTree(from, to, filter);\r\n \treturn;\r\n } else {\r\n \t// copy into new directory name\r\n \tto.mkdir(); \t\r\n for (int i = 0; i < children.length; i++) {\r\n File curto = new File(to, children[i].getName());\r\n \r\n copyTree(children[i], curto, filter);\r\n }\r\n return;\r\n }\r\n }\r\n else {\r\n \tif (to.isDirectory()) {\r\n \t\tto = new File (to, from.getName());\r\n \t}\r\n copyFile(from, to);\r\n return;\r\n }\r\n \r\n }",
"public boolean copyTo( final String _dest )\n\t{\n\t\tfinal FileStream destination = GlobalFileSystem.getFile( new File( _dest ).getParent() ) ;\n\t\tif( destination.exists() == false && destination.mkdirs() == false )\n\t\t{\n\t\t\tSystem.out.println( \"Failed to create directories.\" ) ;\n\t\t\treturn false ;\n\t\t}\n\n\t\tfinal FileStream stream = GlobalFileSystem.getFile( _dest ) ;\n\t\tif( stream == null )\n\t\t{\n\t\t\tSystem.out.println( \"Unable to acquire file stream for: \" + _dest ) ;\n\t\t\treturn false ;\n\t\t}\n\n\t\ttry( final ByteInStream in = getByteInStream() ;\n\t\t\t final ByteOutStream out = stream.getByteOutStream() )\n\t\t{\n\t\t\tif( out == null )\n\t\t\t{\n\t\t\t\treturn false ;\n\t\t\t}\n\n\t\t\tint length = 0 ;\n\t\t\tfinal byte[] buffer = new byte[48] ;\n\n\t\t\twhile( ( length = in.readBytes( buffer, 0, buffer.length ) ) > 0 )\n\t\t\t{\n\t\t\t\tout.writeBytes( buffer, 0, length ) ;\n\t\t\t}\n\n\t\t\treturn true ;\n\t\t}\n\t\tcatch( Exception ex )\n\t\t{\n\t\t\treturn false ;\n\t\t}\n\t}",
"public void copy(String file1, String file2) throws FileNotFoundException{\r\n\t\tFile original = new File(file1);\r\n\t\tFile copied = new File(file2);\r\n\t\t\r\n\t\tScanner input = new Scanner(original);\r\n\t\tPrintWriter output = new PrintWriter(copied);//writes new file\r\n\t\t\r\n\t\twhile(input.hasNextLine()){\r\n\t\t\tString next = input.nextLine();\r\n\t\t\toutput.println(next);\t\t\t\r\n\t\t}\r\n\t\toutput.close();\r\n\t\tinput.close();\r\n\t}",
"public static void copyFileOrDirectory(String source, String destination) throws KubernetesPluginException {\n File src = new File(source);\n File dst = new File(destination);\n try {\n // if source is file\n if (Files.isRegularFile(Paths.get(source))) {\n if (Files.isDirectory(dst.toPath())) {\n // if destination is directory\n FileUtils.copyFileToDirectory(src, dst);\n } else {\n // if destination is file\n FileUtils.copyFile(src, dst);\n }\n } else if (Files.isDirectory(Paths.get(source))) {\n FileUtils.copyDirectory(src, dst);\n }\n } catch (IOException e) {\n throw new KubernetesPluginException(\"Error while copying file\", e);\n }\n }",
"@Override\n public void copyFrom(DataFile from, long size) {\n if (size > 0) {\n throw emptyDataFileException();\n }\n }",
"public void copyFile(String inputFile, String outputFile)\r\n\t{\r\n\t\tif(new File(inputFile).exists())\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tInputStream in = new FileInputStream(inputFile);\r\n\t\t\t\tOutputStream out = new FileOutputStream(outputFile);\r\n\t\t\t\t// Transfer bytes from in to out\r\n\t\t\t\tbyte[] buf = new byte[1024];\r\n\t\t\t\tint length;\r\n\t\t\t\twhile ((length = in.read(buf)) > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tout.write(buf, 0, length);\r\n\t\t\t\t}\r\n\t\t\t\tin.close();\r\n\t\t\t\tout.close();\r\n\t\t\t\tSystem.out.println(inputFile + \" file copied to \" + outputFile);\r\n\t\t\t\tLog.info(inputFile + \" file copied.\");\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) \r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}",
"public static int copyInputStream(InputStream in, File destination) throws IOException {\n FileOutputStream out = new FileOutputStream(destination);\n BufferedOutputStream bufferedOut = new BufferedOutputStream(out, 1024 * 8);\n return copyInputStream(in, bufferedOut);\n }",
"private static boolean backupAndCopyFile(File templateDir, File toDir, String filename) {\n File to = new File(toDir, filename);\n boolean rv = backupFile(to);\n File from = new File(templateDir, filename);\n boolean rv2 = WorkingDir.copyFile(from, to);\n return rv && rv2;\n }",
"public static void copyDirectory(String from, String to, IProgressMonitor monitor) {\n \t\ttry {\n \t\t\tFile fromDir = new File(from);\n \t\t\tFile toDir = new File(to);\n \t\n \t\t\tFile[] files = fromDir.listFiles();\n \t\n \t\t\ttoDir.mkdir();\n \t\n \t\t\t// cycle through files\n \t\t\tint size = files.length;\n \t\t\tmonitor = ProgressUtil.getMonitorFor(monitor);\n \t\t\tmonitor.beginTask(NLS.bind(Messages.copyingTask, new String[] {from, to}), size * 50);\n \t\n \t\t\tfor (int i = 0; i < size; i++) {\n \t\t\t\tFile current = files[i];\n \t\t\t\tString fromFile = current.getAbsolutePath();\n \t\t\t\tString toFile = to;\n \t\t\t\tif (!toFile.endsWith(File.separator))\n \t\t\t\t\ttoFile += File.separator;\n \t\t\t\ttoFile += current.getName();\n \t\t\t\tif (current.isFile()) {\n \t\t\t\t\tcopyFile(fromFile, toFile);\n \t\t\t\t\tmonitor.worked(50);\n \t\t\t\t} else if (current.isDirectory()) {\n \t\t\t\t\tmonitor.subTask(NLS.bind(Messages.copyingTask, new String[] {fromFile, toFile}));\n \t\t\t\t\tcopyDirectory(fromFile, toFile, ProgressUtil.getSubMonitorFor(monitor, 50));\n \t\t\t\t}\n \t\t\t\tif (monitor.isCanceled())\n \t\t\t\t\treturn;\n \t\t\t}\n \t\t\tmonitor.done();\n \t\t} catch (Exception e) {\n \t\t\tTrace.trace(Trace.SEVERE, \"Error copying directory\", e);\n \t\t}\n \t}",
"public void copyFile(@NonNull File sourceFile, @NonNull File destFile) throws IOException {\n if (!destFile.getParentFile().exists()) {\n if (!destFile.getParentFile().mkdirs())\n Log.e(ConstantVariables.ERR, ConstantVariables.DIR_NOT_CREATED);\n } else {\n Log.e(ConstantVariables.ERR, ConstantVariables.DIR_ALREADY_EXISTS);\n }\n\n if (!destFile.exists()) {\n if (!destFile.createNewFile())\n Log.e(ConstantVariables.ERR, ConstantVariables.FILE_NOT_CREATED);\n } else\n Log.e(ConstantVariables.ERR, ConstantVariables.FILE_ALREADY_EXISTS);\n\n try (\n FileChannel source = new FileInputStream(sourceFile).getChannel();\n FileChannel destination = new FileOutputStream(destFile).getChannel();\n ) {\n destination.transferFrom(source, 0, source.size());\n }\n }",
"@Override\n\tpublic Transition copy(final State from, final State to) {\n\t\treturn new FSATransition(from, to, myLabel);\n\t}",
"@Override\n\tpublic void transferTo(File dest) throws IOException, IllegalStateException {\n\n\t}",
"final public VFile copyTo(VFile targetFile) throws VlException\n {\n //return (VFile)doCopyMoveTo(parentDir,null,false /*,options*/);\n return (VFile)this.getTransferManager().doCopyMove(this,targetFile,false); \n }",
"public void copy(String scrpath,String destpath) throws IOException \n\t{\n\t\ttry {\n\t\t\tInputStream in=new FileInputStream(scrpath);\n\t\t\tFileOutputStream out=new FileOutputStream(destpath);\n\t\t\tbyte[] buffer=new byte[1024];\n\t\t\tint length=0;\n\t\t\twhile((length=in.read(buffer))>0) {\n\t\t\t\tSystem.out.println(length);\n\t\t\t\tout.write(buffer,0,length);\n\t\t\t}\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static long copyFile(File source, File dest) throws IOException {\n\n\t\tif (source.isDirectory() || dest.isDirectory())\n\t\t\tthrow new IOException(\"wont copy directories\");\n\t\tInputStream i = null;\n\t\ttry {\n\t\t\ti = getInputStreamFromFile(source);\n\n\t\t\t// create parent directories\n\t\t\tif (dest.getParentFile().mkdirs()) {\n\t\t\t\t// all good\n\t\t\t} else\n\t\t\t\tthrow new IOException(\"\\\"\" + dest + \"\\\" cannot be created\");\n\t\t\treturn writeStreamToFile(i, dest);\n\n\t\t} finally {\n\t\t\tif (i != null)\n\t\t\t\ti.close();\n\t\t}\n\t}",
"public static void copyFileToDir(File src, File dst) throws IOException {\n String dstAbsPath = dst.getAbsolutePath();\n String dstDir = dstAbsPath.substring(0, dstAbsPath.lastIndexOf(File.separator));\n File dir = new File(dstDir);\n if (!dir.exists() && !dir.mkdirs()) {\n throw new IOException(\"Fail to create the directory: \" + dir.getAbsolutePath());\n }\n\n File file = new File(dstAbsPath + File.separator + src.getName());\n copyFile(src, file);\n }",
"private static void copy(InputStream in, OutputStream out) throws IOException {\n byte[] buffer = new byte[4096];\n while (true) {\n int bytesRead = in.read(buffer);\n if (bytesRead < 0) {\n break;\n }\n out.write(buffer, 0, bytesRead);\n }\n }",
"public static void copy(URL src, File dst) throws IOException {\n\n try (InputStream in = src.openStream()) {\n try (OutputStream out = new FileOutputStream(dst)) {\n dst.mkdirs();\n copy(in, out);\n }\n }\n }",
"public static void copyFiles(File src, File dest) throws IOException {\n if (!src.exists()) {\n throw new IOException(\"copyFiles: Can not find source: \" + src.getAbsolutePath() + \".\");\n } else if (!src.canRead()) { //check to ensure we have rights to the source...\n throw new IOException(\"copyFiles: No right to source: \" + src.getAbsolutePath() + \".\");\n }\n //is this a directory copy?\n if (src.isDirectory()) {\n if (!dest.exists()) { //does the destination already exist?\n //if not we need to make it exist if possible (note this is mkdirs not mkdir)\n if (!dest.mkdirs()) {\n throw new IOException(\"copyFiles: Could not create direcotry: \" + dest.getAbsolutePath() + \".\");\n }\n }\n //get a listing of files...\n String list[] = src.list();\n //copy all the files in the list.\n for (int i = 0; i < list.length; i++) {\n File dest1 = new File(dest, list[i]);\n File src1 = new File(src, list[i]);\n copyFiles(src1, dest1);\n }\n } else {\n //This was not a directory, so lets just copy the file\n try {\n copy(new FileInputStream(src), new FileOutputStream(dest));\n } catch (IOException e) { //Error copying file...\n IOException wrapper = new IOException(\"copyFiles: Unable to copy file: \"\n + src.getAbsolutePath() + \"to\" + dest.getAbsolutePath() + \".\");\n wrapper.initCause(e);\n wrapper.setStackTrace(e.getStackTrace());\n throw wrapper;\n }\n }\n }",
"public void copyFileChannel(String inputFile, String outputFile) throws IOException {\n\t\tFileInputStream inputStream = new FileInputStream(inputFile);\n\t\tFileOutputStream outputStream = new FileOutputStream(outputFile);\n\n\t\tFileChannel inChannel = inputStream.getChannel();\n\t\tFileChannel outChannel = outputStream.getChannel();\n\n\t\tinChannel.transferTo(0, inChannel.size(), outChannel);\n\n\t\tinputStream.close();\n\t\toutputStream.close();\n\t}",
"protected void writeFromStreamToStream(InputStream source, OutputStream destination) throws IOException {\n byte[] buffer = new byte[4096]; // A buffer to hold file contents\n int bytesRead; \n while((bytesRead = source.read(buffer)) != -1) { // Read bytes until EOF\n destination.write(buffer, 0, bytesRead); \n }\n \t}",
"public void renameFile(File from, File to) {\n if (!from.renameTo(to)) {\n Log.e(ConstantVariables.ERR, ConstantVariables.RENAME_FAILED);\n }\n }",
"private void migrate (String name)\t{\n\t\ttry{\n\t\t\tFile f1 = new File( sourceDir + name);\n\t\t\t\n\t\t\tif (!f1.exists())\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tFile f2 = new File(targetDir +name);\n\t\t\t\n\t\t InputStream in = new FileInputStream(f1);\n\t\t \n\t\t OutputStream out = new FileOutputStream(f2);\n\n\t\t byte[] buf = new byte[1024];\n\t\t int len;\n\t\t while ((len = in.read(buf)) > 0){\n\t\t out.write(buf, 0, len);\n\t\t }\n\t\t in.close();\n\t\t out.close();\n\t\t System.out.println(\"File copied.\");\n\t\t }\n\t\t catch(FileNotFoundException ex){\n\t\t System.out.println(ex.getMessage() + \" in the specified directory.\");\n\t\t System.exit(0);\n\t\t }\n\t\t catch(IOException e){\n\t\t System.out.println(e.getMessage()); \n\t\t }\n\t}",
"public static void copy(File destDir, File file) throws Exception {\r\n \t\tString name = file.getName();\r\n \t\tif (!destDir.exists()) destDir.mkdirs();\r\n \t\tFile oldFile = new File(destDir.getAbsolutePath() + File.separatorChar + name);\r\n \t\tif (oldFile.exists()) oldFile.delete();\r\n\t\tFile fileout = new File(destDir.getAbsolutePath() + File.separatorChar + name);\r\n\t FileInputStream fileinstr = new FileInputStream(file);\r\n\t FileOutputStream fileoutstr = new FileOutputStream(fileout);\r\n\t BufferedOutputStream bufout = new BufferedOutputStream(fileoutstr); \r\n\t byte [] b = new byte[1024];\r\n\t\tint len = 0;\r\n\t\twhile ( (len=fileinstr.read(b))!= -1 ) {\r\n\t\t bufout.write(b,0,len);\r\n\t\t}\r\n\t\tbufout.flush();\r\n\t\tbufout.close();\r\n\t\tfileinstr.close();\r\n\t}",
"public void transferTo(File dest) throws IOException, IllegalStateException {\r\n mFile.transferTo(dest);\r\n }",
"@Test\n public void testCopyFileUsingApacheCommonsIO() throws Exception {\n long start = System.nanoTime();\n CopyFile.copyFileUsingApacheCommonsIO(sourceFile, apacheDestFile);\n System.out.println(\"Time taken by apache using:\" + (System.nanoTime() - start) / 1000);\n }",
"public static void main(String[] args) \r\n\t {\n\t FileInputStream ins = null;\r\n\t FileOutputStream outs = null;\r\n\t \r\n\t try\r\n\t {\r\n\t \t //input file -->abc.txt\r\n\t File infile =new File(\"C:\\\\Users\\\\omsai\\\\Desktop\\\\abc.txt\");\r\n\t \r\n\t //output file -->outfile\r\n\t File outfile =new File(\"C:\\\\Users\\\\omsai\\\\Desktop\\\\copy.txt\");\r\n\t \r\n\t ins = new FileInputStream(infile);\r\n\t outs = new FileOutputStream(outfile);\r\n\t \r\n\t byte[] buffer = new byte[1024];\r\n\t int length;\r\n\t \r\n\t //copy contents of inputfile to output file\r\n\t while ((length = ins.read(buffer)) > 0) {\r\n\t outs.write(buffer, 0, length);\r\n\t } \r\n\t \r\n\t //close input and output files\r\n\t ins.close();\r\n\t outs.close();\r\n\t \r\n\t \r\n\t System.out.println(\"File copied successfully!!\");\r\n\t } \r\n\t \r\n\t catch(IOException ioe) \r\n\t {\r\n\t ioe.printStackTrace();\r\n\t } \r\n\t }",
"public static void copy(final ByteBuffer from, final int fromIndex, final int size, final ByteBuffer dest, final int toIndex) {\n final byte[] buf = new byte[size];\n\n // need an absolute bulk get\n int oldPosition = from.position();\n from.position(fromIndex);\n from.get(buf);\n from.position(oldPosition);\n\n // need an absolute bulk put\n oldPosition = dest.position();\n dest.position(toIndex);\n dest.put(buf);\n dest.position(oldPosition);\n }",
"private void streamCopy(InputStream in, OutputStream out) throws IOException {\t \n\t\tsynchronized (in) {\n\t\t\tsynchronized (out) {\n\t\t\t\tbyte[] buffer = new byte[256];\n\t\t\t\twhile (true) {\n\t \t\tint bytesRead = in.read(buffer);\n\t \t\tif (bytesRead == -1) break;\n\t \t\tout.write(buffer, 0, bytesRead);\n\t \t}\n\t \t}\n\t }\n\t}",
"public static void copyResource(final Resource source, final Resource dest, final Project project)\n throws IOException {\n copyResource(source, dest, null, null, false,\n false, null, null, project);\n }",
"public Path copie(String source, String destination) throws IOException {\n Path root = Paths.get(source);\n Path cible = Paths.get(destination);\n\n Path copy;\n copy = Files.copy(root, cible.resolve(root.getFileName()), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\n\n return copy;\n }",
"private void copyOrMoveFile(File file, File dir,boolean isCopy) throws IOException {\n File newFile = new File(dir, file.getName());\n FileChannel outChannel = null;\n FileChannel inputChannel = null;\n try {\n outChannel = new FileOutputStream(newFile).getChannel();\n inputChannel = new FileInputStream(file).getChannel();\n inputChannel.transferTo(0, inputChannel.size(), outChannel);\n inputChannel.close();\n if(!isCopy)\n file.delete();\n } finally {\n if (inputChannel != null) inputChannel.close();\n if (outChannel != null) outChannel.close();\n }\n }",
"private static boolean copyToFile(InputStream inputStream, File destFile) {\n if (inputStream == null || destFile == null) return false;\n try {\n OutputStream out = new FileOutputStream(destFile);\n try {\n byte[] buffer = new byte[4096];\n int bytesRead;\n while ((bytesRead = inputStream.read(buffer)) >= 0) {\n out.write(buffer, 0, bytesRead);\n }\n } finally {\n out.close();\n }\n return true;\n } catch (IOException e) {\n return false;\n }\n }",
"public boolean copyFile(final Uri source, final Uri target)\n\t\t\tthrows IOException\n\t{\n\t\tInputStream inStream = null;\n\t\tOutputStream outStream = null;\n\n\t\tUsefulDocumentFile destinationDoc = getDocumentFile(target, false, true);\n\t\tUsefulDocumentFile.FileData destinationData = destinationDoc.getData();\n\t\tif (!destinationData.exists)\n\t\t{\n\t\t\tdestinationDoc.getParentFile().createFile(null, destinationData.name);\n\t\t\t// Note: destinationData is invalidated upon creation of the new file, so make a direct call following\n\t\t}\n\t\tif (!destinationDoc.exists())\n\t\t{\n\t\t\tthrow new WritePermissionException(\n\t\t\t\t\t\"Write permission not found. This indicates a SAF write permission was requested. \" +\n\t\t\t\t\t\"The app should store any parameters necessary to resume write here.\");\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\tinStream = FileUtil.getInputStream(this, source);\n\t\t\toutStream = getContentResolver().openOutputStream(target);\n\n\t\t\tUtil.copy(inStream, outStream);\n\t\t}\n\t\tcatch(ArithmeticException e)\n\t\t{\n\t\t\tLog.d(TAG, \"File larger than 2GB copied.\");\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tthrow new IOException(\"Failed to copy \" + source.getPath() + \": \" + e.toString());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tUtil.closeSilently(inStream);\n\t\t\tUtil.closeSilently(outStream);\n\t\t}\n\t\treturn true;\n\t}",
"final public VFile copyToFile(VRL destinationVrl) throws VlException\n {\n return (VFile)this.getTransferManager().doCopyMove(this,destinationVrl,false); \n }",
"private void copyInputFile(String originalFilePath, String destinationFilePath) {\n String inputType = ((DataMapperDiagramEditor) workBenchPart.getSite().getWorkbenchWindow().getActivePage()\n .getActiveEditor()).getInputSchemaType();\n\n if (null != originalFilePath && null != destinationFilePath\n && (inputType.equals(\"XML\") || inputType.equals(\"JSON\") || inputType.equals(\"CSV\"))) {\n File originalFile = new File(originalFilePath);\n File copiedFile = new File(destinationFilePath);\n try {\n FileUtils.copyFile(originalFile, copiedFile);\n assert (copiedFile).exists();\n\t\t\t\tassert (Files.readAllLines(originalFile.toPath(), Charset.defaultCharset())\n\t\t\t\t\t\t.equals(Files.readAllLines(copiedFile.toPath(), Charset.defaultCharset())));\n } catch (IOException e) {\n log.error(\"IO error occured while saving the datamapper input file!\", e);\n }\n } else if (null != destinationFilePath) {\n clearContent(new File(destinationFilePath));\n }\n }",
"private void copyCoverageFile(String sourceResourceName, String targetFileName, WorkflowJob job) throws Exception {\n FilePath directory = ensureWorkspaceExists(job);\n\n FilePath dest = directory.child(targetFileName);\n org.apache.commons.io.IOUtils.copy(getClass().getResourceAsStream(sourceResourceName), dest.write());\n }",
"final public VFile copyTo(VDir parentDir) throws VlException\n {\n //return (VFile)doCopyMoveTo(parentDir,null,false /*,options*/);\n return (VFile)this.getTransferManager().doCopyMove(this,parentDir,null,false); \n }",
"private void copyFileToBackup(String key, File file, BackupDataOutput data) throws IOException {\n final int CHUNK = 8192;\n byte[] buf = new byte[CHUNK];\n\n int toCopy = (int) file.length();\n data.writeEntityHeader(key, toCopy);\n FileInputStream in = null;\n\n try {\n in = new FileInputStream(file);\n int nRead;\n while (toCopy > 0) {\n nRead = in.read(buf, 0, CHUNK);\n data.writeEntityData(buf, nRead);\n toCopy -= nRead;\n }\n } catch (Exception e) {\n Log.w(TAG, \"copyFileToBackup e = \" + e.toString());\n } finally {\n if (in != null) {\n in.close();\n }\n }\n }"
] |
[
"0.8139802",
"0.8072635",
"0.7942877",
"0.7809353",
"0.7557397",
"0.7521237",
"0.7401647",
"0.7215221",
"0.7190383",
"0.7158165",
"0.71334696",
"0.70690435",
"0.69850063",
"0.69680035",
"0.6961818",
"0.68012",
"0.6795916",
"0.6686615",
"0.66825503",
"0.6673353",
"0.66638124",
"0.65892416",
"0.6576529",
"0.6508117",
"0.65064645",
"0.6472034",
"0.64633155",
"0.6416667",
"0.63857573",
"0.63787735",
"0.6301984",
"0.62467504",
"0.6236059",
"0.6232395",
"0.62054515",
"0.6156155",
"0.61246115",
"0.61231613",
"0.6084653",
"0.6073627",
"0.607232",
"0.60098934",
"0.59992033",
"0.59659165",
"0.59583116",
"0.5949124",
"0.5948073",
"0.59441924",
"0.5910036",
"0.589904",
"0.5888392",
"0.588417",
"0.5843452",
"0.58261925",
"0.5823862",
"0.57568574",
"0.57423884",
"0.5738671",
"0.572751",
"0.57164997",
"0.5700841",
"0.5683726",
"0.567931",
"0.5674543",
"0.5668555",
"0.56596553",
"0.5646544",
"0.5645848",
"0.5636699",
"0.5627531",
"0.56217515",
"0.5606472",
"0.5601227",
"0.5593292",
"0.5565986",
"0.5551627",
"0.5546081",
"0.55320257",
"0.55312943",
"0.5512855",
"0.5487661",
"0.5484768",
"0.548417",
"0.5482531",
"0.54783744",
"0.5476142",
"0.54645604",
"0.54636204",
"0.5463453",
"0.5457266",
"0.5444176",
"0.54383147",
"0.54052675",
"0.5400828",
"0.54007447",
"0.5377165",
"0.5372107",
"0.5368769",
"0.53578734",
"0.5353668"
] |
0.75484526
|
5
|
Delete a directory tree recursively. Does not delete file.
|
public static void delTree(File file) {
File[] files = file.listFiles();
if (files != null) {
for (int i = 0; i < files.length; i++) {
if (files[i].isDirectory()) {
delTree(files[i]);
}
}
}
files = file.listFiles();
if (files != null) {
for (int i = 0; i < files.length; i++) {
files[i].delete();
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void deleteDirectory(String path, boolean recursive) throws IOException;",
"public static void recursiveDelete(Path path) throws IOException {\n if (Files.isDirectory(path)) {\n Files.walkFileTree(path, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n Files.delete(file);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\n Files.delete(file);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\n if (exc == null) {\n Files.delete(dir);\n return FileVisitResult.CONTINUE;\n } else {\n throw exc;\n }\n }\n });\n }\n }",
"private void deleteDirectory(Path path) throws IOException {\n if (Files.isDirectory(path, LinkOption.NOFOLLOW_LINKS)) {\n try (DirectoryStream<Path> entries = Files.newDirectoryStream(path)) {\n for (Path entry : entries) {\n deleteDirectory(entry);\n }\n }\n }\n Files.delete(path);\n }",
"public static void deleteDirectoryTree(File fileOrDirectory) {\n if (fileOrDirectory.isDirectory()) {\n for (File child : fileOrDirectory.listFiles()) {\n deleteDirectoryTree(child);\n }\n }\n\n fileOrDirectory.delete();\n }",
"private void deleteRecursive(File fileOrDirectory) {\n if (fileOrDirectory.isDirectory()) {\n for (File child : fileOrDirectory.listFiles()) {\n deleteRecursive(child);\n }\n }\n fileOrDirectory.delete();\n }",
"@Override\n public void removeDirectory(File directory, boolean recursive) throws FileNotFoundException, IOException {\n }",
"public static void deleteDirectory(File dir) {\n\t\tif (dir.isDirectory()) {\n\t\t\t//directory is empty, then delete it\n\t\t\tif (dir.list().length == 0) {\n\t\t\t\tdir.delete();\n\t\t\t} else {\n\t\t\t\t//list all the directory contents\n\t\t\t\tString[] subFiles = dir.list();\n\t\t\t\tfor (int i = 0; i < subFiles.length; i++) {\n\t\t\t\t\t//construct the file structure\n\t\t\t\t\tFile fileDelete = new File(dir, subFiles[i]);\n\t\t\t\t\t//recursive delete\n\t\t\t\t\tdeleteDirectory(fileDelete);\n\t\t\t\t}\n\t\t\t\t//check the directory again, if empty then delete it\n\t\t\t\tif (dir.list().length == 0) {\n\t\t\t\t\tdir.delete();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tdir.delete();\n\t\t}\n\t}",
"private static void deleteDirectory(File directory) {\r\n File[] files = directory.listFiles();\r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n deleteDirectory(files[i]);\r\n } else {\r\n files[i].delete();\r\n }\r\n }\r\n // Now that the directory is empty. Delete it.\r\n directory.delete();\r\n }",
"public static void deleteDir(File dir) {\n\t if (dir.isDirectory()) {\n\t String[] children = dir.list();\n\t for (int i=0; i<children.length; i++) {\n\t File file = new File(dir, children[i]);\n\t log.info(\"Deleting file:\" + file.toString());\n\t file.delete();\n\t }\n\t }\n\t }",
"public static void deleteRecursively(File file) throws IOException {\n\t\tboolean successful = true;\n\t\tif (file.isDirectory()) {\n\t\t\tfor (File sub : file.listFiles()) {\n\t\t\t\tdeleteRecursively(sub);\n\t\t\t}\n\t\t\tsuccessful = file.delete();\n\t\t} else if (file.isFile()) {\n\t\t\tsuccessful = file.delete();\n\t\t}\n\t\tif (!successful) {\n\t\t\tthrow new IOException(\"Could not delete:\" + file.getName());\n\t\t}\n\t}",
"public static boolean recursiveDelete(File d) {\n // If d is not a directory, just delete it.\n if (!d.isDirectory())\n if (d.delete() == false) {\n return false;\n } else {\n return true;\n }\n else {\n // Construct a file list.\n File[] ar = d.listFiles();\n \n // Iterate through the file list.\n for (int i = 0; i < ar.length; i++) {\n // Recurse into directories. Deep directories will need a lot of stack space for this.\n if (ar[i].isDirectory()) {\n if (!recursiveDelete(ar[i])) {\n return false; // Failed!\n }\n }\n else {\n // Delete a file.\n if (!ar[i].delete()) {\n return false; // Failed!\n }\n }\n }\n \n //Delete the empty directory\n if (!d.delete()) {\n return false;\n } else {\n return true;\n } \n }\n }",
"public static void deleteFolder(File folder) {\r\nFile[] files = folder.listFiles();\r\nif(files!=null) { //some JVMs return null for empty dirs\r\nfor(File f: files) {\r\nif(f.isDirectory()) {\r\ndeleteFolder(f);\r\n} else {\r\nf.delete();\r\n}\r\n}\r\n}\r\nfolder.delete();\r\n}",
"public static void delete(File d) {\n\t\tif (d.isDirectory()) {\n\t\t\tfor (File f: d.listFiles()) delete(f);\n\t\t\td.delete();\n\t\t} else d.delete();\n\t}",
"private static void deleteFileOrDir(File file)\n {\n if (file.isDirectory())\n {\n File[] childs = file.listFiles();\n for (int i = 0;i < childs.length;i++)\n {\n deleteFileOrDir(childs[i]);\n }\n }\n file.delete();\n }",
"private static void deleteDir(File file) {\n\t\tFile[] contents = file.listFiles();\n\t\tif (contents != null) {\n\t\t\tfor (File f : contents) {\n\t\t\t\tdeleteDir(f);\n\t\t\t}\n\t\t}\n\t\tfile.delete();\n\t}",
"public static void deleteDirectoryRecursively(Path pathToBeDeleted) throws IOException {\n\n Files.walk(pathToBeDeleted).sorted(Comparator.reverseOrder()).map(Path::toFile).forEach(File::delete);\n }",
"public static void delete(File file) {\n\n\t\tif (file.isDirectory()) {\n\n\t\t\t// directory is empty, then delete it\n\t\t\tif (file.list().length == 0) {\n\n\t\t\t\tfile.delete();\n\t\t\t\t// System.out.println(\"Directory is deleted : \" +\n\t\t\t\t// file.getAbsolutePath());\n\n\t\t\t} else {\n\n\t\t\t\t// list all the directory contents\n\t\t\t\tString files[] = file.list();\n\n\t\t\t\tfor (String temp : files) {\n\t\t\t\t\t// construct the file structure\n\t\t\t\t\tFile fileDelete = new File(file, temp);\n\n\t\t\t\t\t// recursive delete\n\t\t\t\t\tdelete(fileDelete);\n\t\t\t\t}\n\n\t\t\t\t// check the directory again, if empty then delete it\n\t\t\t\tif (file.list().length == 0) {\n\t\t\t\t\tfile.delete();\n\t\t\t\t\t// System.out.println(\"Directory is deleted : \" +\n\t\t\t\t\t// file.getAbsolutePath());\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\t// if file, then delete it\n\t\t\tfile.delete();\n\t\t\t// System.out.println(\"File is deleted : \" +\n\t\t\t// file.getAbsolutePath());\n\t\t}\n\t}",
"private void emptyDirectory(File dir){\n\n for (File file : Objects.requireNonNull(dir.listFiles())){\n if (file.isDirectory())\n {\n emptyDirectory(file);\n }\n file.delete();\n }\n }",
"void deleteTree(TreeNode node) \n {\n root = null; \n }",
"public void deleteDir() throws Exception\n{\n if(_repo!=null) _repo.close(); _repo = null;\n _gdir.delete();\n _gdir.setProp(GitDir.class.getName(), null);\n}",
"public static native void deleteTreesBelow(String dir) throws IOException;",
"public boolean delete(String path, boolean recurse) throws SystemException;",
"private synchronized static void deleteParents(File file) {\n if (file == null) {\n return;\n }\n\n File tmp = file;\n\n for (int i = 0; i < directoryLevels; i++) {\n File directory = tmp.getParentFile();\n File[] files = directory.listFiles();\n\n // Only delete empty directories\n if (files.length != 0) {\n break;\n }\n\n directory.delete();\n tmp = directory;\n }\n }",
"public static void cleanDirectory(File dir) {\n if (dir.isDirectory()) {\n for (File f : dir.listFiles()) {\n cleanDirectory( f );\n }\n }\n dir.delete();\n }",
"private void recDelete(File file) {\n if (!file.exists()) {\n return;\n }\n if (file.isDirectory()) {\n File[] list = file.listFiles();\n if (list != null) {\n for (File f : list) {\n recDelete(f);\n }\n }\n }\n file.delete();\n }",
"private static boolean deleteDirectory(final File path) {\r\n if (path.exists()) {\r\n final File[] files = path.listFiles();\r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n deleteDirectory(files[i]);\r\n }\r\n else {\r\n files[i].delete();\r\n }\r\n }\r\n }\r\n return (path.delete());\r\n }",
"private boolean deleteDir(File dir) {\r\n if (dir.isDirectory()) {\r\n \r\n //Borra todos los ficheros del directorio\r\n String[] children = dir.list();\r\n for (int i=0; i<children.length; i++) {\r\n boolean success = deleteDir(new File(dir, children[i]));\r\n if (!success) {\r\n return false;\r\n }\r\n }\r\n }\r\n \r\n //Ahora que el directorio está vacío, se puede borrar\r\n return dir.delete();\r\n }",
"private static boolean deleteDirectory(File directory) {\n\t if(directory.exists()){\n\t File[] files = directory.listFiles();\n\t if(null!=files){\n\t for(int i=0; i<files.length; i++) {\n\t if(files[i].isDirectory()) {\n\t deleteDirectory(files[i]);\n\t }\n\t else {\n\t files[i].delete();\n\t }\n\t }\n\t }\n\t }\n\t return(directory.delete());\n\t}",
"public static synchronized void deleteDirectory(File directory) {\n System.out.println(Thread.currentThread().getName() + \"********************************************************* TestHelper.deleteDirectory: [\" + directory.getPath() + \"]\");\n File[] firstDirectoryFiles = directory.listFiles();\n if (firstDirectoryFiles != null) {\n for (File file : firstDirectoryFiles) {\n file.delete();\n }\n }\n directory.delete();\n }",
"private static boolean deleteDir(File dir) {\n\n if (dir.isDirectory()) {\n String[] children = dir.list();\n for (int i=0; i<children.length; i++) {\n boolean success = deleteDir(new File(dir, children[i]));\n if (!success) {\n return false;\n }\n }\n }\n\n // The directory is now empty so now it can be smoked\n return dir.delete();\n }",
"public final boolean recursiveDelete(File file) {\r\n if (isFileSystem(file)) {\r\n if (file.isDirectory()) {\r\n // delete all children first\r\n File[] children = FileSystemView.getFileSystemView().getFiles(file, false);\r\n for (File f : children) {\r\n if (!recursiveDelete(f)) {\r\n return false;\r\n }\r\n }\r\n // delete this file.\r\n return file.delete();\r\n }\r\n else {\r\n return file.delete();\r\n }\r\n }\r\n else {\r\n return false;\r\n }\r\n }",
"protected void deleteTmpDirectory(File file) {\n\t\tif (file.exists() && file.canWrite()) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tFile[] files = file.listFiles();\n\t\t\t\tfor (File child : files) {\n\t\t\t\t\tif (child.isDirectory()) {\n\t\t\t\t\t\tdeleteTmpDirectory(child);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfile.delete();\n\t\t}\n\t}",
"protected void deleteDirectory(String oneDir) {\n \n File[] listOfFiles;\n File cleanDir;\n\t\n cleanDir = new File(oneDir);\n if (!cleanDir.exists()) {// Nothing to do. Return; \n\t return;\n\t}\n listOfFiles = cleanDir.listFiles();\n if(listOfFiles != null) { \n for(int countFiles = 0; countFiles < listOfFiles.length; countFiles++) { \n if (listOfFiles[countFiles].isFile()) {\n listOfFiles[countFiles].delete();\n } else { // It is a directory\n String nextCleanDir = cleanDir + separator + listOfFiles[countFiles].getName();\n\t\t File newCleanDir = new File(nextCleanDir);\n deleteDirectory(newCleanDir.getAbsolutePath());\n } \n }// End for loop\n } // End if statement \n cleanDir.delete();\n }",
"public void delete() {\n this.root = null;\n }",
"public static void deleteDirectory(File directory) {\n // LOG.debug(\"ics.core.io.FileUtils.deleteDirectory(): Deleting directory \"\n // + directory.toString());\n File[] files = directory.listFiles();\n for (int n = 0; n < files.length; n++) {\n File nextFile = files[n];\n\n // if it's a directory, delete sub-directories and files before\n // removing the empty directory\n if (nextFile.isDirectory() == true) {\n deleteDirectory(nextFile);\n } else {\n nextFile.delete(); // otherwise just delete the file\n // LOG.debug(\"ics.core.io.FileUtils.deleteDirectory(): Deleting file \"\n // + nextFile.toString());\n }\n }\n\n // finally, delete the specified directory\n if (directory.delete() == false) {\n LOG.warn(\"ics.core.io.FileUtils.deleteDirectory(): Unable to delete \"\n + directory.toString());\n }\n }",
"private void deleteWorkingRoot(WorkUnit workUnit, boolean copy) {\n\n // Construct folder name (will be copy or not)\n String folderToDelete = format(\"%s%s\", workUnit.root, (copy ? \"_copy\" : \"\"));\n\n // 7. Clean work directory\n MigrationHistory history = historyMgr.startStep(workUnit.migration,\n StepEnum.CLEANING, format(\"Remove %s\", folderToDelete));\n\n // Sanity check\n if (!StringUtils.isBlank(folderToDelete) && folderToDelete.contains(\"20\") && folderToDelete.contains(\"_\")) {\n\n try {\n\n if (isWindows) {\n // FileUtils.deleteDirectory(new File(folderToDelete));\n // JBU : Fails occassionally on windows with file lock issue\n // FileUtils.deleteDirectory(new File(folderToDelete));\n // JBU : Fails on windows not able to delete a large number of files?..\n String gitCommand = format(\"rd /s /q %s\", folderToDelete);\n execCommand(workUnit.commandManager, Shell.formatDirectory(applicationProperties.work.directory), gitCommand);\n\n } else {\n // Seems to work ok on linux. Keeping Java command for the moment\n FileSystemUtils.deleteRecursively(new File(folderToDelete));\n }\n\n historyMgr.endStep(history, StatusEnum.DONE, null);\n } catch (Exception exc) {\n LOG.error(\"Failed deleteDirectory: \", exc);\n historyMgr.endStep(history, StatusEnum.FAILED, exc.getMessage());\n }\n\n } else {\n LOG.error(\"Failed deleteDirectory: Badly formed delete path\");\n historyMgr.endStep(history, StatusEnum.FAILED, \"Badly formed delete path\");\n }\n }",
"public static boolean deleteDirectory(File dir) {\n \n\t\tif (dir == null) { \n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tFile candir;\n try {\n candir = dir.getCanonicalFile();\n } catch (IOException e) {\n return false;\n }\n \n // a symbolic link has a different canonical path than its actual path,\n // unless it's a link to itself\n if (!candir.equals(dir.getAbsoluteFile())) {\n // this file is a symbolic link, and there's no reason for us to\n // follow it, because then we might be deleting something outside of\n // the directory we were told to delete\n return false;\n }\n \n // now we go through all of the files and subdirectories in the\n // directory and delete them one by one\n File [] files = candir.listFiles();\n \n if (files != null) {\n for (int i = 0; i < files.length; i++) {\n File file = files[i];\n \n // in case this directory is actually a symbolic link, or it's\n // empty, we want to try to delete the link before we try\n // anything\n boolean deleted = file.delete();\n \n if (!deleted) {\n // deleting the file failed, so maybe it's a non-empty\n // directory\n if (file.isDirectory()) {\n \tdeleteDirectory(file);\n }\n \n // otherwise, there's nothing else we can do\n }\n }\n }\n \n // now that we tried to clear the directory out, we can try to delete it\n // again\n return dir.delete(); \n }",
"public boolean recursiveDelete(File file) {\n File[] files;\n if (file.isDirectory()) {\n files = file.listFiles();\n if (files != null) {\n for (int x = 0; x < files.length; x++) {\n recursiveDelete(files[x]);\n }\n }\n } else {\n operMatcher.put(new FileInfo(file, context), null);\n }\n file.delete();\n return false;\n }",
"private void deleteTree(tnode root){\n if (root != null)\n root = null;\n }",
"public static void deleteFilesInDirectory(File dir, boolean deleteDir) {\n \t\tif (dir != null && dir.isDirectory()) {\n \t\t\tFile[] files = dir.listFiles();\n \t\t\tif (files != null) {\n \t\t\t\tfor (int i = 0; i < files.length; i++) {\n \t\t\t\t\tif (files[i].isFile()) {\n \t\t\t\t\t\tfiles[i].delete();\n \t\t\t\t\t} else {\n \t\t\t\t\t\t// recursively delete\n \t\t\t\t\t\tdeleteFilesInDirectory(files[i], true);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\t// now delete the directory itself\n \t\t\tif (deleteDir) {\n \t\t\t\tdir.delete();\n \t\t\t}\n \t\t}\n \t}",
"public boolean folderCleaner(String folderPath, Boolean ifDeleteSubdirs, Boolean ifDeleteFiles, Boolean ifDeleteRoot, Boolean ifPrompt) throws IOException { \n folderPath = folderPath.replace(\"\\\\\", \"/\");\n if(folderPath.endsWith(\"/\")) { folderPath = folderPath.substring(0, folderPath.length() - 1); }\n File dir = new File(folderPath);\n String how = \"\", action = null;\n Boolean success = false;\n Boolean current = false;\n if (dir.exists() && dir.isDirectory()) { \n try{ \n success = true;\n String[] children = dir.list();\n if(children.length > 0) {\n action = \"CLEANED\";\n for (int i = 0; i < children.length; i++) {\n File child = new File(dir, children[i]);\n if(child.isDirectory()){ if(ifDeleteSubdirs) { FileUtils.forceDelete(child); } if(ifPrompt && ifDeleteSubdirs) {System.out.print(\"DIRECTORY \");} }\n else { if(ifDeleteFiles) { FileUtils.forceDelete(child); } if(ifPrompt && ifDeleteFiles) {System.out.print(\" FILE \");} }\n \n current = !child.exists();\n success = success && current;\n if(current) { how = \" DELETED: \\\"\"; } else { how = \"NOT DELETED: \\\"\"; }\n if(ifPrompt && current) System.out.print(how + child.getAbsolutePath() + \"\\n\");\n }\n }\n // THE DIRECTORY IS EMPTY - DELETE IT IF REQUIRED\n if (ifDeleteRoot) { FileUtils.forceDelete(dir); success = success && !dir.exists(); action = \"DELETED\"; }\n if(ifPrompt && (!action.equals(null))) {\n if (success) { \n System.out.println(\"\\n\" + \"FULLY \" + action + \" DIRECTORY: \\\"\" + folderPath.substring(folderPath.lastIndexOf(\"/\") + 1, folderPath.length()) + \"\\\"\\n\");\n } else {\n System.out.println(\"\\n\" + \"NOT FULLY \" + action + \" DIRECTORY: \\\"\" + folderPath.substring(folderPath.lastIndexOf(\"/\") + 1, folderPath.length()) + \"\\\"\\n\");\n }\n }\n } catch (Exception e) {} \n }\n return success;\n }",
"void deleteTagDirectory() {\n\n try {\n\n Log.i(\"Deleting Tag Directory\", tag_directory.toString());\n FileUtils.deleteDirectory(tag_directory);\n } catch (IOException e) {\n\n }\n\n }",
"public static void deleteFilesRecursive(String strPath) {\n\n File fileOrDirectory = new File(strPath);\n\n if (fileOrDirectory.isDirectory()){\n for (File child : fileOrDirectory.listFiles())\n deleteFilesRecursive(child.getPath());\n fileOrDirectory.delete();\n }else\n fileOrDirectory.delete();\n }",
"public static boolean deleteDir(File dir) {\n if (dir != null && dir.isDirectory()) {\n String[] children = dir.list();\n for (int i = 0; i < children.length; i++) {\n boolean success = deleteDir(new File(dir, children[i]));\n if (!success) {\n return false;\n }\n }\n return dir.delete();\n }\n else if(dir!= null && dir.isFile()) return dir.delete();\n else return false;\n }",
"public DeleteTResponse remove(String path, boolean recursive, DeleteTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;",
"private void cleanDirectory(File dir) {\n File[] files= dir.listFiles();\n if (files!=null && files.length>0) {\n for (File file: files) {\n delete(file);\n }\n }\n }",
"public static void deleteDirectory( File directory ) throws IOException\n {\n if ( !directory.exists() )\n {\n return;\n }\n\n if ( !isSymlink( directory ) )\n {\n cleanDirectory( directory );\n }\n\n if ( !directory.delete() )\n {\n throw new IOException( I18n.err( I18n.ERR_17004_UNABLE_DELETE_DIR, directory ) );\n }\n }",
"public static void deleteDirectory(String path) throws KubernetesPluginException {\n Path pathToBeDeleted = Paths.get(path);\n if (!Files.exists(pathToBeDeleted)) {\n return;\n }\n try {\n Files.walk(pathToBeDeleted)\n .sorted(Comparator.reverseOrder())\n .map(Path::toFile)\n .forEach(File::delete);\n } catch (IOException e) {\n throw new KubernetesPluginException(\"Unable to delete directory: \" + path, e);\n }\n\n }",
"public static void deleteDir(File dir) throws RepositoryException {\n String list[] = dir.list();\n\n if (list == null) {\n return;\n }\n\n for (int i = 0; i < list.length; i++) {\n File file = new File(dir, list[i]);\n\n if (file.isDirectory()) {\n deleteDir(file);\n } else {\n if (!file.delete()) {\n throw new RepositoryException(EXCEPTION_LOCALIZER.format(\n \"cannot-delete-file\", file.getAbsolutePath()));\n }\n }\n }\n\n if (!dir.delete()) {\n throw new RepositoryException(EXCEPTION_LOCALIZER.format(\n \"directory-cannot-be-deleted\", dir.getAbsolutePath()));\n }\n }",
"public void deleteNode() {\n TreeNode pNode = this.getParentNode();\n int id = this.getSelfId();\n\n if (pNode != null) {\n pNode.deleteChildNode(id);\n }\n }",
"public static boolean recursiveDelete(File fileOrDir)\n\t{\n\t\tSystem.out.println(\"path\" + fileOrDir.getAbsolutePath());\n\t if(fileOrDir.isDirectory())\n\t {\n\t \tSystem.out.println(\"is a directory --\");\n\t \t\n\t // recursively delete contents\n\t for(File innerFile: fileOrDir.listFiles())\n\t {\n\t \tSystem.out.println(\"list \" + innerFile.getAbsolutePath());\n\t if(recursiveDelete(innerFile))\n\t {\n\t return false;\n\t }\n\t }\n\t }\n\n\t return fileOrDir.delete();\n\t}",
"public static boolean deleteDir(File dir) {\n if (dir != null && dir.isDirectory()) {\n String[] children = dir.list();\n for (int i = 0; i < children.length; i++) {\n boolean success = deleteDir(new File(dir, children[i]));\n if (!success) {\n return false;\n }\n }\n return dir.delete();\n } else if(dir!= null && dir.isFile()) {\n return dir.delete();\n } else {\n return false;\n }\n }",
"@Override\n\tpublic boolean delete() {\n\t\tboolean result = false;\n\t\ttry{\n\t\t\tif (this.exists()) {\n\t\t\t\tif (this.isDirectory()) {\n\t\t\t\t\tif (this.listFiles() != null) {\n\t\t\t\t\t\tfor (java.io.File file : this.listFiles()) {\n\t\t\t\t\t\t\tif (file.isDirectory()) ((File) file).delete();\n\t\t\t\t\t\t\telse if (file.isFile()) super.delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tsuper.delete();\n\t\t\t\t} else if (this.isFile()) super.delete();\n\t\t\t}\n\t\t\t\n\t\t\tresult = true;\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn result;\n\t}",
"private static void doDeleteEmptyDir(String dir) {\n\n boolean success = (new File(dir)).delete();\n\n if (success) {\n System.out.println(\"Successfully deleted empty directory: \" + dir);\n } else {\n System.out.println(\"Failed to delete empty directory: \" + dir);\n }\n\n }",
"private static boolean deleteRecursive(File file) {\n if (file == null) return true;\n\n File[] children = file.listFiles();\n if (children != null) {\n for (File child : children) {\n if (!deleteRecursive(child)) {\n return false;\n }\n }\n }\n return file.delete();\n }",
"public void removeFolder(File path){\n if (path.isDirectory()){\n String subdirectories[] = path.list();\n for(String subdirectory: subdirectories){\n File file = new File(path.getPath()+\"\\\\\"+subdirectory);\n LOG.info(\"file.getAbsolutePath(): \"+file.getPath());\n if (file.isFile()){\n boolean isDeleted = file.delete();\n if (isDeleted){\n LOG.success(\"file was delete, path: \"+file.getPath());\n }else{\n LOG.error(\"file does not delete, path: \"+file.getPath());\n }\n }else{\n removeFolder(file);\n boolean folderIsDelete = file.delete();\n if (folderIsDelete){\n LOG.success(\"folder was delete, path: \"+file);\n }else{\n LOG.error(\"folder does not delete, path: \"+file);\n }\n }\n }\n }else {\n LOG.info(\"file.getAbsolutePath(): \"+path.getPath());\n }\n }",
"private static void deleteEmptyParentDirs(Path pkgDirPath, Path repoPath) throws IOException {\n Path pathsInBetween = repoPath.relativize(pkgDirPath);\n for (int i = pathsInBetween.getNameCount(); i > 0; i--) {\n Path toRemove = repoPath.resolve(pathsInBetween.subpath(0, i));\n if (!Files.list(toRemove).findAny().isPresent()) {\n Files.delete(toRemove);\n }\n }\n }",
"public static void deleteFile(File file){\r\n if(file.isFile()){\r\n file.delete();\r\n return;\r\n }\r\n if(file.isDirectory()){\r\n File[] childFile = file.listFiles();\r\n if(childFile == null || childFile.length == 0){\r\n file.delete();\r\n return;\r\n }\r\n for(File f : childFile){\r\n deleteFile(f);\r\n }\r\n file.delete();\r\n }\r\n }",
"public static void deleteRecursive(File fileOrDirectory, long olderThen) {\n if (fileOrDirectory.isDirectory()) {\n for (File child : fileOrDirectory.listFiles()) {\n deleteRecursive(child, olderThen);\n }\n } else {\n long lastModified = fileOrDirectory.lastModified();\n long fileAge = System.currentTimeMillis() - lastModified;\n if (fileAge >= olderThen) {\n fileOrDirectory.delete();\n }\n }\n }",
"public boolean delete()\n\t{\n\t\treturn deleteRecursive( file ) ;\n\t}",
"private static void delTree(BoardTree root) {\n if (root.children == null) return;\n for (BoardTree child : root.children) {\n delTree(child);\n }\n root.children.clear();\n root = null;\n }",
"public boolean deleteDir(File dir) {\n\t\tif (dir.isDirectory()) {\n\t\t\tString[] children = dir.list();\n\t\t\tfor (int i = 0; i < children.length; i++) {\n\t\t\t\tboolean success = deleteDir(new File(dir, children[i]));\n\t\t\t\tif (!success) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// The directory is now empty so delete it\n\t\treturn dir.delete();\n\t}",
"void deleteDirectories() {\n\n if (story_directory != null && !newStoryReady) {\n deleteStoryDirectory();\n }\n\n if (tag_directory != null && !newStoryReady) {\n deleteTagDirectory();\n }\n\n if (cover_directory != null && !newStoryReady) {\n deleteCoverDirectory();\n }\n }",
"public void clearDirectory(File directory) {\n if (directory.exists()) {\n for (File file : directory.listFiles()) {\n file.delete();\n }\n }\n }",
"public static boolean deleteDir(File dir) {\n if (dir.isDirectory()) {\n String[] children = dir.list();\n if (children != null) {\n for (String child : children) {\n boolean success = deleteDir(new File(dir, child));\n if (!success) {\n return false;\n }\n }\n }\n }\n\n // The directory is now empty so delete it\n return dir.delete();\n }",
"public static boolean deleteDir(File dir) {\n\t\tif (dir.isDirectory()) {\n\t\t\tString[] children = dir.list();\n\t\t\tfor (int i = 0; i < children.length; i++) {\n\t\t\t\tboolean success = deleteDir(new File(dir, children[i]));\n\t\t\t\tif (!success) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// The directory is now empty so delete it\n\t\treturn dir.delete();\n\t}",
"public static void deleteFilesMatchingExpression(File root,\n \t\t\tString expression, boolean recurse) {\n \t\tif (root != null) {\n \t\t\tif (root.isDirectory()) {\n \t\t\t\tFile[] files = root.listFiles();\n \t\t\t\tif (files != null) {\n \t\t\t\t\tfor (int i = 0; i < files.length; i++) {\n \t\t\t\t\t\tif (recurse && files[i].isDirectory()) {\n \t\t\t\t\t\t\tdeleteFilesMatchingExpression(files[i], expression,\n \t\t\t\t\t\t\t\t\trecurse);\n \t\t\t\t\t\t} else if (files[i].isFile()) {\n \t\t\t\t\t\t\tif (files[i].getName().matches(expression)) {\n \t\t\t\t\t\t\t\tfiles[i].delete();\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}",
"public static void deleteFileOrDirectory(KVFile file) {\n if (file.isDirectory()) {\n String[] children = file.list();\n for (String aChildren : children) {\n if (new KVFile(file, aChildren).isDirectory() && !aChildren.equals(\"PreinstalledMaps\") && !aChildren.equals(\"Maps\")) {\n deleteFileOrDirectory(new KVFile(file, aChildren));\n } else {\n new KVFile(file, aChildren).delete();\n }\n }\n }\n }",
"public static void deleteBundleParentDirectory(Bundle bundle) throws IOException {\n if (bundle != null) {\n Path bundleSource = bundle.getSource();\n File parent = bundleSource.getParent().toFile();\n if (parent.exists() && parent.isDirectory()) {\n File[] files = parent.listFiles();\n // We expect the directory to be empty or contain just one file (the ZIP bundle,\n // since the bundle files are stored temporarily in another temporary directory).\n if (files != null && files.length <= 1) {\n org.apache.commons.io.FileUtils.forceDelete(parent);\n }\n }\n }\n }",
"private void deleteDir(File fileDir)\n {\n try\n {\n FileHelper.deleteDir(fileDir);\n }\n catch (Exception e)\n {\n // ignore\n }\n }",
"public static boolean deleteDirectory(File path) {\n\t\tif (path.exists()) {\n\t\t\tFile[] files = path.listFiles();\n\t\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\t\tif (files[i].isDirectory()) {\n\t\t\t\t\tdeleteDirectory(files[i]);\n\t\t\t\t} else {\n\t\t\t\t\tfiles[i].delete();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn (path.delete());\n\t}",
"public static boolean deleteFileRoot(String path) {\n try {\n if (!readReadWriteFile())\n RootTools.remount(path, \"rw\");\n\n if (new File(path).isDirectory()) {\n execute(\"rm -f -r \" + getCommandLineString(path));\n } else {\n execute(\"rm -r \" + getCommandLineString(path));\n }\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n }",
"private void emptyTestDirectory() {\n // Delete the files in the /tmp/QVCSTestFiles directory.\n File tempDirectory = new File(TestHelper.buildTestDirectoryName(TEST_SUBDIRECTORY));\n File[] files = tempDirectory.listFiles();\n if (files != null) {\n for (File file : files) {\n if (file.isDirectory()) {\n File[] subFiles = file.listFiles();\n for (File subFile : subFiles) {\n if (subFile.isDirectory()) {\n File[] subSubFiles = subFile.listFiles();\n for (File subSubFile : subSubFiles) {\n subSubFile.delete();\n }\n }\n subFile.delete();\n }\n }\n file.delete();\n }\n }\n }",
"public static final void delete(final File file)\n\t{\n\t\tif (file.isDirectory())\n\t\t{\n\t\t\tfor (final String temp : file.list())\n\t\t\t{\n\t\t\t\tdelete(new File(file, temp));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfile.delete();\n\t\t}\n\t}",
"@TestFor(issues = \"TW-42737\")\n public void test_directory_remove() throws Exception {\n CommitPatchBuilder patchBuilder = myCommitSupport.getCommitPatchBuilder(myRoot);\n patchBuilder.createFile(\"dir/file\", new ByteArrayInputStream(\"content\".getBytes()));\n patchBuilder.createFile(\"dir2/file\", new ByteArrayInputStream(\"content\".getBytes()));\n patchBuilder.commit(new CommitSettingsImpl(\"user\", \"Create dir with file\"));\n patchBuilder.dispose();\n\n RepositoryStateData state1 = myGit.getCurrentState(myRoot);\n\n patchBuilder = myCommitSupport.getCommitPatchBuilder(myRoot);\n patchBuilder.deleteDirectory(\"dir\");\n patchBuilder.commit(new CommitSettingsImpl(\"user\", \"Delete dir\"));\n patchBuilder.dispose();\n\n RepositoryStateData state2 = myGit.getCurrentState(myRoot);\n\n List<ModificationData> changes = myGit.getCollectChangesPolicy().collectChanges(myRoot, state1, state2, CheckoutRules.DEFAULT);\n then(changes).hasSize(1);\n then(changes.get(0).getChanges()).extracting(\"fileName\", \"type\").containsOnly(Tuple.tuple(\"dir/file\", VcsChange.Type.REMOVED));\n }",
"@Override\n public FileVisitResult postVisitDirectory(Path dir, IOException e) throws IOException{\n if (e == null) {\n Files.deleteIfExists(dir);\n }\n return FileVisitResult.CONTINUE;\n }",
"public void deleteFiles(File directory) {\n File[] contents = directory.listFiles();\n if (contents != null) {\n for (File file : contents) {\n deleteFiles(file);\n }\n }\n directory.delete();\n }",
"protected boolean cleanUpDir(File dir) {\n if (dir.isDirectory()) {\n LOG.info(\"Cleaning up \" + dir.getName());\n String[] children = dir.list();\n for (String string : children) {\n boolean success = cleanUpDir(new File(dir, string));\n if (!success)\n return false;\n }\n }\n // The directory is now empty so delete it\n return dir.delete();\n }",
"public void reset(File folder) {\n File[] listOfFiles = folder.listFiles();\n for(int x=0;x<listOfFiles.length;x++) {\n if(listOfFiles[x].isDirectory()) {\n this.reset(listOfFiles[x]);\n listOfFiles[x].delete();\n }\n }\n folder.delete();\n }",
"public static boolean delete(File dir) {\r\n boolean success = true;\r\n File files[] = dir.listFiles();\r\n if (files != null) {\r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n // delete the directory and all of its contents.\r\n if (!delete(files[i])) {\r\n success = false;\r\n }\r\n }\r\n // delete each file in the directory\r\n if (!files[i].delete()) {\r\n success = false;\r\n }\r\n }\r\n }\r\n // finally delete the directory\r\n if (!dir.delete()) {\r\n success = false;\r\n }\r\n return success;\r\n }",
"public void cleanDirs() {\n\t\tfor (File f : files) {\n\t\t\tFileUtils.deleteDir(f.toString());\n\t\t}\n\t}",
"public static void cleanDirectory(final ContextualLogger logger, Path start) throws IOException {\n if (!start.toFile().exists()) {\n boolean didMake = start.toFile().mkdir();\n Assert.assertTrue(didMake);\n }\n // We need the directory to be a directory (as we don't want to follow symlinks anywhere in this delete operation).\n Assert.assertTrue(start.toFile().isDirectory());\n // We don't want to delete the starting directory, but we do want to delete everything in it.\n Files.walkFileTree(start, new FileVisitor<Path>() {\n @Override\n public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {\n // Do nothing.\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n // This clearly can't be the start.\n Assert.assertFalse(start.equals(file));\n // Delete the file.\n Files.delete(file);\n logger.output(\"Deleted file \" + file);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\n logger.error(\"visitFileFailed: \\\"\" + file + \"\\\"\");\n throw exc;\n }\n\n @Override\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\n if (null == exc) {\n // Make sure that this isn't the starting directory.\n if (!start.equals(dir)) {\n Files.delete(dir);\n logger.output(\"Deleted directory \" + dir);\n }\n } else {\n throw exc;\n }\n return FileVisitResult.CONTINUE;\n }\n }\n );\n }",
"public static void deleteEverythingInPath(String path) {\n try {\n Path rootPath = Paths.get(path);\n Files.walk(rootPath, FileVisitOption.FOLLOW_LINKS)\n .sorted(Comparator.reverseOrder())\n .map(Path::toFile)\n .peek(System.out::println)\n .forEach(File::delete);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public boolean deleteFileTree(String target) throws IOException {\n\t\tsuccesses.clear();\n\t\tfailures.clear();\n\t\tfinal Path targetPath = Paths.get(target);\n\t\ttry {\n\t\t\tif(!Files.exists(targetPath))\n\t\t\t\treturn false;\n\t\t\tFiles.walkFileTree(targetPath, EnumSet.of(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE, new SimpleFileVisitor<Path>() {\n\n\t\t\t\t/* (non-Javadoc)\n\t\t\t\t * @see java.nio.file.SimpleFileVisitor#visitFile(java.lang.Object, java.nio.file.attribute.BasicFileAttributes)\n\t\t\t\t */\n\t\t\t\t@Override\n\t\t\t\tpublic FileVisitResult visitFile(Path file,\n\t\t\t\t\t\tBasicFileAttributes attrs) throws IOException {\n\t\t\t\t\tFiles.delete(file);\n\t\t\t\t\tsuccesses.add(file);\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t\t}\n\n\t\t\t\t/* (non-Javadoc)\n\t\t\t\t * @see java.nio.file.SimpleFileVisitor#postVisitDirectory(java.lang.Object, java.io.IOException)\n\t\t\t\t */\n\t\t\t\t@Override\n\t\t\t\tpublic FileVisitResult postVisitDirectory(Path dir,\n\t\t\t\t\t\tIOException exc) throws IOException {\n\t\t\t\t\tFiles.delete(dir);\n\t\t\t\t\tsuccesses.add(dir);\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t\t}\n\n\t\t\t\t/* (non-Javadoc)\n\t\t\t\t * @see java.nio.file.SimpleFileVisitor#visitFileFailed(java.lang.Object, java.io.IOException)\n\t\t\t\t */\n\t\t\t\t@Override\n\t\t\t\tpublic FileVisitResult visitFileFailed(Path file,\n\t\t\t\t\t\tIOException exc) throws IOException {\n\t\t\t\t\tfailures.add(file);\n//\t\t\t\t\treturn super.visitFileFailed(file, exc);\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t} catch (IOException e) {\n\t\t\tthrow e;\n\t\t}\n\t\tfinally {\n\t\t\tif(!successes.isEmpty()) {\n\t\t\t\tSystem.out.println(\"Succeeded\t to delete the following paths:\");\n\t\t\t\tfor(Path p : successes)\n\t\t\t\t\tSystem.out.println(p.toString());\n\t\t\t}\n\t\t\tif(!failures.isEmpty()) {\n\t\t\t\tSystem.out.println(\"Failed to delete the following paths:\");\n\t\t\t\tfor(Path p : failures)\n\t\t\t\t\tSystem.out.println(p.toString());\n\t\t\t}\n\t\t}\n\t\tif(failures.isEmpty())\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public static Boolean deleteFile(String parent, String fileName, boolean recursive) {\r\n File file = new File(parent, fileName);\r\n if (file.isDirectory() && file.list().length > 0) {\r\n deleteFile(file, recursive);\r\n }\r\n return deleteFile(file, recursive);\r\n }",
"public static void deletePath(Path path) throws IOException {\n if (!Files.isDirectory(path) || Files.list(path).count() == 0) { Files.deleteIfExists(path); }\n else {\n try (Stream<Path> files = Files.list(path)) {\n files.forEach(p -> {\n try { deletePath(p); }\n catch (IOException e) { e.printStackTrace(); }\n });\n Files.delete(path);\n }\n }\n }",
"public static final void deleteDirectory(File directory) throws IOException {\n if (!directory.exists()) {\n return;\n }\n\n cleanDirectory(directory);\n\n if (!directory.delete()) {\n throw new IOException(\"Unable to delete directory \" + directory + \".\");\n }\n }",
"private void delete(File file) {\n if (file.isDirectory()) {\n cleanDirectory(file);\n }\n file.delete();\n }",
"public static void deleteDirectory(String inputDirectory) {\n File directory = new File(inputDirectory);\n //check if it is a directory\n if (directory.isDirectory()) {\n //check if the directory has children\n if (directory.listFiles().length == 0) {\n directory.delete();\n System.out.println(\"Directory is deleted: \"\n + directory.getAbsolutePath());\n } else {\n //ask user whether he wants to delete the directory\n System.out.println(\"The chosen directory contains few files.\");\n viewDirectory(inputDirectory);\n System.out.println(\"Do you really want to delete the whole directory: \\n 1.Yes\\n 2.No\");\n Scanner userInput = new Scanner(System.in);\n String userRes = userInput.nextLine();\n if (userRes.equalsIgnoreCase(\"yes\") || userRes.equalsIgnoreCase(\"1\")) {\n //delete files inside the directory one by one\n deleteFilesInsideDirectory(directory);\n //delete parent directory\n directory.delete();\n if (!directory.exists()) {\n System.out.println(\"Directory has been deleted.\");\n } else {\n System.out.println(\"Deletion failed\");\n }\n } else if (userRes.equalsIgnoreCase(\"no\") || userRes.equalsIgnoreCase(\"2\")) {\n System.out.println(\"Delete directory request cancelled by user.\");\n } else {\n deleteDirectory(inputDirectory);\n }\n }\n } else {\n System.out.println(\"Invalid path or directory.\");\n }\n }",
"public static void deleteDirectory(String directory) {\n if (directory == null) {\n return;\n }\n\n File dir = new File(directory);\n if (dir.isDirectory() == false) {\n return;\n }\n\n deleteDirectory(dir);\n }",
"public static void cleanDirectory( File directory ) throws IOException\n {\n if ( !directory.exists() )\n {\n throw new IllegalArgumentException( I18n.err( I18n.ERR_17006_DOES_NOT_EXIST, directory ) );\n }\n\n if ( !directory.isDirectory() )\n {\n throw new IllegalArgumentException( I18n.err( I18n.ERR_17007_IS_NOT_DIRECTORY, directory ) );\n }\n\n File[] files = directory.listFiles();\n\n if ( files == null )\n {\n // null if security restricted\n throw new IOException( I18n.err( I18n.ERR_17008_FAIL_LIST_DIR, directory ) );\n }\n\n IOException exception = null;\n\n for ( File file : files )\n {\n try\n {\n forceDelete( file );\n }\n catch ( IOException ioe )\n {\n exception = ioe;\n }\n }\n\n if ( null != exception )\n {\n throw exception;\n }\n }",
"@Override\r\n public void deleteFolder(long id) {\n this.folderRepository.deleteById(id);; \r\n }",
"public static long deleteDirectory(String filePath) {\n if (!filePath.endsWith(File.separator)) {\n filePath = filePath + File.separator;\n }\n File dirFile = new File(filePath);\n if (!dirFile.exists()) {\n return 0;\n }\n if(!dirFile.isDirectory()) {\n return dirFile.delete() ? dirFile.length() : 0;\n }\n long delSize = 0;\n File[] files = dirFile.listFiles();\n for (int i = 0; i < files.length; i++) {\n File f = files[i];\n if(!f.exists()) continue;\n if (f.isFile()) {\n long len = f.length();\n boolean del = deleteFile(f);\n if (del) {\n delSize += len;\n } else {\n Log.w(TAG, \"Delete file failed: \" + f.getPath());\n }\n } else {\n delSize += deleteDirectory(files[i].getAbsolutePath());\n }\n }\n dirFile.delete();\n if (delSize <= 0)\n Log.w(TAG, \"Delete directory failed: \" + filePath);\n return delSize;\n }",
"public static void deleteGitRepository(Git repo) throws IOException {\n if (repo != null\n && repo.getRepository() != null\n && repo.getRepository().getDirectory() != null\n && repo.getRepository().getDirectory().exists()) {\n // This is literally the git directory, i.e. /some/hierarchy/repository/.git,\n // but we want to delete its parent directory.\n File gitDirectory = repo.getRepository().getDirectory();\n org.apache.commons.io.FileUtils.forceDelete(gitDirectory.getParentFile());\n }\n }",
"public static void deleteFolder(String path){\n List<CMSFile> files = CMSFile.find(\"name like '\" + path + \"%'\").fetch();\n for (CMSFile file: files){\n if (file.data != null && file.data.exists()) {\n file.data.getFile().delete();\n }\n file.delete();\n }\n }",
"public void delete(Key key) {\n\troot = delete(root, key);\t\n}",
"@Override\n public FileVisitResult postVisitDirectory(Path dir,\n IOException exc)\n throws IOException {\n Files.delete(dir);\n System.out.printf(\"Directory is deleted : %s%n\", dir);\n return FileVisitResult.CONTINUE;\n }",
"public static void deleteDirectory(String directory){\n\t\tlog.info(\"Removing \" + directory + \" directory\");\n\t\tFile tempDir = new File(directory);\n\t\tdeleteDirectory(tempDir);\n\t\tlog.info(\"Finished removing directory\");\n\t}",
"public void delete(Key key) {\n root = delete(root, key);\n }",
"private void deleteFileOrFolder(File fileOrFolder) {\n if (fileOrFolder != null) {\n if (fileOrFolder.isDirectory()) {\n for (File item : fileOrFolder.listFiles()) {\n deleteFileOrFolder(item);\n }\n }\n if (!fileOrFolder.delete()) {\n fileOrFolder.deleteOnExit();\n }\n }\n }"
] |
[
"0.78064746",
"0.6895766",
"0.6865894",
"0.6768083",
"0.66636527",
"0.6661025",
"0.6583264",
"0.6574442",
"0.6568091",
"0.6539849",
"0.6521884",
"0.65184486",
"0.6436489",
"0.6415346",
"0.63964534",
"0.6370144",
"0.63657975",
"0.6264808",
"0.62471056",
"0.62468386",
"0.6241091",
"0.62330157",
"0.6225307",
"0.6109025",
"0.6085935",
"0.6082755",
"0.6074171",
"0.6073803",
"0.6063821",
"0.60631925",
"0.6049411",
"0.602547",
"0.5981908",
"0.5970929",
"0.5944292",
"0.59232545",
"0.5910577",
"0.5900153",
"0.5884868",
"0.58749783",
"0.58711785",
"0.58668435",
"0.58561105",
"0.5855793",
"0.5806472",
"0.5794876",
"0.5794576",
"0.57923067",
"0.57910407",
"0.57771224",
"0.57684827",
"0.5767095",
"0.5749533",
"0.5748564",
"0.57471555",
"0.574513",
"0.5742104",
"0.5735275",
"0.57332796",
"0.5729165",
"0.5678535",
"0.56733626",
"0.56686205",
"0.56683254",
"0.56204545",
"0.56137335",
"0.56091136",
"0.55875313",
"0.55862117",
"0.55855",
"0.5584692",
"0.55678356",
"0.5564877",
"0.5561946",
"0.5555868",
"0.55544955",
"0.55317444",
"0.552929",
"0.55275387",
"0.54871225",
"0.54788756",
"0.5475877",
"0.54725826",
"0.54715073",
"0.5459703",
"0.5458756",
"0.5457639",
"0.54465014",
"0.54420394",
"0.5437521",
"0.54283804",
"0.5422523",
"0.5414304",
"0.54090863",
"0.54019374",
"0.54012334",
"0.5379826",
"0.53796506",
"0.5376013",
"0.5373514"
] |
0.69980127
|
1
|
Try our best to find the base directory of plugin among an Eclipse project, this enable us to use run JUnit without the slow JUnit Plugin test This would still fail for EMMA as the run in alternative locations that doesn't mirror our plugin.
|
private static URL findPluginBaseWithoutLoadingPlugin(Plugin plugin) {
try {
URL url = plugin.getClass().getResource(".");
try {
// Plugin test with OSGi plugin need to resolve bundle resource
url = FileLocator.resolve(url);
} catch (NullPointerException e) {
// junit non plugin test, OSGi plugin is not loaded
} catch (IOException e) {
// junit non plugin test
}
java.io.File currentFile = new java.io.File(url.toURI()); //$NON-NLS-1$
do {
currentFile = currentFile.getParentFile();
if (currentFile.getName().equals("bin") || currentFile.getName().equals("src")) { //$NON-NLS-1$ //$NON-NLS-2$
if (new File(currentFile.getParentFile(), "plugin.xml").exists()) { //$NON-NLS-1$
// Eclipse project should have plugin.xml at root
try {
return currentFile.getParentFile().toURI().toURL();
} catch (MalformedURLException e) {
// give up and just bail out to null like before
return null;
}
}
}
} while (currentFile.getParentFile() != null);
} catch (URISyntaxException e) {
// give up and just bail out to null like before
return null;
}
return null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"abstract public String getMspluginsDir();",
"private static File getTestDataDir() {\n File ancestor = new File(System.getProperty(\"protobuf.dir\", \".\"));\n String initialPath = ancestor.getAbsolutePath();\n try {\n ancestor = ancestor.getCanonicalFile();\n } catch (IOException e) {\n throw new RuntimeException(\n \"Couldn't get canonical name of working directory.\", e);\n }\n while (ancestor != null && ancestor.exists()) {\n if (new File(ancestor, \"src/google/protobuf\").exists()) {\n return new File(ancestor, \"src/google/protobuf/testdata\");\n }\n ancestor = ancestor.getParentFile();\n }\n\n throw new RuntimeException(\n \"Could not find golden files. This test must be run from within the \" +\n \"protobuf source package so that it can read test data files from the \" +\n \"C++ source tree: \" + initialPath);\n }",
"public MPXJTestCase()\n {\n m_basedir = System.getProperty(\"mpxj.junit.datadir\");\n if (m_basedir == null || m_basedir.length() == 0)\n {\n assertTrue(\"missing datadir property\", false);\n }\n\n String runtime = System.getProperty(\"java.runtime.name\");\n m_ikvm = (runtime != null && runtime.indexOf(\"IKVM\") != -1);\n }",
"private static File getTestDataDir() {\n File ancestor = new File(\".\");\n try {\n ancestor = ancestor.getCanonicalFile();\n } catch (IOException e) {\n throw new RuntimeException(\n \"Couldn't get canonical name of working directory.\", e);\n }\n while (ancestor != null && ancestor.exists()) {\n if (new File(ancestor, \"src/google/protobuf\").exists()) {\n return new File(ancestor, \"src/google/protobuf/testdata\");\n }\n ancestor = ancestor.getParentFile();\n }\n\n throw new RuntimeException(\n \"Could not find golden files. This test must be run from within the \" +\n \"protobuf source package so that it can read test data files from the \" +\n \"C++ source tree.\");\n }",
"@Test\n public void test_NoDefaultDebugPluginIsReturned() {\n\n Context appContext = getAppContext();\n\n PluginManager pluginManager = new PluginManager(appContext);\n\n DebugManager debugManager = pluginManager.getDebugToolManager();\n\n // Check the debugPlugin is not null\n assertNotNull(debugManager);\n\n Class<DefaultDebugPlugin> defaultDebugPluginClass = DefaultDebugPlugin.class;\n\n DebugPlugin debugPluginInstance = debugManager.getDebugPlugin();\n\n // Check the debugPlugin class instance does not match the De\n assertNotEquals(defaultDebugPluginClass, debugPluginInstance.getClass());\n }",
"@Override \n\t\tprotected String findEclipseOnPlatform(File dir) {\n\t\t\tFile possible = new File(dir, getWindowsExecutableName());\n\t\t\treturn (possible.isFile()) ? dir.getAbsolutePath() : null;\n\t\t}",
"public static String testHome()\n {\n if (testHome == null)\n {\n //See if we set it as a property using TestLauncher\n testHome = System.getProperty (\"jacorb.test.home\");\n\n //Try to find it from the run directory\n if (testHome == null)\n {\n URL url = TestUtils.class.getResource(\"/.\");\n\n String result = url.toString();\n if (result.matches(\"file:/.*?\"))\n {\n result = result.substring (5, result.length() - 9);\n }\n String relativePath=\"/classes/\";\n if (!pathExists(result, relativePath))\n {\n throw new RuntimeException (\"cannot find test home\");\n }\n testHome = osDependentPath(result);\n }\n }\n return testHome;\n }",
"public String searchExportedPlugins()\n\t{\n\t\tFile parent = null;\n\t\tif (System.getProperty(\"eclipse.home.location\") != null)\n\t\t\tparent = new File(URI.create(System.getProperty(\"eclipse.home.location\").replaceAll(\" \", \"%20\")));\n\t\telse parent = new File(System.getProperty(\"user.dir\"));\n\n\t\tList<String> pluginLocations = exportModel.getPluginLocations();\n\t\tfor (String libName : NG_LIBS)\n\t\t{\n\t\t\tint i = 0;\n\t\t\tboolean found = false;\n\t\t\twhile (!found && i < pluginLocations.size())\n\t\t\t{\n\t\t\t\tFile pluginLocation = new File(pluginLocations.get(i));\n\t\t\t\tif (!pluginLocation.isAbsolute())\n\t\t\t\t{\n\t\t\t\t\tpluginLocation = new File(parent, pluginLocations.get(i));\n\t\t\t\t}\n\t\t\t\tFileFilter filter = new WildcardFileFilter(libName);\n\t\t\t\tFile[] libs = pluginLocation.listFiles(filter);\n\t\t\t\tif (libs != null && libs.length > 0)\n\t\t\t\t{\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (!found) return libName;\n\t\t}\n\t\treturn null;\n\t}",
"public void testProjectRootFolderOfTestProjectType() throws Exception {\n TestArtifactSearchScopes scopes = loadMultiProjectAndGetTestScopesForModule(\"module4\");\n\n VirtualFile module4Root = createFileIfNotExists(\"module4\");\n VirtualFile module4Source = createFileIfNotExists(\"module4/src/main/java/Test.java\");\n\n assertFalse(scopes.isUnitTestSource(module4Root));\n assertFalse(scopes.isUnitTestSource(module4Source));\n\n assertTrue(scopes.isAndroidTestSource(module4Root));\n assertTrue(scopes.isAndroidTestSource(module4Source));\n }",
"private void locateDefaultPlugins() {\n \t\tHashMap runtimeImport = getRuntimeImport();\n \n \t\t// locate runtime plugin matching the import from boot\n \t\tURL runtimePluginPath = getPluginPath(runtimeImport);\n \t\tif (runtimePluginPath == null)\n \t\t\tthrow new RuntimeException(Policy.bind(\"error.runtime\")); //$NON-NLS-1$\n \n \t\t// get boot descriptor for runtime plugin\n \t\truntimeDescriptor = createPluginBootDescriptor(runtimePluginPath);\n \n \t\t// determine the xml plugin for the selected runtime\n \t\tHashMap xmlImport = getImport(runtimePluginPath, XML_PLUGIN_ID);\n \n \t\t// locate xml plugin matching the import from runtime plugin\n \t\tURL xmlPluginPath = getPluginPath(xmlImport);\n \t\tif (xmlPluginPath == null)\n \t\t\tthrow new RuntimeException(Policy.bind(\"error.xerces\")); //$NON-NLS-1$\n \n \t\t// get boot descriptor for xml plugin\n \t\txmlDescriptor = createPluginBootDescriptor(xmlPluginPath);\n \t}",
"public void testGetFileForLocation() {\n \t\tIWorkspaceRoot root = getWorkspace().getRoot();\n \t\tassertTrue(\"1.0\", root.getFileForLocation(root.getLocation()) == null);\n \t}",
"public void test_DefaultDebugPluginIsReturnedWhenError() {\n\n Context appContext = getAppContext();\n\n PluginManager pluginManager = new PluginManager(appContext);\n\n DebugManager debugManager = pluginManager.getDebugToolManager();\n\n // Check the debugPlugin is not null\n assertNotNull(debugManager);\n\n Class<DefaultDebugPlugin> defaultDebugPluginClass = DefaultDebugPlugin.class;\n\n DebugPlugin debugPluginInstance = debugManager.getDebugPlugin();\n\n // Check a debugPlugin class instance was returned\n assertEquals(defaultDebugPluginClass, debugPluginInstance.getClass());\n }",
"public void testAllPlugins() throws ProcessingException {\n JavaNet net = JavaNet.connect();\n JNProject hudson = net.getProject(\"hudson\");\n\n JNIssueComponent comp = hudson.getIssueTracker().getComponent(\"hudson\");\n\n Set<String> names = new HashSet<String>();\n for(String n : comp.getSubcomponents().keySet())\n names.add(n.toLowerCase());\n\n Set<String> problems = new TreeSet<String>();\n\n JNFileFolder folder = hudson.getFolder(\"/plugins\");\n for( JNFileFolder plugin : folder.getSubFolders().values() ) {\n String n = plugin.getName().toLowerCase();\n if(n.equals(\"bco\"))\n continue; // this isn't a plugin in Hudson SVN\n if(n.equals(\"ivy2\"))\n continue; // merged to the ivy plugin\n if(names.contains(n) || names.contains(n+\"-plugin\"))\n continue; // OK\n problems.add(plugin.getName());\n }\n if(!problems.isEmpty())\n fail(problems+\" doesn't have a component\");\n }",
"File getPluginDirectory(String pluginId);",
"@Test\n public void should_find_one_test_unit_for_one_feature_available_in_classpath_using_subclassed_runner() throws Exception {\n \tList<TestUnit> testUnits = finder.findTestUnits(HideFromJUnit.Pepino.class);\n \t\n \t// then\n \tassertThat(testUnits).hasSize(1);\n \tDescription description = testUnits.get(0).getDescription();\n \tassertThat(description.getFirstTestClass()).contains(HideFromJUnit.Pepino.class.getSimpleName());\n \tassertThat(description.getName()).containsIgnoringCase(\"Shopping\").containsIgnoringCase(\"change\");\n }",
"default Optional<Path> getProjectDir() {\n Optional<Path> projectDir = get(MICRONAUT_PROCESSING_PROJECT_DIR, Path.class);\n if (projectDir.isPresent()) {\n return projectDir;\n }\n // let's find the projectDir\n Optional<GeneratedFile> dummyFile = visitGeneratedFile(\"dummy\" + System.nanoTime());\n if (dummyFile.isPresent()) {\n URI uri = dummyFile.get().toURI();\n // happens in tests 'mem:///CLASS_OUTPUT/dummy'\n if (uri.getScheme() != null && !uri.getScheme().equals(\"mem\")) {\n // assume files are generated in 'build' or 'target' directories\n Path dummy = Paths.get(uri).normalize();\n while (dummy != null) {\n Path dummyFileName = dummy.getFileName();\n if (dummyFileName != null && (\"build\".equals(dummyFileName.toString()) || \"target\".equals(dummyFileName.toString()))) {\n projectDir = Optional.ofNullable(dummy.getParent());\n put(MICRONAUT_PROCESSING_PROJECT_DIR, dummy.getParent());\n break;\n }\n dummy = dummy.getParent();\n }\n }\n }\n\n return projectDir;\n }",
"public static String getBaseDir() {\n // 'basedir' is set by Maven Surefire. It always points to the current subproject,\n // even in reactor builds.\n String baseDir = System.getProperty(\"basedir\");\n\n // if 'basedir' is not set, try the current directory\n if (baseDir == null) {\n baseDir = System.getProperty(\"user.dir\");\n }\n return baseDir;\n }",
"public void createTestDir() {\n\t\tworkDir = new File(System.getProperty(\"test.dir\", \"target\"));\n\t}",
"public static APLDebugCorePlugin getDefault() {\r\n\t\tif (plugin == null) {\r\n\t\t\tthrow new NullPointerException(\"Probably in test code relying on running outside of OSGi\");\r\n\t\t}\r\n\t\treturn plugin;\r\n\t}",
"public static String getConfigurationFilePath() {\n\n return getCloudTestRootPath() + File.separator + \"Config\"\n + File.separator + \"PluginConfig.xml\";\n }",
"public void testGetClassPath() {\n assertEquals(mb.getClassPath(), System.getProperty(\"java.class.path\"));\n }",
"@Test\n public void returnsTheCorrectNumberOfPlugins() {\n ClassPathPluginFinder finder = new ClassPathPluginFinder(testPluginsClassPath);\n assertEquals(finder.findAvailablePlugins().size(), numberOfValidPlugins);\n }",
"public synchronized Path getPluginPath( Plugin plugin )\n {\n final String canonicalName = getCanonicalName( plugin );\n if ( canonicalName != null )\n {\n return pluginDirs.get( canonicalName );\n }\n return null;\n }",
"protected String getCurrentTestedModuleFile() {\n\t\treturn null;\n\t}",
"abstract public String getTopResourcesDir();",
"@Test\r\n\tpublic void testScanBaseClass(){\n\t\tString path = JDocPluginUtils.getProjectDir().getPath()+ \"/src/test/java/\";\r\n\t\tSystem.out.println(\"path:\" + path);\r\n\t\tJavaSourceScanner scaner = new JavaSourceScanner();\r\n\t\tscaner.setSourceDir(path);\r\n\t\tList<JClassDoc> jdocs = scaner.scan(\"org.onetwo.plugins.jdoc.test\");\r\n\t\tSystem.out.println(\"testScanBaseClass:\" + getInfoDoc(jdocs).toString().trim());\r\n\t\t\r\n\t\tassertJDoc(jdocs);\r\n\t}",
"public RunResult runTests(Path exercise) throws NoLanguagePluginFoundException {\n System.err.println(\"Path: \" + exercise.toString());\n TaskExecutorImpl taskExecutor = new TaskExecutorImpl();\n return taskExecutor.runTests(exercise);\n }",
"@Override\n protected String getDefaultScriptsDir() {\n return null;\n }",
"@BeforeClass\n\tpublic static void setUpClass() {\n\t\tString resourcesDir = System.getProperty(\"user.dir\") + File.separator + \"src\" +\n File.separator + \"test\" + File.separator + \"resources\";\n\n tsmResources = resourcesDir + File.separator + \"tsm\";\n //testDir = new File(resourcesDir, \"tsm-output\"); \n\t}",
"@Test\n void findSourceJar() {\n Class<?> klass = org.apache.commons.io.FileUtils.class;\n var codeSource = klass.getProtectionDomain().getCodeSource();\n if (codeSource != null) {\n System.out.println(codeSource.getLocation());\n }\n }",
"public static String sBasePath() \r\n\t{\r\n\t\tif(fromJar) \r\n\t\t{\r\n\t\t\tFile file = new File(System.getProperty(\"java.class.path\"));\r\n\t\t\tif (file.getParent() != null)\r\n\t\t\t{\r\n\t\t\t\treturn file.getParent().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public void testPlugins() {\n final String PLUGIN_LABEL = \"JUnit\"; //NOI18N\n PluginsOperator pluginsOper = null;\n try {\n pluginsOper = PluginsOperator.invoke();\n pluginsOper.reloadCatalog();\n // Install\n\n pluginsOper.selectAvailablePlugins();\n pluginsOper.search(PLUGIN_LABEL);\n pluginsOper.install(PLUGIN_LABEL);\n\n // Deactivate\n\n pluginsOper.selectInstalled();\n try {\n pluginsOper.cbShowDetails().setSelected(true);\n } catch (JemmyException e) {\n log(\"Show Details check box not found - details already shown.\");\n }\n pluginsOper.selectPlugin(PLUGIN_LABEL);\n pluginsOper.deactivate();\n pluginsOper.installer().cancel();\n\n /* Because it needs restart to deactivate module (probably can be changed in \n * future releases), we skip this part.\n * \n // check Status line\n // \"Turning off modules...done.\"\n String turningOffLabel = Bundle.getString(\"org.netbeans.core.startup.Bundle\", \"MSG_finish_disable_modules\");\n // increase timeout to 120 seconds\n MainWindowOperator.getDefault().getTimeouts().setTimeout(\"Waiter.WaitingTime\", 120000);\n MainWindowOperator.getDefault().waitStatusText(turningOffLabel);\n // click Finish button\n String finishLabel = Bundle.getStringTrimmed(\"org.netbeans.modules.autoupdate.ui.wizards.Bundle\", \"InstallUnitWizardModel_Buttons_Finish\");\n new JButtonOperator(installerOper, finishLabel).push();\n \n // Activate module\n \n pluginsOper.selectInstalled();\n pluginsOper.selectPlugin(PLUGIN_LABEL);\n pluginsOper.activate();\n // \"Activate\"\n String activateInDialogLabel = Bundle.getStringTrimmed(\"org.netbeans.modules.autoupdate.ui.wizards.Bundle\", \"UninstallUnitWizardModel_Buttons_TurnOn\");\n new JButtonOperator(pluginsOper.installer(), activateInDialogLabel).pushNoBlock();\n // check Status line\n // \"Turning on modules...done.\"\n String turningOnLabel = Bundle.getString(\"org.netbeans.core.startup.Bundle\", \"MSG_finish_enable_modules\");\n // increase timeout to 120 seconds\n MainWindowOperator.getDefault().getTimeouts().setTimeout(\"Waiter.WaitingTime\", 120000);\n MainWindowOperator.getDefault().waitStatusText(turningOnLabel);\n // click Finish button\n pluginsOper.installer().finish();\n */\n\n pluginsOper.close();\n } catch (JemmyException e) {\n // close possible error dialog\n // \"Error\"\n String errorTitle = Bundle.getString(\"org.netbeans.modules.autoupdate.ui.Bundle\", \"CTL_Error\");\n if (JDialogOperator.findJDialog(errorTitle, true, true) != null) {\n new NbDialogOperator(errorTitle).close();\n }\n // close Plugins dialog\n if (pluginsOper != null) {\n pluginsOper.close();\n }\n throw e;\n }\n }",
"public void execute() throws MojoExecutionException, MojoFailureException {\n\n File target = new File(getDistfolder());\n\n // only create the target directoty when it doesn't exist\n // no deletion\n if (!target.exists()) {\n target.mkdir();\n } else {\n getLog().warn(\"Using existing target directory \" + target.getAbsolutePath());\n }\n\n getLog().info(\"Target is \" + target);\n\n String excludes2 = getExcludes();\n\n if (excludes2 == null) {\n excludes2 = \"**/.svn/,**/.cvs/\";\n\n getLog().info(\"Configuration for excludes not set. Defaulting to: \\\"\" + excludes2\n + \"\\\". Excludes are ant-fileset-style.\");\n } else {\n if (excludes2.contains(\"__acl\") || excludes2.contains(\"__properties\")) {\n getLog().warn(\"Your excludes \\\"\" + excludes2\n + \"\\\" contains __acl or __properties. You do not want these to be excluded in order to have permissoins and properties work.\");\n }\n }\n\n try {\n String targetLibPath = getTargetLibPath();\n\n if ((null != targetLibPath) && !\"\".equals(targetLibPath)) {\n File targetLibDir = new File(target, targetLibPath);\n\n if (!targetLibDir.exists()) {\n targetLibDir.mkdirs();\n }\n\n if (!targetLibDir.isDirectory()) {\n throw new MojoExecutionException(\"Could not create targetLibdir: \" + targetLibDir.toString());\n }\n\n File jar = new File(jarFile);\n FileUtils.copyFileToDirectory(jar, targetLibDir);\n }\n\n for (Resource resource : srcResources) {\n File source = new File(resource.getDirectory());\n File currentTarget = null;\n\n if (resource.getTargetPath() != null) {\n currentTarget = new File(target, resource.getTargetPath());\n } else {\n currentTarget = target;\n }\n\n String normalized = source.getAbsolutePath();\n int offsetLength = normalized.length();\n\n getLog().debug(\"Normalzed sourcefolder is \" + normalized + \" (Offset is: \" + offsetLength + \")\");\n\n List<String> results = FileUtils.getFileAndDirectoryNames(source, null, excludes2, true, true, true,\n true);\n\n for (String fileName : results) {\n File file = new File(fileName);\n\n String normalizedParent = new File(file.getParent()).getAbsolutePath();\n\n if (offsetLength > normalizedParent.length()) {\n getLog().info(\"Skipping file (its the sourcefolder or a parent of it): \"\n + file.getAbsolutePath());\n getLog().debug(\"Parent: \" + normalizedParent + \" with length \" + normalizedParent.length());\n\n continue;\n }\n\n String relative = file.getParent();\n relative = relative.substring(offsetLength); // cut the target-dir away\n\n getLog().debug(\"Copy \" + file + \" to \" + currentTarget.getPath() + File.separator + relative);\n\n if (file.isFile()) {\n File parent = new File(currentTarget.getPath() + File.separator + relative);\n\n if (!parent.exists()) {\n // create dir if it does not exist\n parent.mkdirs();\n }\n\n FileUtils.copyFileToDirectory(file, parent);\n } else if (file.isDirectory()) {\n // take care about directories (so that empty dirs get created)\n\n File tocreate = new File(currentTarget.getPath() + File.separator + relative + File.separator\n + file.getName());\n getLog().debug(\"Creating dir\" + tocreate.toString());\n tocreate.mkdirs();\n }\n }\n }\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Could copy file(s) to directory\", ex);\n }\n }",
"@Override\n public URL getTemplateLocation() {\n try {\n String[] candidates = getDirectoryCandidates();\n for (int i = 0; i < candidates.length; i++) {\n if (Activator.getDefault().getBundle().getEntry(candidates[i]) != null) {\n URL candidate = new URL(getInstallURL(), candidates[i]);\n return candidate;\n }\n }\n } catch (MalformedURLException e) { // do nothing\n }\n return null;\n }",
"@NotNull // or exception\r\n public static VirtualFile get_project_base_dir(final Project project) throws Exception {\n String project_path = project.getBasePath();\r\n if (project_path == null) {\r\n throw new Exception(\"Cannot detect the project base path\");\r\n }\r\n /*\r\n// boolean found = false;\r\n// String content_root_list = \"\";\r\n// // https://jetbrains.org/intellij/sdk/docs/reference_guide/project_model/project.html\r\n// List<String> content_roots = ProjectRootManager.getInstance(project).getContentRootUrls();\r\n// for (String content_root_path : content_roots) {\r\n// if (content_root_path.endsWith(project_path)) {\r\n// found = true;\r\n// }\r\n// content_root_list += \"[\" + content_root_path + \"]\";\r\n// }\r\n// if (!found) {\r\n// throw new Exception(\"Something is wrong with project structure.\\r\\nProject base path '\" + project_path + \"' not found among content roots:\\r\\n\" + content_root_list);\r\n// }\r\n */\r\n File file = new File(project_path);\r\n // https://intellij-support.jetbrains.com/hc/en-us/community/posts/360001957360-Get-file-from-path-to-have-a-virtual-file\r\n VirtualFile res = VfsUtil.findFileByIoFile(file, true);\r\n if (res == null) {\r\n throw new Exception(\"Cannot find project directory in virtual file system\");\r\n }\r\n return res;\r\n }",
"public static Path getCommunityRootFromWorkingDirectory() {\n Path workingDirectory = Paths.get(System.getProperty(\"user.dir\"));\n\n Path current = workingDirectory;\n while (current.getParent() != null) {\n for (String pathCandidate : Arrays.asList(\".\", \"community\", \"ultimate/community\")) {\n Path probeFile = current.resolve(pathCandidate).resolve(\"intellij.idea.community.main.iml\");\n if (Files.exists(probeFile)) {\n return probeFile.getParent();\n }\n }\n\n current = current.getParent();\n }\n\n throw new IllegalStateException(\"IDEA Community root was not found from current working directory \" + workingDirectory);\n }",
"public static String getBasePath() {\n String basePath;\n if (new File(\"../../MacOS/JavaApplicationStub\").canExecute()) {\n basePath = \"../../../..\";\n } else {\n basePath = \".\";\n }\n return basePath;\n }",
"private static File getAspectWorkspace() {\n try {\n URL url = Platform.getBundle(Activator.PLUGIN_ID).getEntry(\"resources\");\n URL resolved = FileLocator.resolve(url);\n return new File(resolved.getPath());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"public static String buildPathToTestOutputDir(String relpath) {\n return String.format(\"%s/src/test/resources/test_output/%s\", System.getProperty(\"user.dir\"), relpath);\n }",
"public static File getWorkspaceDir(BundleContext context)\n {\n return new File(getTargetDir(context), \"../../\");\n }",
"@Test\n public void testitFailFastSingleThread() throws Exception {\n File testDir = ResourceExtractor.simpleExtractResources(getClass(), \"/mng-0095\");\n\n Verifier verifier = newVerifier(testDir.getAbsolutePath());\n verifier.setAutoclean(false);\n verifier.deleteDirectory(\"target\");\n verifier.deleteDirectory(\"subproject1/target\");\n verifier.deleteDirectory(\"subproject2/target\");\n verifier.deleteDirectory(\"subproject3/target\");\n verifier.addCliArgument(\"--fail-fast\");\n verifier.setLogFileName(\"log-ff-mt1.txt\");\n verifier.addCliArgument(\"-Dmaven.threads.experimental=1\");\n\n try {\n verifier.addCliArgument(\"org.apache.maven.its.plugins:maven-it-plugin-touch:touch\");\n verifier.execute();\n verifier.verifyErrorFreeLog();\n } catch (VerificationException e) {\n // expected\n }\n\n verifier.verifyFilePresent(\"target/touch.txt\");\n verifier.verifyFileNotPresent(\"subproject1/target/touch.txt\");\n verifier.verifyFileNotPresent(\"subproject2/target/touch.txt\");\n verifier.verifyFileNotPresent(\"subproject3/target/touch.txt\");\n }",
"public IStatus prepareRuntimeDirectory(IPath baseDir);",
"@Test\n public void testPlugin(@TempDir File outputDirectory) throws Exception {\n final String mappingsDirectoryPath = mappingsDir.getAbsolutePath();\n final String outputDirectoryPath = outputDirectory.getAbsolutePath();\n final var mojo =\n new GenerateCsvWritersFromDslMojo(mappingsDirectoryPath, outputDirectoryPath, project);\n mojo.execute();\n verify(project).addCompileSourceRoot(outputDirectoryPath);\n for (String outputFilePath : OUTPUT_FILE_PATHS) {\n compareFiles(expectedDir, outputDirectory, outputFilePath);\n }\n }",
"public String getTestsuiteDirectory() {\n\t\treturn props.getProperty(ARGUMENT_TESTSUITE_DIRECTORY);\n\t}",
"protected String getSahiFolder() {\n String packageName = \"/sahi\";\n Path sahHomeFolder = resolveResource(AbstractSakuliTest.class, packageName);\n if (Files.exists(sahHomeFolder)) {\n return sahHomeFolder.normalize().toAbsolutePath().toString();\n }\n throw new SakuliRuntimeException(\"Cannot load SAHI_HOME folder! Should be normally under 'target/classes/\" + packageName + \"'\");\n }",
"public void detailTestPath() {\n // Get test run file\n File report_path = new File(System.getProperty(PATH) + TESTNG);\n // Check if the path exists\n if (!report_path.exists()) {\n System.out.println(SEE_THE_DETAIL_TEST__REPORT_ + System.getProperty(PATH) + LOGXML);\n // Get error log file\n File path = new File(System.getProperty(PATH) + ERROR_LOGLOGTXT);\n // If file exists then display error log file path\n if (path.exists()) {\n System.out.println(SEE_THE_DETAIL_ERROR__REPORT_ + System.getProperty(PATH) + ERROR_LOGLOGTXT);\n }\n }\n }",
"@Test\n public void testitFailAtEndSingleThread() throws Exception {\n File testDir = ResourceExtractor.simpleExtractResources(getClass(), \"/mng-0095\");\n\n Verifier verifier = newVerifier(testDir.getAbsolutePath());\n verifier.setAutoclean(false);\n verifier.deleteDirectory(\"target\");\n verifier.deleteDirectory(\"subproject1/target\");\n verifier.deleteDirectory(\"subproject2/target\");\n verifier.deleteDirectory(\"subproject3/target\");\n verifier.addCliArgument(\"--fail-at-end\");\n verifier.setLogFileName(\"log-fae-mt1.txt\");\n verifier.addCliArgument(\"-Dmaven.threads.experimental=1\");\n try {\n verifier.addCliArgument(\"org.apache.maven.its.plugins:maven-it-plugin-touch:touch\");\n verifier.execute();\n verifier.verifyErrorFreeLog();\n } catch (VerificationException e) {\n // expected\n }\n\n verifier.verifyFilePresent(\"target/touch.txt\");\n verifier.verifyFileNotPresent(\"subproject1/target/touch.txt\");\n verifier.verifyFilePresent(\"subproject2/target/touch.txt\");\n verifier.verifyFileNotPresent(\"subproject3/target/touch.txt\");\n }",
"@Override\n public void apply(Project project) {\n project.getPluginManager().apply(\"groovy-base\");\n\n RewindFrameworkExtension rewind = project.getObjects().newInstance(RewindFrameworkExtension.class, project);\n project.getExtensions().add(\"rewind\", rewind);\n\n rewind.getTests().all(name -> {\n SourceSetContainer sourceSets = project.getConvention().getPlugin(JavaPluginConvention.class).getSourceSets();\n SourceSet sourceSet = sourceSets.create(name, it -> it.setRuntimeClasspath(it.getRuntimeClasspath().add(it.getOutput()).add(it.getCompileClasspath())));\n\n\n Test test = project.getTasks().create(sourceSet.getName(), Test.class, task -> {\n task.setGroup(LifecycleBasePlugin.VERIFICATION_GROUP);\n task.setTestClassesDirs(sourceSet.getOutput().getClassesDirs());\n task.setClasspath(sourceSet.getRuntimeClasspath());\n });\n\n project.getTasks().getByName(\"check\").dependsOn(test);\n\n Jar jar = project.getTasks().create(sourceSet.getName() + \"Jar\", ShadowJar.class, (ShadowJar task) -> {\n task.setClassifier(\"tests\");\n\n task.from(sourceSet.getOutput());\n task.setConfigurations(Arrays.asList(project.getConfigurations().getByName(sourceSet.getName() + \"RuntimeClasspath\")));\n task.dependencies((DependencyFilter filter) -> {\n for (Dependency d : project.getConfigurations().getByName(sourceSet.getName() + \"Implementation\").getDependencies()) {\n if (!(d instanceof ProjectDependency)) {\n filter.exclude(filter.dependency(d));\n }\n }\n });\n });\n\n RewindTest remoteTest = project.getTasks().create(sourceSet.getName() + \"Rewind\", RewindTest.class, (RewindTest task) -> {\n task.setGroup(LifecycleBasePlugin.VERIFICATION_GROUP);\n task.dependsOn(jar);\n task.getHostname().set(\"localhost\");\n task.getPort().set(5672);\n task.getTestJar().set(jar.getArchivePath());\n task.getBinaryResultsDirectory().set(project.getLayout().getBuildDirectory().dir(\"test-results/\" + sourceSet.getName() + \"Rewind/binary\"));\n task.getDependencies().set(\n project.provider(\n () -> project.getConfigurations().getByName(sourceSet.getName() + \"Implementation\").getDependencies().stream()\n .filter(((Dependency dependency) -> !(dependency instanceof ProjectDependency)))\n .collect(Collectors.toList())\n ));\n task.getRepositories().set(project.getRepositories());\n task.finalizedBy(sourceSet.getName() + \"RewindReport\");\n });\n\n project.getTasks().create(sourceSet.getName() + \"RewindReport\", TestReport.class, (TestReport task) -> {\n task.setTestResultDirs(Arrays.asList(remoteTest.getBinaryResultsDirectory().getAsFile().get()));\n task.setDestinationDir(new File(project.getBuildDir(), \"reports/tests/\" + sourceSet.getName() + \"Rewind\"));\n });\n });\n }",
"public void testFindFilesForLocation() {\n \t\t//should not find the workspace root\n \t\tIWorkspaceRoot root = getWorkspace().getRoot();\n \t\tIFile[] result = root.findFilesForLocation(root.getLocation());\n \t\tassertEquals(\"1.0\", 0, result.length);\n\t\t\n\t\tIProject project = root.getProject(\"p1\");\n\t\tIFile existing = project.getFile(\"file1\");\n\t\tensureExistsInWorkspace(existing, true);\n\t\t\n\t\t//existing file\n\t\tresult = root.findFilesForLocation(existing.getLocation());\n\t\tassertResources(\"2.0\", existing, result);\n\t\t\n\t\t//non-existing file\n\t\tIFile nonExisting = project.getFile(\"nonExisting\");\n\t\tresult = root.findFilesForLocation(nonExisting.getLocation());\n\t\tassertResources(\"2.1\", nonExisting, result);\n \n \t\t// TODO add more tests\n \t}",
"public void testExecPluginConstants() throws Exception {\n\t\tassertConstant( \"execRootURIs\", \"EXEC_ROOT_URIS\", ExecPlugin.class);\n\t}",
"public String findPackageForTest(String testClassName);",
"String getInstallRoot();",
"public PluginLocation[] getBuiltinPluginLocations()\r\n {\r\n java.lang.String conf = \"/net/sf/xpontus/plugins/plugins.txt\";\r\n\r\n InputStream is = null;\r\n LineIterator it = null;\r\n\r\n List<PluginLocation> locations = new ArrayList<PluginLocation>();\r\n\r\n try\r\n {\r\n is = getClass().getResourceAsStream(conf);\r\n it = IOUtils.lineIterator(is, \"UTF-8\");\r\n\r\n while (it.hasNext())\r\n {\r\n String line = it.nextLine();\r\n\r\n PluginLocation loc = getPluginLocation(line);\r\n locations.add(loc);\r\n }\r\n }\r\n catch (IOException ex)\r\n {\r\n LOG.error(ex.getMessage(), ex);\r\n }\r\n finally\r\n {\r\n if (is != null)\r\n {\r\n IOUtils.closeQuietly(is);\r\n }\r\n\r\n if (it != null)\r\n {\r\n LineIterator.closeQuietly(it);\r\n }\r\n }\r\n\r\n return (PluginLocation[]) locations.toArray(new PluginLocation[0]);\r\n }",
"@Test\n public void testitFailNeverSingleThread() throws Exception {\n File testDir = ResourceExtractor.simpleExtractResources(getClass(), \"/mng-0095\");\n\n Verifier verifier = newVerifier(testDir.getAbsolutePath());\n verifier.setAutoclean(false);\n verifier.deleteDirectory(\"target\");\n verifier.deleteDirectory(\"subproject1/target\");\n verifier.deleteDirectory(\"subproject2/target\");\n verifier.deleteDirectory(\"subproject3/target\");\n verifier.addCliArgument(\"--fail-never\");\n verifier.setLogFileName(\"log-fn-mt1.txt\");\n verifier.addCliArgument(\"-Dmaven.threads.experimental=1\");\n verifier.addCliArgument(\"org.apache.maven.its.plugins:maven-it-plugin-touch:touch\");\n verifier.execute();\n\n verifier.verifyFilePresent(\"target/touch.txt\");\n verifier.verifyFileNotPresent(\"subproject1/target/touch.txt\");\n verifier.verifyFilePresent(\"subproject2/target/touch.txt\");\n verifier.verifyFilePresent(\"subproject3/target/touch.txt\");\n }",
"public Path getPluginsDirectory()\n {\n return pluginDirectory;\n }",
"public String getSystemClassPath();",
"public static Path getPluginsDir() {\n\t\treturn Paths.get(prefs.get(Constants.PREF_USERSAVE_DIR, null)).resolve(PLUGINS_DIR);\n\t}",
"public static Test suite() {\n TestSuite suite = new TestSuite();\n Properties props = new Properties();\n int count = 1;\n String path;\n URL url;\n \n try {\n props.load(TestPluginTokenizer.class.getResourceAsStream(CONFIG_FILE));\n } catch (Exception ex) {\n throw new ExtRuntimeException(ex);\n }\n \n while ((path = props.getProperty(PROP_PATH + count)) != null) {\n if ((url = TestPluginTokenizer.class.getResource(path)) != null) {\n path = url.getFile();\n }\n suite.addTest(new TestPluginTokenizer(\"testContentsParsing\", path));\n suite.addTest(new TestPluginTokenizer(\"testContentsFormatting\", path));\n count++;\n }\n return suite;\n }",
"private String getConfigurationDirectory() throws UnsupportedEncodingException {\r\n\r\n String folder;\r\n if (ISphereJobLogExplorerPlugin.getDefault() != null) {\r\n // Executed, when started from a plug-in.\r\n folder = ISphereJobLogExplorerPlugin.getDefault().getStateLocation().toFile().getAbsolutePath() + File.separator + REPOSITORY_LOCATION\r\n + File.separator;\r\n FileHelper.ensureDirectory(folder);\r\n } else {\r\n // Executed, when started on a command line.\r\n URL url = getClass().getResource(DEFAULT_CONFIGURATION_FILE);\r\n if (url == null) {\r\n return null;\r\n }\r\n String resource = URLDecoder.decode(url.getFile(), \"utf-8\"); //$NON-NLS-1$\r\n folder = new File(resource).getParent() + File.separator;\r\n }\r\n return folder;\r\n }",
"Plugin getPlugin( );",
"@Override\n public String getSystemDir() {\n return null;\n }",
"@Nullable\n VirtualFile getModuleOutputDirectoryForTests(Module module);",
"public void testGetContainerForLocation() {\n \t\tIWorkspaceRoot root = getWorkspace().getRoot();\n \t\tassertEquals(\"1.0\", root, root.getContainerForLocation(root.getLocation()));\n \n \t}",
"public void testGetLibraryPath() {\n assertEquals(mb.getLibraryPath(), System\n .getProperty(\"java.library.path\"));\n }",
"public AnalyzerToolPlugin() throws Exception {\n }",
"@Test\n\tpublic void test_Directory_typeFinder_existImport() {\n\t\tString directory = _TestSuite.TYPE_FINDER_TEST_DIR.concat(\"existImport/\");\n\t\ttestOutput(directory);\n\t}",
"public static DepclipsePlugin getDefault() {\n\t return plugin;\n\t}",
"@Before\n public void setUp() throws Exception {\n classPathScanner =\n new ClassPathScanner(ClassPathScanner.getDefaultClasspaths(getInstrumentation()));\n }",
"@Before\n public void initTest() {\n tmpDir=new File(\"/tmp/luc/test\");\n //Setup System properties\n System.getProperties().remove(JNILoader.customPathKEY); //remove any \"old\" stuff\n System.setProperty(JNILoader.customPathKEY,tmpDir.getAbsolutePath());\n }",
"private void findCvsRoot()\n{\n File f = new File(for_project.getSourceDirectory());\n for ( ; ; ) {\n File fp = f.getParentFile();\n File fp1 = new File(fp,\"CVS\");\n if (!fp1.exists()) break;\n f = fp;\n }\n cvs_root = f;\n}",
"public static String getPluginsLocation() {\r\n return pluginsLocation.getValue();\r\n }",
"@Test\n public void testEkstazilifecycle() throws Exception {\n String testName = \"ekstazilifecycle\";\n EkstaziPaths.removeEkstaziDirectories(getClass(), testName);\n MavenCmd.Phase[] phases = new MavenCmd.Phase[] { MavenCmd.Phase.CLEAN, MavenCmd.Phase.EKSTAZIEKSTAZI };\n // First run.\n MavenCmd maven = new MavenCmd(getTestDir(testName), phases);\n maven.execute();\n Assert.assertTrue(maven.isSuccess());\n int actualNumOfTests = getNumOfTests(maven.getOutput());\n Assert.assertEquals(4, actualNumOfTests);\n // Second run.\n maven = new MavenCmd(getTestDir(testName), phases);\n maven.execute();\n Assert.assertTrue(maven.isSuccess());\n actualNumOfTests = getNumOfTests(maven.getOutput());\n Assert.assertEquals(0, actualNumOfTests);\n }",
"@Test\n public void testitFailNeverTwoThreads() throws Exception {\n File testDir = ResourceExtractor.simpleExtractResources(getClass(), \"/mng-0095\");\n\n Verifier verifier = newVerifier(testDir.getAbsolutePath());\n verifier.setAutoclean(false);\n verifier.deleteDirectory(\"target\");\n verifier.deleteDirectory(\"subproject1/target\");\n verifier.deleteDirectory(\"subproject2/target\");\n verifier.deleteDirectory(\"subproject3/target\");\n verifier.addCliArgument(\"--fail-never\");\n verifier.setLogFileName(\"log-fn-mt2.txt\");\n verifier.addCliArgument(\"-Dmaven.threads.experimental=2\");\n verifier.addCliArgument(\"org.apache.maven.its.plugins:maven-it-plugin-touch:touch\");\n verifier.execute();\n\n verifier.verifyFilePresent(\"target/touch.txt\");\n verifier.verifyFileNotPresent(\"subproject1/target/touch.txt\");\n verifier.verifyFilePresent(\"subproject2/target/touch.txt\");\n verifier.verifyFilePresent(\"subproject3/target/touch.txt\");\n }",
"private ProjectMgr getPmNameTrueLoadActualProject() {\n ProjectMgr pm = null;\n try {\n pm = new ProjectMgr(\"Example\", true);\n\n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (SAXException e) {\n e.printStackTrace();\n }\n\n IOException e;\n return pm;\n }",
"@Test\n public void testitFailAtEndTwoThreads() throws Exception {\n File testDir = ResourceExtractor.simpleExtractResources(getClass(), \"/mng-0095\");\n\n Verifier verifier = newVerifier(testDir.getAbsolutePath());\n verifier.setAutoclean(false);\n verifier.deleteDirectory(\"target\");\n verifier.deleteDirectory(\"subproject1/target\");\n verifier.deleteDirectory(\"subproject2/target\");\n verifier.deleteDirectory(\"subproject3/target\");\n verifier.addCliArgument(\"--fail-at-end\");\n verifier.setLogFileName(\"log-fae-mt2.txt\");\n verifier.addCliArgument(\"-Dmaven.threads.experimental=2\");\n try {\n verifier.addCliArgument(\"org.apache.maven.its.plugins:maven-it-plugin-touch:touch\");\n verifier.execute();\n verifier.verifyErrorFreeLog();\n } catch (VerificationException e) {\n // expected\n }\n\n verifier.verifyFilePresent(\"target/touch.txt\");\n verifier.verifyFileNotPresent(\"subproject1/target/touch.txt\");\n verifier.verifyFilePresent(\"subproject2/target/touch.txt\");\n verifier.verifyFileNotPresent(\"subproject3/target/touch.txt\");\n }",
"private void testJaasModuleFilePath(String workingDir) throws IOException {\n Configuration configuration = new Configuration();\n // set the string for CoreOptions.TMP_DIRS to mock the working directory.\n configuration.setString(CoreOptions.TMP_DIRS, workingDir);\n SecurityConfiguration sc = new SecurityConfiguration(configuration);\n JaasModule module = new JaasModule(sc);\n\n module.install();\n\n assertJaasFileLocateInRightDirectory(workingDir);\n }",
"@Test\n\tpublic void testGetBaseUrlDir() {\n\t\tString result = helper.getBaseUrl(\"http://www.bobbylough.com/test/\");\n\t\tassertEquals(\"http://www.bobbylough.com/test\", result);\n\t}",
"java.io.File getBaseDir();",
"Plugin getPlugin();",
"protected String getTestSuiteBootstrapSuitePath() {\n return null;\n }",
"protected static String createClassPathExcludingTestClasses()\n {\n String sSep;\n if (\"\\\\\".endsWith(File.separator))\n {\n sSep = \"\\\\\\\\\";\n }\n else\n {\n sSep = File.separator;\n }\n String sPattern = String.format(\".*%sio%starget%s.*\", sSep, sSep, sSep);\n return ClassPath.automatic().excluding(sPattern).toString();\n }",
"public void testChangeExternalFolder() throws CoreException {\n String externalLib = Util.getOutputDirectory() + File.separator + \"externalLib\";\n IPath projectPath = env.addProject(\"Project\");\n try {\n new File(externalLib).mkdirs();\n Util.compile(new String[] { \"p/X.java\", \"package p;\\n\" + \"public class X {\\n\" + \" public void foo() {\\n\" + \" }\\n\" + \"}\" }, new HashMap<String, String>(), externalLib);\n env.addExternalJars(projectPath, Util.getJavaClassLibs());\n env.addExternalFolders(projectPath, new String[] { externalLib });\n //$NON-NLS-1$\n IPath root = env.getPackageFragmentRootPath(projectPath, \"\");\n env.setOutputFolder(projectPath, \"\");\n IPath classY = env.addClass(root, \"q\", \"Y\", \"package q;\\n\" + \"public class Y {\\n\" + \" void bar(p.X x) {\\n\" + \" x.foo();\\n\" + \" }\\n\" + \"}\");\n fullBuild(projectPath);\n env.waitForAutoBuild();\n expectingNoProblems();\n String externalClassFile = externalLib + File.separator + \"p\" + File.separator + \"X.class\";\n long lastModified = new java.io.File(externalClassFile).lastModified();\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n }\n Util.compile(new String[] { \"p/X.java\", \"package p;\\n\" + \"public class X {\\n\" + \"}\" }, new HashMap<String, String>(), externalLib);\n // to be sure its different\n new java.io.File(externalClassFile).setLastModified(lastModified + 1000);\n env.getProject(projectPath).refreshLocal(IResource.DEPTH_INFINITE, null);\n env.waitForManualRefresh();\n incrementalBuild(projectPath);\n env.waitForAutoBuild();\n expectingProblemsFor(classY, \"Problem : The method foo() is undefined for the type X [ resource : </Project/q/Y.java> range : <54,57> category : <50> severity : <2>]\");\n } finally {\n new File(externalLib).delete();\n env.removeProject(projectPath);\n }\n }",
"@BeforeClass\n\tpublic static void setUp() throws Exception {\n\t\tFile projectFile = new File(\"src/test/resources/test.eap\");\n\n\t\tif (projectFile.exists()) {\n\t\t\tprojectFile.delete();\n\t\t}\n\n\t}",
"private static File getItestPropertiesForCurrentTestSetup() {\n return new File(\"src/itest/resources/itest-dockercompose.properties\");\n }",
"protected CompositeOption testBaseBundles() {\n\t\tCompositeOption apamCoreConfig = new DefaultCompositeOption(\n\t\t\t\tmavenBundle().groupId(\"fr.liglab.adele.common\")\n\t\t\t\t.artifactId(\"base.distribution.test\").versionAsInProject());\n\t\treturn apamCoreConfig;\n\t}",
"public static IvyPlugin getDefault() {\n return plugin;\n }",
"@Test\n public void should_find_one_test_unit_for_one_feature_available_in_classpath() throws Exception {\n List<TestUnit> testUnits = finder.findTestUnits(HideFromJUnit.Cornichon.class);\n\n // then\n assertThat(testUnits).hasSize(1);\n Description description = testUnits.get(0).getDescription();\n assertThat(description.getFirstTestClass()).contains(HideFromJUnit.Cornichon.class.getSimpleName());\n assertThat(description.getName()).containsIgnoringCase(\"Shopping\").containsIgnoringCase(\"change\");\n }",
"@Override\n public void setUp() throws Exception {\n super.setUp();\n buildFile = testProjectDir.newFile(\"build.gradle\");\n propertiesFile = testProjectDir.newFile(\"gradle.properties\");\n }",
"@Test\n public void testitMNG3380()\n throws Exception\n {\n File testDir = ResourceExtractor.simpleExtractResources( getClass(), \"/mng-3380\" );\n\n Verifier verifier = newVerifier( testDir.getAbsolutePath() );\n verifier.setAutoclean( false );\n verifier.deleteDirectory( \"target\" );\n verifier.deleteArtifacts( \"org.apache.maven.its.mng3380\" );\n verifier.filterFile( \"settings-template.xml\", \"settings.xml\", \"UTF-8\" );\n verifier.addCliArgument( \"--settings\" );\n verifier.addCliArgument( \"settings.xml\" );\n verifier.addCliArgument( \"validate\" );\n verifier.execute();\n verifier.verifyErrorFreeLog();\n\n List<String> artifacts = verifier.loadLines( \"target/artifacts.txt\", \"UTF-8\" );\n assertEquals( 4, artifacts.size() );\n assertEquals( \"org.apache.maven.its.mng3380:direct:jar:1\", artifacts.get( 0 ) );\n assertEquals( \"org.apache.maven.its.mng3380.new:transitive:jar:2\", artifacts.get( 1 ) );\n assertEquals( \"org.apache.maven.its.mng3380.other:a:jar:1\", artifacts.get( 2 ) );\n assertEquals( \"org.apache.maven.its.mng3380.other:b:jar:1\", artifacts.get( 3 ) );\n\n List<String> paths = verifier.loadLines( \"target/test.txt\", \"UTF-8\" );\n assertEquals( 6, paths.size() );\n assertEquals( \"direct-1.jar\", paths.get( 2 ) );\n assertEquals( \"transitive-2.jar\", paths.get( 3 ) );\n assertEquals( \"a-1.jar\", paths.get( 4 ) );\n assertEquals( \"b-1.jar\", paths.get( 5 ) );\n }",
"@Override\n protected String getNimbusHome() throws Exception {\n return this.determineSuitesPath() + \"/basic/home\";\n }",
"static boolean sourceInProjectDirectories(LocationContext context) {\n return context.getImportRoots().containsWorkspacePath(context.workspacePath);\n }",
"public void testGetRootClasses() throws TimeoutException, ExecutionException {\r\n String file1 = \"TravProjPsiFile1.java\";\r\n String file2 = \"TravProjPsiFile2.java\";\r\n String file3 = \"TravProjPsiFile3.java\";\r\n String file4 = \"TravProjPsiDir/TravProjPsiFile4.java\";\r\n String file5 = \"TravProjPsiDir/TravProjPsiFile5.java\";\r\n\r\n String[] fileNames = {file1, file2, file3, file4, file5};\r\n AnActionEvent e = createAnActionEventWithSeveralFiles(fileNames);\r\n Project project = getProject();\r\n\r\n Set<PsiClass> actual = TraverseProjectPsi.getRootClasses(project);\r\n List<String> expected = Arrays.asList(\"ClassInFile1\", \"ClassInFile2\", \"Class1InFile3\", \"Class2InFile3\");\r\n\r\n assertEquals(actual.size(), 4);\r\n for (PsiClass c : actual) {\r\n assertTrue(expected.contains(c.getName()));\r\n }\r\n }",
"public Runner() {\n this.config = ConfigUtils.getDefaultConfig();\n this.noSuchBaseDir = Files.createTempDir();\n this.noSuchBaseDir.deleteOnExit();\n }",
"public static String getBundlePath(String bundleEntry) throws IOException {\n return getBundlePath(PerforceTestsPlugin.getDefault().getBundle(),\n bundleEntry);\n }",
"public void setUp() {\n new File(TEST_FILE).getParentFile().mkdirs();\n }",
"public static String getCloudTestRootPath() {\n\n return getCLOUDTEST_HOME() + File.separator + rootFolderName\n + File.separator;\n }",
"protected File getAsinstalldir() throws ClassNotFoundException {\n\t\tif (asinstalldir == null) {\n\t\t\tString home = getProject().getProperty(\"asinstall.dir\");\n\t\t\tif (home != null) {\n asinstalldir = new File(home);\n\t\t\t}\n else {\n home = getProject().getProperty(\"sunone.home\");\n if (home != null)\n {\n final String msg = lsm.getString(\"DeprecatedProperty\", new Object[] {\"sunone.home\", \"asinstall.dir\"});\n log(msg, Project.MSG_WARN);\n asinstalldir = new File(home);\n }\n \n }\n\t\t}\n if (asinstalldir!=null) verifyAsinstalldir(asinstalldir);\n\t\treturn asinstalldir;\n\t}",
"public void testGetTargetDirectoryName() throws Exception {\n System.out.println(\"getTargetDirectoryName\");\n // server can be configured such that \n // the target directory name is not an empty value\n // String expResult = \"\";\n String result = instance.getTargetDirectoryName();\n assertNotNull(result);\n \n }",
"@Override\n\t@Ignore\n\t@Test\n\tpublic void testLauncherIsWhereExpected() throws Throwable {\n\t}",
"public static BuildAnalyzerPlugin getDefault() {\n\t\treturn plugin;\n\t}"
] |
[
"0.5615031",
"0.54688185",
"0.5459635",
"0.54061204",
"0.5401058",
"0.53947884",
"0.5366733",
"0.53072053",
"0.52842927",
"0.52392805",
"0.522886",
"0.51957077",
"0.5146819",
"0.5121615",
"0.5117626",
"0.51033026",
"0.50871116",
"0.5062396",
"0.5017759",
"0.49842894",
"0.495169",
"0.4931115",
"0.49145085",
"0.48995575",
"0.48915604",
"0.48837945",
"0.48748627",
"0.4867848",
"0.4859724",
"0.48552924",
"0.48547795",
"0.4843764",
"0.48360115",
"0.48282257",
"0.4785409",
"0.47853988",
"0.4773474",
"0.4758051",
"0.47543505",
"0.4741219",
"0.47373813",
"0.4736309",
"0.47211778",
"0.4711898",
"0.47012243",
"0.46983263",
"0.4696869",
"0.46968237",
"0.46957564",
"0.46769932",
"0.46737397",
"0.4662239",
"0.46589842",
"0.46556637",
"0.46513304",
"0.46511832",
"0.46458733",
"0.46416536",
"0.46159235",
"0.46041343",
"0.45996064",
"0.45978165",
"0.4592228",
"0.45875335",
"0.4564569",
"0.45575368",
"0.45504263",
"0.4540288",
"0.45394522",
"0.45393515",
"0.45317516",
"0.4529202",
"0.45196703",
"0.45064634",
"0.44995826",
"0.44870847",
"0.44864336",
"0.4482477",
"0.4470608",
"0.44504842",
"0.44482154",
"0.4447947",
"0.44475615",
"0.44458473",
"0.44441548",
"0.44440258",
"0.44366267",
"0.4436328",
"0.44333753",
"0.4424469",
"0.44244483",
"0.44233507",
"0.44126266",
"0.4412288",
"0.4400739",
"0.43955284",
"0.43944332",
"0.4394348",
"0.4391093",
"0.43875992"
] |
0.69179577
|
0
|
Convert the path to a path relative to the base, if possible.
|
static public IPath removePrefixFromPath(IPath rootPath, IPath cpath) {
if (matchingFirstSegments(rootPath, cpath) == rootPath.segmentCount()) {
IPath suffix = cpath.removeFirstSegments(rootPath.segmentCount());
return suffix.setDevice(null);
}
return null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static String composePath(URI base, String relativePath) {\n\t\tURI uri = composeURI(base, relativePath);\n\t\tif (uri.isAbsolute()) {\n\t\t\tFile file = new File(uri);\n\t\t\treturn file.toString();\n\t\t} else if (base != null) {\n\t\t\tFile file = new File(new File(base), uri.toString());\n\t\t\treturn file.toString();\n\t\t}\n\t\treturn relativePath;\n\t}",
"String getRealPath(String path);",
"public static String toRelativeURL(URL base, URL target) {\n\t\t// Precondition: If URL is a path to folder, then it must end with '/'\n\t\t// character.\n\t\tif ((base.getProtocol().equals(target.getProtocol()))\n\t\t\t\t|| (base.getHost().equals(target.getHost()))) { // changed this logic symbol\n\n\t\t\tString baseString = base.getFile();\n\t\t\tString targetString = target.getFile();\n\t\t\tString result = \"\";\n\n\t\t\t// remove filename from URL\n\t\t\tbaseString = baseString.substring(0,\n\t\t\t\t\tbaseString.lastIndexOf(\"/\") + 1);\n\n\t\t\t// remove filename from URL\n\t\t\ttargetString = targetString.substring(0,\n\t\t\t\t\ttargetString.lastIndexOf(\"/\") + 1);\n\n\t\t\tStringTokenizer baseTokens = new StringTokenizer(baseString, \"/\");// Maybe\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// this\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// causes\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// problems\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// under\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// windows\n\t\t\tStringTokenizer targetTokens = new StringTokenizer(targetString,\n\t\t\t\t\t\"/\");// Maybe this causes problems under windows\n\n\t\t\tString nextBaseToken = \"\", nextTargetToken = \"\";\n\n\t\t\t// Algorithm\n\n\t\t\twhile (baseTokens.hasMoreTokens() && targetTokens.hasMoreTokens()) {\n\t\t\t\tnextBaseToken = baseTokens.nextToken();\n\t\t\t\tnextTargetToken = targetTokens.nextToken();\n\t\t\t\tif (!(nextBaseToken.equals(nextTargetToken))) {\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tresult = result.concat(\"../\");\n\t\t\t\t\t\tif (!baseTokens.hasMoreTokens()) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnextBaseToken = baseTokens.nextToken();\n\t\t\t\t\t}\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tresult = result.concat(nextTargetToken + \"/\");\n\t\t\t\t\t\tif (!targetTokens.hasMoreTokens()) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnextTargetToken = targetTokens.nextToken();\n\t\t\t\t\t}\n\t\t\t\t\tString temp = target.getFile(); // to string\n\t\t\t\t\tresult = result.concat(temp.substring(\n\t\t\t\t\t\t\ttemp.lastIndexOf(\"/\") + 1, temp.length()));\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twhile (baseTokens.hasMoreTokens()) {\n\t\t\t\tresult = result.concat(\"../\");\n\t\t\t\tbaseTokens.nextToken();\n\t\t\t}\n\n\t\t\twhile (targetTokens.hasMoreTokens()) {\n\t\t\t\tnextTargetToken = targetTokens.nextToken();\n\t\t\t\tresult = result.concat(nextTargetToken + \"/\");\n\t\t\t}\n\n\t\t\tString temp = target.getFile(); // to string\n\t\t\tresult = result.concat(temp.substring(temp.lastIndexOf(\"/\") + 1,\n\t\t\t\t\ttemp.length()));\n\t\t\treturn result;\n\t\t}\n\t\treturn target.toString();\n\t}",
"private String relativize(String p) {\n return Paths.get(\"\").toAbsolutePath().relativize(Paths.get(p).toAbsolutePath()).toString();\n }",
"public FilePath relativize(FilePath fullPath) {\n String fullPathString = fullPath.path;\n if (fullPathString.startsWith(path + \"/\")) {\n return FilePath.of(fullPathString.substring(path.length() + 1));\n } else {\n // Not a relative path\n return fullPath;\n }\n }",
"protected String getRelativePath(Path path) {\n\t\treturn baseFolderUri.relativize(path.toUri()).toString();\n\t}",
"public static String getRelativePath(URI base, File file) {\n\t\treturn toString(getRelativeURI(base, file.toURI()));\n\t}",
"public static String getRelativePath(String basePath, String targetPath, String pathSeparator) {\n if (targetPath ==null)\n return \"\";\n \n if (basePath ==null)\n return targetPath;\n\n String[] base = basePath.split(Pattern.quote(pathSeparator));\n String[] target = targetPath.split(Pattern.quote(pathSeparator));\n\n // First get all the common elements. Store them as a string,\n // and also count how many of them there are.\n StringBuilder common = new StringBuilder();\n\n int commonIndex = 0;\n while (commonIndex < target.length && commonIndex < base.length && target[commonIndex].equals(base[commonIndex])) {\n common.append(target[commonIndex] + pathSeparator);\n commonIndex++;\n }\n\n if (commonIndex == 0) {\n // No single common path element. This most\n // likely indicates differing drive letters, like C: and D:.\n // These paths cannot be relativized.\n return targetPath;\n // throw new PathResolutionException(\"No common path element found for '\" + normalizedTargetPath + \"' and '\" + normalizedBasePath + \"'\");\n }\n\n // The number of directories we have to backtrack depends on whether the base is a file or a dir\n // For example, the relative path from\n //\n // /foo/bar/baz/gg/ff to /foo/bar/baz\n // \n // \"..\" if ff is a file\n // \"../..\" if ff is a directory\n //\n // The following is a heuristic to figure out if the base refers to a file or dir. It's not perfect, because\n // the resource referred to by this path may not actually exist, but it's the best I can do\n boolean baseIsFile = true;\n\n File baseResource = new File(basePath);\n\n if (baseResource.exists()) {\n baseIsFile = baseResource.isFile();\n\n } else if (basePath.endsWith(pathSeparator)) {\n baseIsFile = false;\n }\n\n StringBuilder relative = new StringBuilder();\n\n if (base.length != commonIndex) {\n int numDirsUp = baseIsFile ? base.length - commonIndex - 1 : base.length - commonIndex;\n\n for (int i = 0; i < numDirsUp; i++) {\n relative.append(\"..\" + pathSeparator);\n }\n }\n relative.append(safeSubstring(targetPath, common.length()));\n return relative.toString();\n }",
"public String resolvePath();",
"public FilePath resolve(String relPath) {\n if (path.isEmpty()) {\n return FilePath.of(relPath);\n }\n return FilePath.of(path + \"/\" + relPath);\n }",
"private String normalizePath(String path) {\n boolean absolute = path.startsWith(\"/\");\n int cwdl = cwd.length();\n \n // NOTE: This isn't just a fast path, it handles cases the code below doesn't\n if(!path.startsWith(\".\") && path.indexOf(\"./\") == -1 && path.indexOf(\"//\") == -1 && !path.endsWith(\".\"))\n return absolute ? path.substring(1) : cwdl == 0 ? path : path.length() == 0 ? cwd : cwd + \"/\" + path;\n \n char[] in = new char[path.length()+1];\n char[] out = new char[in.length + (absolute ? -1 : cwd.length())];\n path.getChars(0,path.length(),in,0);\n int inp=0, outp=0;\n \n if(absolute) {\n do { inp++; } while(in[inp] == '/');\n } else if(cwdl != 0) {\n cwd.getChars(0,cwdl,out,0);\n outp = cwdl;\n }\n\n while(in[inp] != 0) {\n if(inp != 0) {\n while(in[inp] != 0 && in[inp] != '/') { out[outp++] = in[inp++]; }\n if(in[inp] == '\\0') break;\n while(in[inp] == '/') inp++;\n }\n \n // Just read a /\n if(in[inp] == '\\0') break;\n if(in[inp] != '.') { out[outp++] = '/'; out[outp++] = in[inp++]; continue; }\n // Just read a /.\n if(in[inp+1] == '\\0' || in[inp+1] == '/') { inp++; continue; }\n if(in[inp+1] == '.' && (in[inp+2] == '\\0' || in[inp+2] == '/')) { // ..\n // Just read a /..{$,/}\n inp += 2;\n if(outp > 0) outp--;\n while(outp > 0 && out[outp] != '/') outp--;\n //System.err.println(\"After ..: \" + new String(out,0,outp));\n continue;\n }\n // Just read a /.[^.] or /..[^/$]\n inp++;\n out[outp++] = '/';\n out[outp++] = '.';\n }\n if(outp > 0 && out[outp-1] == '/') outp--;\n //System.err.println(\"normalize: \" + path + \" -> \" + new String(out,0,outp) + \" (cwd: \" + cwd + \")\");\n int outStart = out[0] == '/' ? 1 : 0;\n return new String(out,outStart,outp - outStart);\n }",
"public static URI getRelativeURI(URI base, URI uri) {\n\t\tif (base != null && uri != null && (uri.getScheme() == null || uri.getScheme().equals(base.getScheme()))) {\n\t\t\tStringTokenizer baseParts = tokenizeBase(base);\n\t\t\tStringTokenizer uriParts = new StringTokenizer(uri.getSchemeSpecificPart(), \"/\");\n\t\t\tStringBuffer relativePath = new StringBuffer();\n\t\t\tString part = null;\n\t\t\tboolean first = true;\n\t\t\tif (!baseParts.hasMoreTokens()) {\n\t\t\t\treturn uri;\n\t\t\t}\n\t\t\twhile (baseParts.hasMoreTokens() && uriParts.hasMoreTokens()) {\n\t\t\t\tString baseDir = baseParts.nextToken();\n\t\t\t\tpart = uriParts.nextToken();\n\t\t\t\tif ((baseDir.equals(part) && baseDir.contains(\":\")) && first) {\n\t\t\t\t\tbaseDir = baseParts.nextToken();\n\t\t\t\t\tpart = uriParts.nextToken();\n\t\t\t\t}\n\t\t\t\tif (!baseDir.equals(part)) { // || (baseDir.equals(part) && baseDir.contains(\":\"))) {\n\t\t\t\t\tif (first) {\n\t\t\t\t\t\treturn uri;\n\t\t\t\t\t}\n\t\t\t\t\trelativePath.append(\"../\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tpart = null;\n\t\t\t\tfirst = false;\n\t\t\t}\n\t\t\twhile (baseParts.hasMoreTokens()) {\n\t\t\t\trelativePath.append(\"../\");\n\t\t\t\tbaseParts.nextToken();\n\t\t\t}\n\t\t\tif (part != null) {\n\t\t\t\trelativePath.append(part);\n\t\t\t\tif (uriParts.hasMoreTokens()) {\n\t\t\t\t\trelativePath.append(\"/\");\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (uriParts.hasMoreTokens()) {\n\t\t\t\trelativePath.append(uriParts.nextToken());\n\t\t\t\tif (uriParts.hasMoreTokens()) {\n\t\t\t\t\trelativePath.append(\"/\");\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn createURI(relativePath.toString());\n\t\t}\n\t\treturn uri;\n\t}",
"@Test\n public void testRelativize_bothAbsolute() {\n assertRelativizedPathEquals(\"b/c\", pathService.parsePath(\"/a\"), \"/a/b/c\");\n assertRelativizedPathEquals(\"c/d\", pathService.parsePath(\"/a/b\"), \"/a/b/c/d\");\n }",
"private String getRelativePath(Path reference, Path child) {\n String output;\n String sval = child.toString(); \n final int index = sval.indexOf(reference.toString());\n if(index != -1) {\n output = sval.substring(index);\n }else{\n output = null;\n }\nLog.getInstance().log(Level.FINER, \"Path: {0}, relative: {1}\", this.getClass(), child, output); \n return output;\n }",
"public String getRelativePath();",
"public static final String normalizePath(String path) {\n\t\t// Normalize the slashes and add leading slash if necessary\n\t\tString normalized = path;\n\t\tif (normalized.indexOf('\\\\') >= 0) {\n\t\t\tnormalized = normalized.replace('\\\\', '/');\n\t\t}\n\n\t\tif (!normalized.startsWith(\"/\")) {\n\t\t\tnormalized = \"/\" + normalized;\n\t\t}\n\n\t\t// Resolve occurrences of \"//\" in the normalized path\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"//\");\n\t\t\tif (index < 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnormalized = normalized.substring(0, index)\n\t\t\t\t\t+ normalized.substring(index + 1);\n\t\t}\n\n\t\t// Resolve occurrences of \"%20\" in the normalized path\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"%20\");\n\t\t\tif (index < 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnormalized = normalized.substring(0, index) + \" \"\n\t\t\t\t\t+ normalized.substring(index + 3);\n\t\t}\n\n\t\t// Resolve occurrences of \"/./\" in the normalized path\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"/./\");\n\t\t\tif (index < 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnormalized = normalized.substring(0, index)\n\t\t\t\t\t+ normalized.substring(index + 2);\n\t\t}\n\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"/../\");\n\t\t\tif (index < 0)\n\t\t\t\tbreak;\n\t\t\tif (index == 0) {\n\t\t\t\treturn (null); // Trying to go outside our context\n\t\t\t}\n\t\t\tint index2 = normalized.lastIndexOf('/', index - 1);\n\t\t\tnormalized = normalized.substring(0, index2)\n\t\t\t\t\t+ normalized.substring(index + 3);\n\t\t}\n\n\t\t// Return the normalized path that we have completed\n\t\treturn (normalized);\n\t}",
"private void testPathRelative(String rootdir, String basefilename, String filename, String filename_check) {\r\n\t\tString result;\r\n\t\tString base_filename = rootdir + File.separator + basefilename;\r\n\t\tString base_dir = FileUtils.baseDir(base_filename);\r\n\t\tString file_name = rootdir + File.separator + filename;\r\n\t\t\r\n\t\tresult = FileUtils.pathRelativeFile(base_filename, file_name).replaceAll(\"\\\\\\\\\", \"/\");\r\n\t\tassertEquals(result, filename_check);\r\n\t\t\r\n\t\tresult = FileUtils.pathRelative(base_dir, file_name).replaceAll(\"\\\\\\\\\", \"/\");\r\n\t\tassertEquals(result, filename_check);\r\n\t}",
"public File fileRelativeToSource(File f) {\n if (f.isAbsolute()) {\n return f;\n } else {\n return new File(_basedir, f.getPath());\n }\n }",
"public static String getRelativePath(Path basePath,\n Path fullPath) {\n URI relative = URI.create(basePath.toString())\n .relativize(URI.create(fullPath.toString()));\n return relative.getPath();\n }",
"public static File relativeFile(File f) {\n if (f.isAbsolute()) {\n f = relativeFile(new File(\".\"), f);\n }\n return f;\n }",
"public static void main(String[] args) {\n Path currentDir = Paths.get(\".\");\n System.out.println(currentDir.toAbsolutePath());\n Path parentDir = Paths.get(\"..\");\n System.out.println(parentDir.toAbsolutePath());\n Path currentDir2 = Paths.get(\"d:\\\\data\\\\projects\\\\.\\\\a-project\");\n System.out.println(currentDir2);\n String path = \"d:\\\\data\\\\projects\\\\a-project\\\\..\\\\another-project\";\n Path parentDir2 = Paths.get(path);\n System.out.println(parentDir2);\n\n String originalPath =\n \"d:\\\\data\\\\projects\\\\a-project\\\\..\\\\another-project\";\n\n Path path1 = Paths.get(originalPath);\n System.out.println(\"path1 = \" + path1);\n\n Path path2 = path1.normalize();\n System.out.println(\"path2 = \" + path2);\n }",
"public static String normalizePath(String path)\r\n {\r\n StringBuilder result = new StringBuilder();\r\n char nextChar;\r\n for(int i = 0; i < path.length(); i++)\r\n {\r\n nextChar = path.charAt(i);\r\n if((nextChar == '\\\\'))\r\n {\r\n // Convert the Windows style path separator to the standard path separator\r\n result.append('/');\r\n }\r\n else\r\n {\r\n result.append(nextChar);\r\n }\r\n }\r\n \r\n return result.toString();\r\n }",
"public static String resolveRelativePath(String relPath, String absPath) {\r\n\t\t// if relative path is really absolute, then ignore absPath (eInnovation\r\n\t\t// change)\r\n\t\tif (relPath.startsWith(\"/\")) {\r\n\t\t\tabsPath = \"\";\r\n\t\t}\r\n\r\n\t\tString newAbsPath = absPath;\r\n\t\tString newRelPath = relPath;\r\n\t\tif (relPath.startsWith(\"$\")) {\r\n\t\t\treturn relPath;\r\n\t\t} else if (absPath.endsWith(\"/\")) {\r\n\t\t\tnewAbsPath = absPath.substring(0, absPath.length() - 1);\r\n\t\t} else {\r\n\t\t\t// absPath ends with a filename, remove it (eInnovation change)\r\n\t\t\tint lastSlashIndex = absPath.lastIndexOf('/');\r\n\t\t\tif (lastSlashIndex >= 0) {\r\n\t\t\t\tnewAbsPath = absPath.substring(0, lastSlashIndex);\r\n\t\t\t} else {\r\n\t\t\t\tnewAbsPath = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tint relPos = newRelPath.indexOf(\"../\");\r\n\t\twhile (relPos > -1) {\r\n\t\t\tnewRelPath = newRelPath.substring(relPos + 3);\r\n\t\t\tint lastSlashInAbsPath = newAbsPath.lastIndexOf(\"/\");\r\n\t\t\tif (lastSlashInAbsPath >= 0) {\r\n\t\t\t\tnewAbsPath = newAbsPath.substring(0,\r\n\t\t\t\t\t\tnewAbsPath.lastIndexOf(\"/\"));\r\n\t\t\t} else {\r\n\t\t\t\t// eInnovation change: fix potential exception\r\n\t\t\t\tnewAbsPath = \"\";\r\n\t\t\t}\r\n\t\t\trelPos = newRelPath.indexOf(\"../\");\r\n\t\t}\r\n\t\tString returnedPath;\r\n\t\tif (newRelPath.startsWith(\"/\")) {\r\n\t\t\treturnedPath = newAbsPath + newRelPath;\r\n\t\t} else {\r\n\t\t\treturnedPath = newAbsPath + \"/\" + newRelPath;\r\n\t\t}\r\n\r\n\t\t// remove any \".\" references to current directory (eInnovation change)\r\n\t\t// For example:\r\n\t\t// \"./junk\" becomes \"junk\"\r\n\t\t// \"/./junk\" becomes \"/junk\"\r\n\t\t// \"junk/.\" becomes \"junk\"\r\n\t\twhile (returnedPath.endsWith(\"/.\")) {\r\n\t\t\treturnedPath = returnedPath.substring(0, returnedPath.length() - 2);\r\n\t\t}\r\n\t\tdo {\r\n\t\t\tint dotSlashIndex = returnedPath.lastIndexOf(\"./\");\r\n\t\t\tif (dotSlashIndex < 0) {\r\n\t\t\t\tbreak;\r\n\t\t\t} else if (dotSlashIndex == 0\r\n\t\t\t\t\t|| returnedPath.charAt(dotSlashIndex - 1) != '.') {\r\n\t\t\t\tString firstSubstring;\r\n\t\t\t\tif (dotSlashIndex > 0) {\r\n\t\t\t\t\tfirstSubstring = returnedPath.substring(0, dotSlashIndex);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfirstSubstring = \"\";\r\n\t\t\t\t}\r\n\t\t\t\tString secondSubstring;\r\n\t\t\t\tif (dotSlashIndex + 2 < returnedPath.length()) {\r\n\t\t\t\t\tsecondSubstring = returnedPath.substring(dotSlashIndex + 2,\r\n\t\t\t\t\t\t\treturnedPath.length());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsecondSubstring = \"\";\r\n\t\t\t\t}\r\n\t\t\t\treturnedPath = firstSubstring + secondSubstring;\r\n\t\t\t}\r\n\t\t} while (true);\r\n\r\n\t\treturn returnedPath;\r\n\t}",
"private String normalizePath(String path)\n {\n return path.replaceAll(\"\\\\\\\\{1,}\", \"/\");\n }",
"private static String normalizeUrlPath(String baseUrl) {\n if (!baseUrl.matches(\".*/$\")) {\n return baseUrl + \"/\";\n }\n return baseUrl;\n }",
"public final static String normalizePath(String path) { \n return normalizePath( path, true);\n }",
"private static String toAbsPathStr(String relPath, FileSystem fs) {\n String retPath = \"\";\n Directory tmpDir = (Directory) fs.checkPath(relPath, \"directory\");\n while (!tmpDir.equals(fs.getRoot())) {\n retPath = \"/\" + tmpDir.getName() + retPath;\n tmpDir = tmpDir.getParentDirectory();\n }\n return retPath;\n }",
"public static void main(String... args) {\nPath path = Paths.get(\".\");\ntry {\n out.println(path.normalize());\n} catch(IOException e){out.println(e);}\n\ntry {\n out.println(path.toRealPath());\n} catch(IOException e){out.println(e);}\n\n}",
"String resolvePath(String root_url, Enumeration path)\n {\n if (! root_url.endsWith(URL_PATH_SEPARATOR))\n root_url = root_url+URL_PATH_SEPARATOR;\n\n StringBuffer sb = new StringBuffer();\n while (path.hasMoreElements())\n {\n sb.append(path.nextElement());\n sb.append(URL_PATH_SEPARATOR);\n }\n String p = sb.toString();\n if (p.startsWith(URL_PATH_SEPARATOR))\n p = p.substring(1);\n\n return root_url + p;\n }",
"public abstract String getFullPath(final String resourcePath);",
"public Path concat(Path relativePath) {\n\t\t\n\t\tPath result;\n\t\t\n\t\tif(relativePath.isAbsolute())\n\t\t{\n\t\t\tresult = null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tString resultPath = null;\n\t\t\t\n\t\t\tif(!this.path.endsWith(\"/\"))\n\t\t\t\tthis.path += \"/\";\n\t\t\t\n\t\t\tresultPath = this.path + relativePath.toString();\n\t\t\t\n\t\t\tresult = new Path(resultPath);\n\t\t}\n\t\treturn result;\n\t}",
"public abstract String getFullPath();",
"public String getAbsPath();",
"String getAbsolutePathWithinSlingHome(String relativePath);",
"public static String convertToRelativeUrl(String url) {\n\t\tif (url.startsWith(\"http\") || url.startsWith(\"https\")) {\n\t\t\ttry {\n\t\t\t\treturn new URL(url).getPath();\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\treturn url;\n\t\t\t}\n\t\t} else {\n\t\t\treturn url;\n\t\t}\n\t}",
"@Nullable\n public static String getRelativePath(String filepath) {\n return StringUtils.replace(StringUtils.substringAfter(filepath, StringUtils.substringBefore(\n filepath, \"\\\\\" + DEF_LOC_ARTIFACT)), \"\\\\\", \"/\");\n }",
"FsPath baseDir();",
"public static IPath createPossiblyRelativePath(String pathString) {\r\n\t\t// canonicalize slashes\r\n\t\tchar[] pathChars = pathString.toCharArray();\r\n\t\tint offset = 0;\r\n\t\tfor (int i = 0; i < pathChars.length; i++) {\r\n\t\t\tif (pathChars[i] == '\\\\')\r\n\t\t\t\tpathChars[i] = '/';\r\n\t\t}\r\n\t\t\r\n\t\t// The problem is, if \"./\" appears, then \"../\"'s after it are dropped,\r\n\t\t// so get rid of \"./\" early. The result will still be relative.\r\n\t\twhile (offset + 2 <= pathChars.length) { \r\n\t\t\tif (pathChars[offset] == '.' && pathChars[offset+1] == '/') {\r\n\t\t\t\toffset += 2;\r\n\t\t\t} else {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn PathUtils.createPath(new String(pathChars, offset, pathChars.length - offset));\r\n\t}",
"@Override\r\n public String getRelativeName(final FileName name) throws FileSystemException {\r\n final String path = name.getPath();\r\n\r\n // Calculate the common prefix\r\n final int basePathLen = getPath().length();\r\n final int pathLen = path.length();\r\n\r\n // Deal with root\r\n if (basePathLen == 1 && pathLen == 1) {\r\n return \".\";\r\n }\r\n if (basePathLen == 1) {\r\n return path.substring(1);\r\n }\r\n\r\n final int maxlen = Math.min(basePathLen, pathLen);\r\n int pos = 0;\r\n while (pos < maxlen && getPath().charAt(pos) == path.charAt(pos)) {\r\n pos++;\r\n }\r\n\r\n if (pos == basePathLen && pos == pathLen) {\r\n // Same names\r\n return \".\";\r\n }\r\n if (pos == basePathLen && pos < pathLen && path.charAt(pos) == SEPARATOR_CHAR) {\r\n // A descendent of the base path\r\n return path.substring(pos + 1);\r\n }\r\n\r\n // Strip the common prefix off the path\r\n final StringBuilder buffer = new StringBuilder();\r\n if (pathLen > 1 && (pos < pathLen || getPath().charAt(pos) != SEPARATOR_CHAR)) {\r\n // Not a direct ancestor, need to back up\r\n pos = getPath().lastIndexOf(SEPARATOR_CHAR, pos);\r\n buffer.append(path.substring(pos));\r\n }\r\n\r\n // Prepend a '../' for each element in the base path past the common\r\n // prefix\r\n buffer.insert(0, \"..\");\r\n pos = getPath().indexOf(SEPARATOR_CHAR, pos + 1);\r\n while (pos != -1) {\r\n buffer.insert(0, \"../\");\r\n pos = getPath().indexOf(SEPARATOR_CHAR, pos + 1);\r\n }\r\n\r\n return buffer.toString();\r\n }",
"public static String localizePath(String path)\r\n {\r\n StringBuilder result = new StringBuilder();\r\n char nextChar;\r\n for(int i = 0; i < path.length(); i++)\r\n {\r\n nextChar = path.charAt(i);\r\n if((nextChar == '/') || (nextChar == '\\\\'))\r\n {\r\n // Convert the URI separator to the system dependent path separator\r\n result.append(File.separatorChar);\r\n }\r\n else\r\n {\r\n result.append(nextChar);\r\n }\r\n }\r\n \r\n return result.toString();\r\n }",
"public String simplifyPath(String path) {\n List<String> stack = new LinkedList<>();\n for (String dir : path.split(\"/\")) {\n if (dir.equals(\"..\")) {\n if (stack.size() > 0) stack.remove(stack.size()-1);\n }\n else if (dir.length() > 0 && !dir.equals(\".\")) \n stack.add(dir);\n }\n StringBuilder res = new StringBuilder();\n for (String dir : stack) res.append('/' + dir);\n return res.length() == 0 ? \"/\" : res.toString();\n}",
"String getExternalPath(String path);",
"public Path tipPathtoRelPath(Path tipPath) {\n\t\tPath absPath = tipPathToAbsPath(tipPath);\n\t\tPath relPath = path.relativize(absPath);\n\t\treturn relPath;\n\t}",
"public String resolvePath(String path, boolean tryCurrentPath) {\n String realPath = \"\";\n if (tryCurrentPath) {\n realPath = tryExtensionsPath(path);\n // Can't find the file in the active directory.\n if (realPath.isEmpty()) {\n // try to open the file in the same directory as the current file.\n int lastForwardSlash = currentFile().lastIndexOf('/');\n int lastBackwardSlash = currentFile().lastIndexOf('\\\\');\n int lastSlash = Math.max(lastForwardSlash, lastBackwardSlash);\n if (lastSlash != -1) {\n realPath = currentFile().substring(0, lastSlash+1) + path;\n realPath = tryExtensionsPath(realPath);\n }\n }\n }\n \n // Try all search paths\n for (String searchPath: searchPaths) {\n if (!realPath.isEmpty())\n break;\n \n realPath = searchPath + path;\n realPath = tryExtensionsPath(realPath);\n }\n \n return realPath;\n }",
"static Path absolute(final Path path) {\n return path.toAbsolutePath().normalize();\n }",
"public static Path makeAbsolute( Path path, final Configuration conf) throws IOException\r\n\t{\r\n\t\tFileSystem fs = path.getFileSystem(conf);\r\n\t\tif (!path.isAbsolute()) {\r\n\t\t\tpath = new Path(fs.getWorkingDirectory(), path);\r\n\t\t}\r\n\t\t\r\n\t\tURI pathURI = path.makeQualified(fs).toUri();\r\n\t\treturn new Path(pathURI.getPath());\r\n\t\t\r\n\t}",
"private String makePathAbsolute(String pathString, IPath root) {\n IPath path = new Path(pathString.trim());\n if (!path.isEmpty() && !path.isAbsolute()) {\n IPath filePath = root.append(path);\n return filePath.toOSString();\n }\n return path.toOSString();\n }",
"public String simplifyPath2(String path) {\n\t\tString[] strs = path.split(\"/\");\n\t\tLinkedList<String> l = new LinkedList<String>();\n\n\t\tfor (String s : strs) {\n\t\t\tif (s.equals(\"..\")) {\n\t\t\t\tif (!l.isEmpty())\n\t\t\t\t\tl.removeLast();\n\t\t\t} else if (s.equals(\"\") || s.equals(\".\"))\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\tl.addLast(s);\n\n\t\t}\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (String s : l) {\n\t\t\tsb.append('/');\n\t\t\tsb.append(s);\n\t\t}\n\t\tif (l.size() == 0)\n\t\t\tsb.append('/');\n\t\treturn sb.toString();\n\t}",
"@Override\n\t\tpublic String getRealPath(String path) {\n\t\t\treturn null;\n\t\t}",
"public String getRelativePath (String path1, String path2) { \n if (path1 == null || path2 == null)\n return null;\n if (path1.equals(path2))\n return null;\n \n String lastDir = \"../\";\n String result = \"\";\n String[] allPath1 = path1.split(\"/\");\n String[] allPath2 = path2.split(\"/\");\n int i = 0;\n for ( i = 0; i < allPath1.length - 1; i++) {\n if (i >= allPath2.length - 1 || (!allPath1[i].equals(allPath2[i]))) {\n for (int j = i; j < allPath1.length - 1; j++) {\n result += lastDir;\n }\n break;\n }\n }\n for (int j = i ; j < allPath2.length; j++) {\n result += allPath2[j];\n if (j != allPath2.length - 1)\n result += \"/\";\n }\n return result;\n }",
"public String simplifyPath(String path) {\n String[] s = path.split(\"/\");\n StringBuilder sb = new StringBuilder(\"/\");\n for(String S:s){\n if(S.equals(\"\")||S.equals(\".\")){\n continue;\n }\n else if(S.equals(\"..\")){\n if(sb.charAt(sb.length()-1) != '/')\n {\n sb.deleteCharAt(sb.length()-1);\n }\n else{\n sb.delete(sb.length()-2, sb.length()-1);\n }\n\n }\n else{\n sb.append(S);\n sb.append('/');\n }\n }\n sb.deleteCharAt(sb.length()-1);\n return sb.toString();\n }",
"public String getPath(String from, String to, String pathAlgo);",
"public static File composeFile(URI base, String relativePath) {\n\t\tURI uri = composeURI(base, relativePath);\n\t\tif (uri.isAbsolute()) {\n\t\t\treturn new File(uri);\n\t\t} else if (base != null) {\n\t\t\treturn new File(new File(base), uri.toString());\n\t\t}\n\t\treturn null;\n\t}",
"public static String filenameRelativeTo(String filename, String relativeTo) {\n\t\tFile f = new File(filename);\n\t\tif (f.isAbsolute()) {\n\t\t\treturn filename;\n\t\t}\n\t\treturn getPath(relativeTo) + File.separator + filename;\n\t}",
"public FilePath resolve(FilePath relPath) {\n return resolve(relPath.toString());\n }",
"public static byte[] preparePath(final byte[] path) {\n String p = MetaData.normPath(string(path));\n if(Strings.endsWith(p, '/')) p = p.substring(0, p.length() - 1);\n return concat(SLASH, token(p));\n }",
"Path getBaseInputDir();",
"private static String translateToAssetPath(URI assetRefURI, URI docBaseURI) {\n String assetPath;\n\n if (isDocumentRelativeURI(assetRefURI)) {\n assetPath = docBaseURI.resolve(assetRefURI).normalize().getPath();\n\n // Note: A leading slash is prepended, when Path.getPath() does not return a String with\n // a leading slash. This could be the case if the document's base URI does not have a path portion.\n // The leading slash is required to adhere to the pattern of a normalized asset path.\n assetPath = assetPath.startsWith(\"/\") ? assetPath : \"/\" + assetPath;\n } else if (isProtocolRelativeURI(assetRefURI)) {\n assetPath = assetRefURI.normalize().getPath();\n } else if (isRootRelativeURI(assetRefURI)) {\n assetPath = assetRefURI.normalize().toString();\n } else if (assetRefURI.isAbsolute()) {\n assetPath = assetRefURI.normalize().getPath();\n } else {\n\n // Note: This could be an error as well, but in auto-build mode, there can\n // easy be a situation, that would raise and thus kill the process. One could\n // think about differentiating behavior based on one-time and auto-build mode\n // but there's not the necessary infrastructure (e.g. a generation context object)\n // for that right now.\n LOG.warn(String.format(\"Failed to discern URL type of '%s' when trying to map it to the corresponding \" +\n \"site asset path. Leaving it unprocessed.\", assetRefURI));\n assetPath = assetRefURI.toString();\n }\n\n return cutOptionalFingerprint(assetPath);\n }",
"public static File relativeFile(File root, File file) {\n if (root != null && file != null) {\n String absRoot = absoluteFile(root).getPath();\n String absFile = absoluteFile(file).getPath();\n if (absFile.startsWith(absRoot)) {\n String path = absFile.substring(absRoot.length());\n if (path.startsWith(File.separator)) {\n path = path.substring(1);\n }\n file = new File(path);\n }\n }\n return file;\n }",
"private String sanitizePath(String path)\r\n\t{\r\n\t\tif (path == null)\r\n\t\t\treturn \"\";\r\n\t\telse if (path.startsWith(\"/\"))\r\n\t\t\tpath = path.substring(1);\r\n\r\n\t\treturn path.endsWith(\"/\") ? path : path + \"/\";\r\n\t}",
"@Override\n\tpublic String getRealPath(String path) {\n\t\treturn null;\n\t}",
"protected StringBuilder convertPath(final String path) {\n\t\tStringBuilder pathBuffer = new StringBuilder(\"/app:company_home\");\n\t\tString[] parts = path.split(\"/\");\n\n\t\tString subpath;\n\n\t\tfor(String part : parts) {\n\t\t\tsubpath = part.trim();\n\n\t\t\tif(subpath.length() > 0) {\n\t\t\t\tpathBuffer.append(\"/cm:\").append(ISO9075.encode(subpath));\n\t\t\t}\n\t\t}\n\n\t\treturn pathBuffer;\n\t}",
"public String simplifyPath(String path) {\n String resString=\"\";\n String[] steRes=path.split(\"/|\\\\.\");\n if (steRes.length==0)\n return \"/\";\n return '/'+steRes[steRes.length-1];\n }",
"public Path concat(Path that) {\n if (isRelative()) {\n throw new IllegalArgumentException(\"Concat cannot be called on a relative path\");\n } else if (that.isAbsolute()) {\n throw new IllegalArgumentException(\"Specified path must be relative\");\n }\n\n // concat segments and return new path\n String[] segments = new String[this.segments.length + that.segments.length];\n System.arraycopy(this.segments, 0, segments, 0, this.segments.length);\n System.arraycopy(that.segments, 0, segments, this.segments.length, that.segments.length);\n return new Path(segments);\n }",
"public static String convertPath(String path) {\n String clean = path.replaceAll(\"[^a-zA-Z0-9.-\\\\/]\", \"_\");\n String convert = clean.replace(\"\\\\\", \"/\");\n return convert;\n }",
"String fullpath(String path) {\n return fullpath(path, null);\n }",
"private static String getParentPath(String path) {\n return path.contains(\".\") ? path.substring(0, path.lastIndexOf('.')) : \"\";\n }",
"protected static String getRelativePath(String srcPathURI,\n String destPathURI)\n throws IOException {\n String destPath = URLDecoder.decode(destPathURI.substring(5), ENC);\n String srcPath = URLDecoder.decode(srcPathURI.substring(5), ENC);\n\n return RelativePathUtil.getRelativeFileName(new File(destPath),\n new File(srcPath));\n }",
"public abstract String getPath();",
"public abstract String getPath();",
"public String toLocalPath() {\n\n String parentPath = parent.toLocalPath();\n return StringUtils.isBlank(parentPath)\n ? element.getElement()\n : new StringBuilder()\n .append(parentPath)\n .append('.')\n .append(element.getElement())\n .toString();\n }",
"public static String getWorkRelativePath(String baseURL, String testId) {\n StringBuilder sb = new StringBuilder(baseURL);\n\n // strip off extension\n stripExtn:\n for (int i = sb.length() - 1; i >= 0; i--) {\n switch (sb.charAt(i)) {\n case '.':\n sb.setLength(i);\n break stripExtn;\n case '/':\n break stripExtn;\n }\n }\n\n // add in uniquifying id if\n if (testId != null) {\n sb.append('_');\n sb.append(testId);\n }\n\n sb.append(EXTN);\n\n return sb.toString();\n }",
"private static String getFullPath(String pathname) {\n String fullPath = null;\n\n // make sure the path starts with a slash\n if (pathname.startsWith(\"/\"))\n fullPath = pathname;\n else\n fullPath = process.getDir() + \"/\" + pathname;\n return fullPath;\n }",
"public static String relativeUrlTo(\n @SuppressWarnings(\"unused\") ModuleVersionIdentifier from,\n ModuleVersionIdentifier to\n ) {\n StringBuilder path = new StringBuilder();\n path.append(\"../../\");\n path.append(to.getName());\n path.append(\"/\");\n path.append(to.getVersion());\n path.append(\"/\");\n path.append(to.getName());\n path.append(\"-\");\n path.append(to.getVersion());\n path.append(\".module\");\n return path.toString();\n }",
"public static String resolveImportURI(String baseURI, String importURI) {\r\n if (importURI == null) {\r\n throw new IllegalArgumentException(\"importURI is null.\");\r\n }\r\n // case 1: absolute URI of a remote file\r\n if (importURI.startsWith(HTTP_PREFIX) ||\r\n importURI.startsWith(HTTPS_PREFIX) ||\r\n importURI.startsWith(FTP_PREFIX)) {\r\n return importURI;\r\n }\r\n // case 2: absolute URI of a local file\r\n if (importURI.startsWith(FILE_PREFIX)) {\r\n return importURI.replaceFirst(FILE_PREFIX, \"\");\r\n }\r\n // case 3: absolute file path of a local file\r\n Path path = Paths.get(importURI);\r\n if (path.isAbsolute()) {\r\n return importURI;\r\n }\r\n if (baseURI == null) {\r\n throw new IllegalArgumentException(\"baseURI is null.\");\r\n }\r\n // case 4: relative URI of a remote file\r\n if (baseURI.startsWith(HTTP_PREFIX) ||\r\n baseURI.startsWith(HTTPS_PREFIX) ||\r\n baseURI.startsWith(FTP_PREFIX)) {\r\n return baseURI.endsWith(\"/\") ? baseURI + importURI : baseURI + \"/\" + importURI;\r\n }\r\n // case 5: relative URI of a local file\r\n if (baseURI.startsWith(FILE_PREFIX)) {\r\n baseURI = baseURI.replaceFirst(FILE_PREFIX, \"\");\r\n return baseURI.endsWith(\"/\") ? baseURI + importURI : baseURI + \"/\" + importURI;\r\n }\r\n // case 6: relative file path of a local file\r\n path = Paths.get(baseURI, importURI);\r\n return path.toString();\r\n }",
"@Override\r\n public String getPathDecoded() throws FileSystemException {\r\n if (decodedAbsPath == null) {\r\n decodedAbsPath = UriParser.decode(getPath());\r\n }\r\n\r\n return decodedAbsPath;\r\n }",
"public static String relativeFile(Iterable<? extends File> paths, String file){\n // find the matching path prefix\n File path = selectPath(paths, file);\n // and get the path of the file relative to the prefix\n File relFile = relativeFile(path, new File(file));\n return relFile.getPath();\n }",
"@Test\n public void testMakeAbsolute() {\n System.out.println(\"makeAbsolute\");\n Setting sr = Setting.factory(\"relative\", Setting.SETTING_TYPE.TPATH, Paths.get(\"relPath\"));\n Setting sh = Setting.factory(\"home\", Setting.SETTING_TYPE.THOMEDIR, Paths.get(\"c:\\\\\"));\n final Object sro = sr.getValue();\n assert (sro instanceof Path);\n final Object sho = sh.getValue();\n assert (sho instanceof Path);\n\n Path srp = (Path) sro;\n Path shp = (Path) sho;\n\n String srps = srp.toString();\n String shps = shp.toString();\n assertEquals(\"relPath\", srps);\n assertEquals(\"c:\\\\\", shps);\n\n Path expResult = Paths.get(\"c:\\\\\", \"relPath\");\n Path result = Setting.makeAbsolute(srp);\n assertEquals(expResult, result);\n\n }",
"private static ResolvedPath resolveAbsolutePath(\n EphemeralFsPath oiginalPath,\n EphemeralFsFileSystem fs,\n //the current directory\n //that parts will be resolved from\n INode current,\n //the parts of the path that must still be resolved\n //in reverse order\n List<EphemeralFsPath> remaining,\n //the steps we have already resolved\n List<ResolvedStep> steps,\n boolean noFollowLastSymlink) throws FileSystemException {\n \n if(remaining.isEmpty()) {\n return new ResolvedPath(fs, steps, current, null, !steps.isEmpty());\n }\n \n EphemeralFsPath currentPath = remaining.remove(remaining.size() -1);\n String fileName = currentPath.toString();\n\n if(fileName.equals(\".\")) {\n if(!current.isDir()) {\n throw new FileSystemException(oiginalPath + \": Not a directory\");\n }\n return resolveAbsolutePath(oiginalPath, fs, current, remaining, steps, noFollowLastSymlink);\n }\n else if(fileName.equals(\"..\")) {\n if(!current.isDir()) {\n throw new FileSystemException(oiginalPath + \": Not a directory\");\n }\n //we always have the root as the first step\n //\n if(steps.isEmpty()) {\n //we are trying to .. above the root\n //use root to explore\n //on linux, ls /../tmp will list /tmp\n return resolveAbsolutePath(oiginalPath, fs, fs.getRoot(), remaining, steps, noFollowLastSymlink);\n }\n ResolvedStep parent = steps.remove(steps.size() - 1);\n return resolveAbsolutePath(oiginalPath, fs, parent.directory, remaining, steps, noFollowLastSymlink);\n }\n \n if(current.isDir()) {\n DirectoryEntry entry = current.resolve(currentPath);\n if(entry != null) {\n if(entry.isSymbolicLink()) {\n if(noFollowLastSymlink && remaining.isEmpty()) {\n steps.add(new ResolvedStep(current, fileName));\n return new ResolvedPath(fs, steps, null, entry, true);\n }\n EphemeralFsPath linkTarget = entry.getSymbolicLink();\n EphemeralFsPath absolutePathSoFar = getPaths(fs, steps);\n List<EphemeralFsPath> newParts = absolutePathSoFar.resolve(linkTarget).splitPaths();\n for(int i = newParts.size() -1; i >= 0; i--) {\n remaining.add(newParts.get(i));\n }\n //we have a new absolute path to resolve\n //start over\n steps.clear();\n return resolveAbsolutePath(oiginalPath, fs, fs.getRoot(), remaining, steps, noFollowLastSymlink);\n }\n steps.add(new ResolvedStep(current, fileName));\n return resolveAbsolutePath(oiginalPath, fs, entry.getDestination(), remaining, steps, noFollowLastSymlink);\n }\n } \n\n //we can't resolve everything, stop\n //what we have resolved is still useful\n //for example resolving a non existing\n //path which we want to create\n steps.add(new ResolvedStep(current, fileName));\n if(remaining.isEmpty()) {\n return new ResolvedPath(fs, steps, null, null, true);\n } else {\n return new ResolvedPath(fs, steps, null, null, false); \n }\n \n }",
"private static Path getFilePath(Path testSuitePath, Path testCasePath, Path relativeFilePath) {\n Path filePath = testCasePath.resolve(relativeFilePath);\n if (Files.exists(filePath)) {\n return filePath;\n } else {\n // If not try to get from the test suite directory\n filePath = testSuitePath.resolve(relativeFilePath);\n }\n\n return Files.exists(filePath) ? filePath : null;\n }",
"public static String getBasepath() {\n\t\treturn basepath;\n\t}",
"public static String getBasepath() {\n\t\treturn basepath;\n\t}",
"public static String getPath(String file_path)\n {\n String file_separator = System.getProperty(\"file.separator\"); //Bug Id 81741\n if (file_path == null)\n return null;\n else if (file_path.substring(file_path.length() - 1).equals(file_separator))//Bug Id 81741, substitute file_separator to System.getProperty(\"file.separator\")\n return file_path;\n else\n {\n \t //Bug Id 81741, Start \n\t if (\"/\".equals(file_separator) && (file_path.indexOf(file_separator) == -1))\n\t {\n\t file_path = file_path.replaceAll(\"\\\\\\\\\", \"/\");\n\t return ((new File(file_path)).getParent()).replaceAll(\"/\",\"\\\\\\\\\");\n\t }\n\t //Bug Id 81741, End\n\t else\n return (new File(file_path)).getParent();\n }\n }",
"private void upPath() {\n if (!path.equals(FilePathUtil.getRootPath())) {\n onPathChanged(path, new File(path.getParent()));\n path = new File(path.getParent());\n load(null);\n }\n }",
"public static String unixPath(String path) {\n String convert = path.replace(\"\\\\\", \"/\");\n return convert;\n }",
"public static String toFilePath(String path) {\n return !isNullOrEmpty(path) && isDirectoryPath(path)\n ? path.substring(0, path.length() - 1)\n : path;\n }",
"@Override\r\n public String getPath() {\r\n if (VFS.isUriStyle()) {\r\n return absPath + getUriTrailer();\r\n }\r\n return absPath;\r\n }",
"public static String getAbsoluteFilePath(String relativePath) throws URISyntaxException {\n URL fileResource = BCompileUtil.class.getClassLoader().getResource(relativePath);\n String pathValue = \"\";\n if (null != fileResource) {\n Path path = Paths.get(fileResource.toURI());\n pathValue = path.toAbsolutePath().toString();\n }\n return pathValue;\n }",
"private String getParentPath(String path) {\n int slash = path.lastIndexOf('/');\n if (slash == -1) {\n return null;\n } else {\n if (slash == 0) {\n // return \"root\" if parent path is empty string\n return \"/\";\n } else {\n return path.substring(0, slash);\n }\n }\n }",
"@Test\n public void testMakeRelativeURL3() throws Exception {\n URL base = new URL(\"http://ahost.invalid/a/b/c\");\n assertEquals(new URL(\"http://host.invalid/e\"),ConversionUtils.makeRelativeURL(base ,\"http://host.invalid/e\"));\n assertEquals(new URL(\"https://host.invalid/e\"),ConversionUtils.makeRelativeURL(base ,\"https://host.invalid/e\"));\n assertEquals(new URL(\"http://host.invalid:8081/e\"),ConversionUtils.makeRelativeURL(base ,\"http://host.invalid:8081/e\"));\n assertEquals(new URL(\"https://host.invalid:8081/e\"),ConversionUtils.makeRelativeURL(base ,\"https://host.invalid:8081/e\"));\n }",
"private String toCompletePath(String fullRequest) {\n \n///Parse request for file path\nString requestLine[] = new String[] {\" \", \" \", \" \"};\n requestLine = fullRequest.split(\" \");\nString partialPath = requestLine[1];\n \n//If requested path is just \"/\" or \"\", don't return any path\n if(partialPath.length() <= 1) {\n noFileRequested = true;\n return null;\n }\n \nString completePath;\n//If using my Windows machine, the path is different than the school Linux machines\nif (Windows)\n completePath = \"C:/Users/Michelle/eclipse-workspace/P1\" + partialPath;\nelse\n completePath = \".\" + partialPath;\n \n return completePath;\n}",
"public Path tipPathToAbsPath(Path tipPath) {\n\t\tPath absPath = activeAbsPath().resolve(tipPath);\n\t\treturn absPath;\n\t}",
"public Path resolve(String part) {\n return Paths.get(part);\n }",
"final Path toParent(final Path path) throws QueryException {\n if(Files.isDirectory(path)) throw FILE_IS_DIR_X.get(info, path.toAbsolutePath());\n final Path parent = path.getParent();\n if(parent != null && !Files.exists(parent))\n throw FILE_NO_DIR_X.get(info, parent.toAbsolutePath());\n return path;\n }",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"private static String returnDiretorioPai(Path a){\n return a.getParent().toString();\n }",
"private static String normalize(String pathString) {\n if (pathString.contains(\"//\") || pathString.indexOf('\\\\') >= 0) {\n pathString = pathString.replaceAll(\"[\\\\\\\\/]+\", \"/\");\n }\n\n // Strip leading './'\n if (pathString.startsWith(\"./\")) {\n pathString = pathString.substring(2);\n }\n\n // Strip trailing '/.', '/'\n if (pathString.endsWith(\"/.\")) {\n pathString = pathString.substring(0, pathString.length() - 2);\n } else if (pathString.endsWith(\"/\")) {\n pathString = pathString.substring(0, pathString.length() - 1);\n }\n\n return pathString;\n }"
] |
[
"0.67940396",
"0.65103817",
"0.650093",
"0.649826",
"0.645293",
"0.6440863",
"0.6281546",
"0.6241292",
"0.6238296",
"0.61864024",
"0.61496425",
"0.61485773",
"0.611379",
"0.6045146",
"0.60195506",
"0.5998071",
"0.5993166",
"0.5913612",
"0.5909248",
"0.5887622",
"0.5854934",
"0.58349687",
"0.5819012",
"0.58131814",
"0.5812391",
"0.58114433",
"0.5806454",
"0.58044606",
"0.5751792",
"0.573737",
"0.5729686",
"0.57276225",
"0.569181",
"0.5691012",
"0.56769764",
"0.56708",
"0.56619626",
"0.564549",
"0.5630338",
"0.56280524",
"0.5620897",
"0.56035525",
"0.5584293",
"0.5573417",
"0.5570509",
"0.5542853",
"0.5539636",
"0.5537859",
"0.5522925",
"0.5521509",
"0.549038",
"0.5484293",
"0.54617083",
"0.54598075",
"0.5459671",
"0.5457062",
"0.54500216",
"0.54445726",
"0.54386085",
"0.5409579",
"0.5408128",
"0.5406009",
"0.5382941",
"0.5366134",
"0.5350926",
"0.5335683",
"0.5334895",
"0.5314754",
"0.5293424",
"0.5293424",
"0.5285919",
"0.5277631",
"0.5268177",
"0.52536654",
"0.52496576",
"0.5241231",
"0.52371",
"0.5234897",
"0.5234479",
"0.5233901",
"0.5230429",
"0.5230429",
"0.52209383",
"0.52188855",
"0.52101356",
"0.52046674",
"0.51918054",
"0.51917946",
"0.5189707",
"0.51831985",
"0.51718557",
"0.51508117",
"0.5147073",
"0.5136443",
"0.5130313",
"0.5130313",
"0.5130313",
"0.5130313",
"0.5130313",
"0.5117276",
"0.51052856"
] |
0.0
|
-1
|
Convert the path to a path in the workspace, if possible. Either the path comes in as a path pointing inside the workspace, or we can find a linked resource which aliases to the same location.
|
static public IPath convertToWorkspacePath(IPath cpath) {
return convertToWorkspacePath(cpath, false);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"static public IPath convertToWorkspaceLocation(IPath cpath) {\r\n if (!Platform.isRunning())\r\n return null;\r\n \r\n IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); \r\n IPath rootPath = root.getLocation();\r\n IPath newPath = convertToWorkspacePath(cpath);\r\n if (newPath == null)\r\n return null;\r\n \r\n // convert to full path\r\n return rootPath.append(newPath);\r\n }",
"public static IPath getCanonicalWorkspacePath(IPath wsPath) {\r\n\t\tIPath resolvedPath = new Path(\"\"); //$NON-NLS-1$\r\n\t\tIContainer container = ResourcesPlugin.getWorkspace().getRoot();\r\n\t\t// flag to consume the rest of the path without lookup\r\n\t\tboolean failed = false;\r\n\t\tfor (String segment : wsPath.segments()) {\r\n\t\t\tif (failed || container == null) {\r\n\t\t\t\tresolvedPath = resolvedPath.append(segment);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tIResource child = container.findMember(segment);\r\n\t\t\tif (child != null) {\r\n\t\t\t\t// found, so correct caps\r\n\t\t\t\tresolvedPath = resolvedPath.append(segment);\r\n\t\t\t\tif (child instanceof IContainer) {\r\n\t\t\t\t\tcontainer = (IContainer) child;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontainer = null;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// not found: manually search\r\n\t\t\t\tboolean found = false;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfor (IResource member : container.members()) {\r\n\t\t\t\t\t\tif (member.getName().equalsIgnoreCase(segment)) {\r\n\t\t\t\t\t\t\tresolvedPath = resolvedPath.append(member.getName());\r\n\t\t\t\t\t\t\tfound = true;\r\n\t\t\t\t\t\t\tif (member instanceof IContainer) {\r\n\t\t\t\t\t\t\t\tcontainer = (IContainer) member;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcontainer = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (CoreException e) {\r\n\t\t\t\t\t// just fail\r\n\t\t\t\t}\r\n\t\t\t\tif (!found) {\r\n\t\t\t\t\tfailed = true;\r\n\t\t\t\t\tresolvedPath = resolvedPath.append(segment);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resolvedPath;\r\n\t}",
"String getExternalPath(String path);",
"ResourceLocation resolve(String path);",
"public String resolvePath();",
"@SuppressWarnings(\"deprecation\")\r\n\tstatic public IPath convertToWorkspacePath(IPath cpath, boolean makeCanonical, boolean resolveLinks) {\r\n if (!Platform.isRunning() || cpath == null)\r\n return null;\r\n \r\n if (makeCanonical) {\r\n\t\t\ttry {\r\n\t\t\t\t// Since we have a filesystem path, try using the filesystem\r\n\t\t\t\t// and Java's smarter APIs to fix the caps early. \r\n\t\t\t\t// Watch out for the device being set incorrectly, though.\r\n\t\t\t\tString device = cpath.getDevice();\r\n\t\t\t\tcpath = new Path(cpath.toFile().getCanonicalPath()).setDevice(device);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// Something's wrong with the path; just use it as-is\r\n\t\t\t}\r\n }\r\n \r\n IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); \r\n IFile file = root.getFileForLocation(cpath);\r\n if (file != null) {\r\n \treturn file.getFullPath().setDevice(null);\r\n }\r\n \r\n if (resolveLinks) {\r\n\t // try to see if a linked resource points to this\r\n\t IFile[] files = root.findFilesForLocation(cpath);\r\n\t IPath newPath = null;\r\n\t if (files.length > 0)\r\n\t newPath = files[0].getFullPath().setDevice(null);\r\n\t else {\r\n\t IContainer[] folders = root.findContainersForLocation(cpath);\r\n\t if (folders.length > 0)\r\n\t newPath = folders[0].getFullPath().setDevice(null);\r\n\t }\r\n\t return newPath;\r\n }\r\n \r\n return null;\r\n }",
"Path getLocation();",
"String getAbsolutePathWithinSlingHome(String relativePath);",
"IPath getPath();",
"Path getPath();",
"private String getEclipsePathFromWindowsPath(String path) {\n StringBuilder sbPath = new StringBuilder();\n char [] chars = path.toCharArray();\n for (int i = 0; i < chars.length; i++) {\n char c = chars[i];\n if (c == '\\\\') {\n sbPath.append('/');\n } else {\n sbPath.append(c);\n }\n }\n path = sbPath.toString();\n return path;\n }",
"public String getRelPath () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public Path getPathToWorkspaceFolder() {\n return pathToWorkspaceFolder;\n }",
"public String getLocationPath();",
"private String retrieveWorkSpaceFileLoc(String fileName) {\n ArrayList<String> regResourceProjects = loadRegistryResourceProjects();\n boolean fileExists = false;\n IWorkspace workspace = ResourcesPlugin.getWorkspace();\n String folder = workspace.getRoot().getLocation().toFile().getPath().toString();\n String resourceFilePath = null;\n for (String regResourceProject : regResourceProjects) {\n resourceFilePath = folder + File.separator + regResourceProject + File.separator +\n fileName;\n File resourceFile = new File(resourceFilePath);\n if (resourceFile.exists()) {\n fileExists = true;\n break;\n }\n }\n if (!fileExists) {\n displayUserError(RESGISTRY_RESOURCE_RETRIVING_ERROR, NO_SUCH_RESOURCE_EXISTS);\n }\n return resourceFilePath;\n }",
"String getRealPath(String path);",
"public void testFindContainersForLocation() {\n \t\t//should find the workspace root\n \t\tIWorkspaceRoot root = getWorkspace().getRoot();\n \t\tIContainer[] result = root.findContainersForLocation(root.getLocation());\n \t\tassertEquals(\"1.0\", 1, result.length);\n \t\tassertEquals(\"1.1\", root, result[0]);\n \t\t\n \t\t//deep linked resource\n \t\tIProject p1 = root.getProject(\"p1\");\n \t\tIProject p2 = root.getProject(\"p2\");\n \t\tIFolder parent = p2.getFolder(\"parent\");\n \t\tIFolder link = parent.getFolder(\"link\");\n \t\tensureExistsInWorkspace(new IResource[] {p1, p2, parent}, true);\n \t\ttry {\n \t\t\tlink.createLink(p1.getLocationURI(), IResource.NONE, getMonitor());\n \t\t} catch (CoreException e) {\n \t\t\tfail(\"1.99\", e);\n \t\t}\n \t\tresult = root.findContainersForLocation(p1.getLocation());\n \t\tassertEquals(\"2.0\", 2, result.length);\n \t\tboolean p1Found = false, linkFound = false;\n \t\tfor (int i = 0; i < result.length; i++) {\n \t\t\tif (result[i].equals(p1))\n \t\t\t\tp1Found = true;\n \t\t\telse if (result[i].equals(link))\n \t\t\t\tlinkFound = true;\n \t\t}\n \t\tassertTrue(\"2.1\", p1Found);\n \t\tassertTrue(\"2.2\", linkFound);\n \t\t\n \t\t// TODO add more tests\n \t}",
"@Override\n\t\tpublic List<String> getPathTo(InJarResourceImpl resource) {\n\t\t\t// TODO FD4SG la ligne ci-dessous est vraiment bizarre (getChildren renvoie une liste de RepositoryFolder alors que resource est\n\t\t\t// une ressource\n\t\t\tif (!getRootFolder().getChildren().contains(resource)) {\n\t\t\t\tList<String> pathTo = new ArrayList<>();\n\t\t\t\tStringTokenizer string = new StringTokenizer(/*resource.getURI()*/resource.getEntry().getName(),\n\t\t\t\t\t\tCharacter.toString(ClasspathResourceLocatorImpl.PATH_SEP.toCharArray()[0]));\n\t\t\t\twhile (string.hasMoreTokens()) {\n\t\t\t\t\tString next = string.nextToken();\n\t\t\t\t\tif (string.hasMoreTokens()) {\n\t\t\t\t\t\tpathTo.add(next);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn pathTo;\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"private IPath findInitialPath(IPath initialPath) {\n \t\tIPath path = cwd;\n \t\t\n \t\tif (initialPath != null) {\n \t\t\ttry {\n \t\t\t\tIFileInfo info = fileMgr.getResource(initialPath, new NullProgressMonitor()).fetchInfo();\n \t\t\t\tif (info.exists()) {\n \t\t\t\t\tpath = initialPath;\n \t\t\t\t}\n \t\t\t} catch (IOException e) {\n \t\t\t}\n \t\t}\n \t\treturn path;\n \t}",
"CtPath getPath();",
"public static String getAbsoluteWorkspacePath(\r\n \t\t\tString resourcePathInWorkspace, VpePageContext pageContext) {\r\n \r\n \t\tString resolvedValue = resourcePathInWorkspace\r\n \t\t\t\t.replaceFirst(\r\n \t\t\t\t\t\t\"^\\\\s*(\\\\#|\\\\$)\\\\{facesContext.externalContext.requestContextPath\\\\}\", Constants.EMPTY); //$NON-NLS-1$\r\n \r\n\t\tIFile baseFile = null;\r\n \t\tif (pageContext.getVisualBuilder().getCurrentIncludeInfo() != null\r\n \t\t\t\t&&(pageContext.getVisualBuilder().getCurrentIncludeInfo().getStorage() instanceof IFile)) {\r\n\t\t\tbaseFile = (IFile) pageContext.getVisualBuilder().getCurrentIncludeInfo()\r\n \t\t\t\t\t.getStorage();\r\n \t\t}\r\n\t\tif (baseFile == null)\r\n \t\t\treturn resolvedValue;\r\n \r\n\t\tresolvedValue = ElServiceUtil.replaceEl(baseFile, resolvedValue);\r\n \r\n \t\tURI uri = null;\r\n \t\ttry {\r\n \t\t\turi = new URI(resolvedValue);\r\n \t\t} catch (URISyntaxException e) {\r\n \t\t}\r\n \r\n \t\tif ((uri != null)\r\n \t\t\t\t&& (uri.isAbsolute() || (new File(resolvedValue)).exists()))\r\n \t\t\treturn resolvedValue;\r\n \r\n\t\t\r\n\t\t\r\n\t\tIFile resolvedFile = FileUtil.getFile(resolvedValue, baseFile);\r\n\t\tif (resolvedFile != null ) {\r\n\t\t\treturn Constants.FILE_PREFIX + resolvedFile.getLocation().toPortableString();\r\n\t\t} else {\r\n\t\t\treturn resolvedValue;\r\n\t\t}\r\n \t}",
"static public IPath convertToWorkspacePath(IPath cpath, boolean makeCanonical) {\r\n \treturn convertToWorkspacePath(cpath, makeCanonical, true);\r\n }",
"public VRL resolvePathVRL(String path) throws VRLSyntaxException\n\t{\n\t\treturn getLocation().resolvePath(path); \n\t}",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"public String resolvePath(String path, boolean tryCurrentPath) {\n String realPath = \"\";\n if (tryCurrentPath) {\n realPath = tryExtensionsPath(path);\n // Can't find the file in the active directory.\n if (realPath.isEmpty()) {\n // try to open the file in the same directory as the current file.\n int lastForwardSlash = currentFile().lastIndexOf('/');\n int lastBackwardSlash = currentFile().lastIndexOf('\\\\');\n int lastSlash = Math.max(lastForwardSlash, lastBackwardSlash);\n if (lastSlash != -1) {\n realPath = currentFile().substring(0, lastSlash+1) + path;\n realPath = tryExtensionsPath(realPath);\n }\n }\n }\n \n // Try all search paths\n for (String searchPath: searchPaths) {\n if (!realPath.isEmpty())\n break;\n \n realPath = searchPath + path;\n realPath = tryExtensionsPath(realPath);\n }\n \n return realPath;\n }",
"public Location getNeighbouringPath(String enteredPath) {\r\n\t\t\treturn this.getPlayer().getCurrentLocation().getPaths().get(enteredPath);\r\n\t\t}",
"public Path getPath();",
"private FilePath ensureWorkspaceExists(WorkflowJob job) throws Exception {\n FilePath path = remote.getWorkspaceFor(job);\n path.mkdirs();\n return path;\n }",
"public ResourcePath() {\n //_externalFolder = \"file:///C:/Program%20Files/ESRI/GPT9/gpt/\";\n //_localFolder = \"gpt/\";\n}",
"public RMPath convertPathToShape(RMPath aPath, RMShape aShape)\n{\n RMTransform transform = getTransformToShape(aShape);\n if(!transform.isIdentity()) { aPath = aPath.clone(); aPath.transformBy(transform); }\n return aPath;\n}",
"private ProjectResolutionResult resolveProject(TaskSelector.SelectionContext context, Path path, BuildState targetBuild) {\n if (!path.isAbsolute() && path.segmentCount() == 1) {\n return new ProjectResolutionResult(targetBuild, targetBuild.getMutableModel().getDefaultProject().getOwner(), true, path.getName());\n }\n\n // <path>:name -> resolve <path> to a project + select task with matching name in that project\n // when <path> is absolute -> resolve <path> relative to root project\n // when <path> is relative -> resolve <path> relative to default project\n\n Path projectPath = path.getParent();\n ProjectState matchingProject;\n if (projectPath.isAbsolute()) {\n matchingProject = buildRegistry.getRootBuild().getProjects().getRootProject();\n } else {\n matchingProject = targetBuild.getMutableModel().getDefaultProject().getOwner();\n }\n while (projectPath.segmentCount() > 0) {\n String next = projectPath.segment(0);\n matchingProject = selectProject(context, matchingProject, next);\n if (projectPath.segmentCount() == 1) {\n projectPath = Path.ROOT;\n } else {\n projectPath = projectPath.removeFirstSegments(1);\n }\n }\n LOGGER.info(\"Task path '{}' matched project '{}'\", context.getOriginalPath(), matchingProject.getIdentityPath());\n return new ProjectResolutionResult(matchingProject.getOwner(), matchingProject, false, path.getName());\n }",
"public ObjectNode resolvePaths();",
"@Override\n\tpublic String resolve(EObject from) {\n\t\tString resolvename = super.resolve(from);\n\t\tif (null == resolvename) {\n\t\t\treturn resolvename;\n\t\t}\n\t\t\n\t\tif (!resolvename.endsWith(\".sats\") && !resolvename.endsWith(\".dats\")) {\n\t\t\t// todo didn't check whether path is valid\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// System.out.println(\"resolve: \" + resolvename);\n\t\t\n\t\tResource resource = from.eResource();\n\t\tURI importUri = URI.createURI(resolvename);\n\t\t// is already valid uri\n\t\tif (EcoreUtil2.isValidUri(resource, importUri)) {\n\t\t\treturn resolvename;\n\t\t}\n\n\t\t// get the name of the project\n\t\tString projname = null;\n\t\tString path = from.eResource().getURI().toString();\n\t\tfinal String platform = \"platform:/resource/\";\n\t\t// final String filesys = \"file://\";\n\t\tif (path.startsWith(platform)) {\n\t\t\tprojname = path.substring(platform.length()).split(\"/\")[0];\n\t\t\t// System.out.println(\"projname is \" + projname);\n\t\t resolvename = platform + projname + \"/\" + resolvename;\n\t\t}\n\n\t\treturn resolvename;\n\n\t}",
"FileSystem getRemoteWorkspace(final HudsonJob job) {\n return getFileSystemFromCache(workspaces, job.getName(), new Callable<RemoteFileSystem>() {\n @Override public RemoteFileSystem call() throws Exception {\n return builderConnector.getWorkspace(job);\n }\n });\n }",
"private Resource findDDRSource(Resource resource) {\n Resource answer = null;\n if (resource != null) {\n ValueMap properties = resource.getValueMap();\n String ddrTargetPath = properties.get(DDR_TARGET_PROPERTY_NAME, String.class);\n if (ddrTargetPath == null) {\n answer = findDDRSource(resource.getParent());\n } else {\n answer = resource;\n }\n }\n return answer;\n }",
"Path createPath();",
"private String relativize(String p) {\n return Paths.get(\"\").toAbsolutePath().relativize(Paths.get(p).toAbsolutePath()).toString();\n }",
"public FilePath resolve(String relPath) {\n if (path.isEmpty()) {\n return FilePath.of(relPath);\n }\n return FilePath.of(path + \"/\" + relPath);\n }",
"public String getPath()\n {\n StringBuilder buff = new StringBuilder();\n Resource r = this;\n while(r != null)\n {\n if(r.getId() != 1)\n {\n buff.insert(0, r.getName());\n }\n r = r.getParent();\n if(r != null || this.getId() == 1)\n {\n buff.insert(0, '/');\n }\n }\n return buff.toString();\n }",
"public String getPath(String from, String to, String pathAlgo);",
"public String toLocalPath() {\n\n String parentPath = parent.toLocalPath();\n return StringUtils.isBlank(parentPath)\n ? element.getElement()\n : new StringBuilder()\n .append(parentPath)\n .append('.')\n .append(element.getElement())\n .toString();\n }",
"public abstract String getFullPath(final String resourcePath);",
"java.lang.String getXpath();",
"public String getShortScmURIPath() {\n String scmUrl = getScmUrl() != null ? getScmUrl() : getExternalScmUrl();\n try {\n URI scmUri = new URI(scmUrl);\n return scmUri.getPath();\n } catch (URISyntaxException e) {\n throw new RuntimeException(\"Invalid scm URI: \" + getScmUrl(), e);\n }\n\n }",
"public String getPath();",
"public String getPath();",
"public String getPath();",
"public String getPath () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public RMPath convertPathFromShape(RMPath aPath, RMShape aShape)\n{\n RMTransform transform = getTransformFromShape(aShape);\n if(!transform.isIdentity()) { aPath = aPath.clone(); aPath.transformBy(transform); }\n return aPath;\n}",
"private String solutionPath(State goal)\n\t{\n\t\t// TODO \n\t\t\n\t\treturn null; \n\t}",
"public FilePath resolve(FilePath relPath) {\n return resolve(relPath.toString());\n }",
"public String readSymbolicLink( SrvSession sess, TreeConnection tree, String path)\n throws AccessDeniedException, FileNotFoundException {\n \n // Access the associated database interface to check if it supports symbolic links\n \n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n DBInterface dbInterface = dbCtx.getDBInterface();\n String symLink = null;\n \n if ( dbInterface.supportsFeature( DBInterface.FeatureSymLinks)) {\n \n // Get, or create, the file state for the existing file\n \n FileState fstate = getFileState( path, dbCtx, true);\n \n // Get the file id of the existing file\n \n int fid = fstate.getFileId();\n int dirId = -1;\n \n if ( fid == -1) {\n \n // Split the current path string and find the file id of the existing file/directory\n \n dirId = findParentDirectoryId( dbCtx, path, true);\n if ( dirId == -1)\n throw new FileNotFoundException( path);\n \n // Get the file/directory name\n \n String[] oldPaths = FileName.splitPath( path);\n String fname = oldPaths[1];\n \n // Get the file id\n \n fid = getFileId( path, fname, dirId, dbCtx);\n if ( fid == -1)\n throw new FileNotFoundException( path);\n \n // Update the file state\n \n fstate.setFileId(fid);\n }\n \n try {\n \n // Database interface supports symbolic links, read the symbolic link\n \n symLink = dbInterface.readSymbolicLink( dirId, fid);\n }\n catch ( DBException ex) {\n throw new FileNotFoundException ( path);\n }\n }\n \n // Return the symbolic link data\n \n return symLink;\n }",
"public Path resolve(String part) {\n return Paths.get(part);\n }",
"private static ResolvedPath resolveAbsolutePath(\n EphemeralFsPath oiginalPath,\n EphemeralFsFileSystem fs,\n //the current directory\n //that parts will be resolved from\n INode current,\n //the parts of the path that must still be resolved\n //in reverse order\n List<EphemeralFsPath> remaining,\n //the steps we have already resolved\n List<ResolvedStep> steps,\n boolean noFollowLastSymlink) throws FileSystemException {\n \n if(remaining.isEmpty()) {\n return new ResolvedPath(fs, steps, current, null, !steps.isEmpty());\n }\n \n EphemeralFsPath currentPath = remaining.remove(remaining.size() -1);\n String fileName = currentPath.toString();\n\n if(fileName.equals(\".\")) {\n if(!current.isDir()) {\n throw new FileSystemException(oiginalPath + \": Not a directory\");\n }\n return resolveAbsolutePath(oiginalPath, fs, current, remaining, steps, noFollowLastSymlink);\n }\n else if(fileName.equals(\"..\")) {\n if(!current.isDir()) {\n throw new FileSystemException(oiginalPath + \": Not a directory\");\n }\n //we always have the root as the first step\n //\n if(steps.isEmpty()) {\n //we are trying to .. above the root\n //use root to explore\n //on linux, ls /../tmp will list /tmp\n return resolveAbsolutePath(oiginalPath, fs, fs.getRoot(), remaining, steps, noFollowLastSymlink);\n }\n ResolvedStep parent = steps.remove(steps.size() - 1);\n return resolveAbsolutePath(oiginalPath, fs, parent.directory, remaining, steps, noFollowLastSymlink);\n }\n \n if(current.isDir()) {\n DirectoryEntry entry = current.resolve(currentPath);\n if(entry != null) {\n if(entry.isSymbolicLink()) {\n if(noFollowLastSymlink && remaining.isEmpty()) {\n steps.add(new ResolvedStep(current, fileName));\n return new ResolvedPath(fs, steps, null, entry, true);\n }\n EphemeralFsPath linkTarget = entry.getSymbolicLink();\n EphemeralFsPath absolutePathSoFar = getPaths(fs, steps);\n List<EphemeralFsPath> newParts = absolutePathSoFar.resolve(linkTarget).splitPaths();\n for(int i = newParts.size() -1; i >= 0; i--) {\n remaining.add(newParts.get(i));\n }\n //we have a new absolute path to resolve\n //start over\n steps.clear();\n return resolveAbsolutePath(oiginalPath, fs, fs.getRoot(), remaining, steps, noFollowLastSymlink);\n }\n steps.add(new ResolvedStep(current, fileName));\n return resolveAbsolutePath(oiginalPath, fs, entry.getDestination(), remaining, steps, noFollowLastSymlink);\n }\n } \n\n //we can't resolve everything, stop\n //what we have resolved is still useful\n //for example resolving a non existing\n //path which we want to create\n steps.add(new ResolvedStep(current, fileName));\n if(remaining.isEmpty()) {\n return new ResolvedPath(fs, steps, null, null, true);\n } else {\n return new ResolvedPath(fs, steps, null, null, false); \n }\n \n }",
"public abstract String getPath();",
"public abstract String getPath();",
"protected StringBuilder convertPath(final String path) {\n\t\tStringBuilder pathBuffer = new StringBuilder(\"/app:company_home\");\n\t\tString[] parts = path.split(\"/\");\n\n\t\tString subpath;\n\n\t\tfor(String part : parts) {\n\t\t\tsubpath = part.trim();\n\n\t\t\tif(subpath.length() > 0) {\n\t\t\t\tpathBuffer.append(\"/cm:\").append(ISO9075.encode(subpath));\n\t\t\t}\n\t\t}\n\n\t\treturn pathBuffer;\n\t}",
"public DevicePath getDevicePath(Device device);",
"@Nullable String getPath();",
"private boolean hasSymbolicLink(Path path)\n {\n if (Files.isSymbolicLink(path))\n {\n return true;\n }\n\n // Lets try each path segment\n Path base = path.getRoot();\n for (Path segment : path)\n {\n base = base.resolve(segment);\n if (Files.isSymbolicLink(base))\n {\n return true;\n }\n }\n\n return false;\n }",
"public static Path getPathForObject(Object obj) {\r\n ReportsDirectory constant = fromObject(obj);\r\n return getTargetPath().resolve(constant.folder);\r\n }",
"public static IResource convertFileToExistingResource(File file) {\r\n IPath path = new Path(file.getAbsolutePath());\r\n \r\n IPath wsPath = convertToWorkspacePath(path, true);\r\n if (wsPath != null)\r\n \t return ResourcesPlugin.getWorkspace().getRoot().findMember(wsPath);\r\n \r\n return null;\r\n }",
"public void\nsetPath(SoPath path)\n{\n // ref the input path\n if (path != null)\n path.ref();\n\n // nuke the old path\n if (pathOfInterest != null) {\n pathOfInterest.unref();\n pathOfInterest = null;\n }\n // and copy the new path\n if (path != null) {\n pathOfInterest = path.copy();\n pathOfInterest.ref();\n }\n\n // unref the input path\n if (path != null)\n path.unref();\n\n}",
"Path getHasPath();",
"@Override\n\t\tpublic String getRealPath(String path) {\n\t\t\treturn null;\n\t\t}",
"public String getPath()\r\n/* 26: */ {\r\n/* 27:57 */ return this.path;\r\n/* 28: */ }",
"private List<TreeNode> translatePath(List path, TreeNode node) {\n \n // TODO: Find the correct node given two identical paths. \n // For example suppose we have two paths Classes/String and Classes/String.\n // This method will always translate to the first path, regardless of the\n // actual path given.\n \n List tail = new ArrayList();\n tail.addAll(path);\n Object target = tail.remove(0);\n \n if (!node.toString().equals(target.toString())) {\n return null;\n }\n \n List<TreeNode> newPath = new ArrayList<TreeNode>();\n newPath.add(node);\n \n // no more nodes to find, just return this one\n if (tail.isEmpty()) return newPath;\n \n Enumeration e = node.children();\n while(e.hasMoreElements()) {\n TreeNode child = (TreeNode)e.nextElement();\n List nodes = translatePath(tail, child);\n if (nodes != null) {\n newPath.addAll(nodes);\n return newPath;\n }\n }\n \n // the path was not found under this subtree\n return null;\n }",
"private static String returnDiretorioPai(Path a){\n return a.getParent().toString();\n }",
"private URI getRefinedResourceURI(Resource resource, String newName) {\n\t\tURI newUri = resource.getURI();\n\t\tString fileExtension = newUri.fileExtension();\n\t\tnewUri = newUri.trimSegments(1).appendSegment(newName).appendFileExtension(fileExtension);\n\t\treturn newUri; \n\t}",
"public String getWorkspacePath() {\n\t\tString workspacePath = userSettingsService.getUserSettings().getWorkspacePath();\n\t\treturn getAbsoluteSubDirectoryPath(workspacePath);\n\t}",
"SinglePathwayResults getSinglePathway(SinglePathwaySpecifier sps) throws SearchServiceException;",
"public IPath getPath() {\n \t\tif (remotePath.equals(\"\")) {\n \t\t\treturn null;\n \t\t}\n \t\treturn new Path(remotePath);\n \t}",
"String resolvePath(String root_url, Enumeration path)\n {\n if (! root_url.endsWith(URL_PATH_SEPARATOR))\n root_url = root_url+URL_PATH_SEPARATOR;\n\n StringBuffer sb = new StringBuffer();\n while (path.hasMoreElements())\n {\n sb.append(path.nextElement());\n sb.append(URL_PATH_SEPARATOR);\n }\n String p = sb.toString();\n if (p.startsWith(URL_PATH_SEPARATOR))\n p = p.substring(1);\n\n return root_url + p;\n }",
"@Nonnull\n Path getPath();",
"public static String path(String link) {\n\n if(Strings.isNullOrEmpty(link)) {\n return \"\";\n }\n\n boolean relative = false;\n if(!link.contains(\"://\")) {\n if(!link.startsWith(\"/\")) {\n link = \"/\" + link;\n relative = true;\n }\n link = \"https://broken.com\" + link;\n }\n\n try {\n return !relative ? new URI(link).getPath() : new URI(link).getPath().substring(1);\n } catch(URISyntaxException ue) {\n return \"\";\n }\n }",
"private static String toAbsPathStr(String relPath, FileSystem fs) {\n String retPath = \"\";\n Directory tmpDir = (Directory) fs.checkPath(relPath, \"directory\");\n while (!tmpDir.equals(fs.getRoot())) {\n retPath = \"/\" + tmpDir.getName() + retPath;\n tmpDir = tmpDir.getParentDirectory();\n }\n return retPath;\n }",
"public Path tipPathtoRelPath(Path tipPath) {\n\t\tPath absPath = tipPathToAbsPath(tipPath);\n\t\tPath relPath = path.relativize(absPath);\n\t\treturn relPath;\n\t}",
"void resourceChanged(IPath workspacePath);",
"private String getOutputFolder(String path){\n\n //Remove the portion of the path which is prior to our repositories file path\n path = StringUtils.removeStart(FilenameUtils.getFullPath(path), REPOSITORY_LOCATION);\n //Return the path without leading and ending / and ensures the file path uses forward slashes instead of backslashes\n return StringUtils.strip(StringUtils.strip(path,\"/\"),\"\\\\\").replace(\"\\\\\", \"/\");\n }",
"protected Path resolveDfsPath(String attribute) throws SmartFrogException, RemoteException {\n String pathName = sfResolve(attribute, \"\", true);\n try {\n return new Path(pathName);\n } catch (IllegalArgumentException e) {\n throw new SmartFrogLifecycleException(\"Failed to create the path defined by attribute \" + attribute\n + \" with value \\\"\" + pathName\n + \"\\\" : \" + e,\n e,\n this);\n }\n }",
"String getRootAlias();",
"public String path(String path1, String path2);",
"public DefinitionPath getPath() {\n\t\treturn path;\n\t}",
"public Path createSourcespath()\n {\n if( m_sourcesPath == null )\n {\n m_sourcesPath = new Path();\n }\n Path path1 = m_sourcesPath;\n final Path path = new Path();\n path1.addPath( path );\n return path;\n }",
"public void gettingDesktopPath() {\n FileSystemView filesys = FileSystemView.getFileSystemView();\n File[] roots = filesys.getRoots();\n homePath = filesys.getHomeDirectory().toString();\n System.out.println(homePath);\n //checking if file existing on that location\n pathTo = homePath + \"\\\\SpisakReversa.xlsx\";\n }",
"public static IPath getComparablePath(IPath path) {\r\n\t\tif (path == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tif (HostOS.IS_WIN32) {\r\n\t\t\treturn new Path(path.toOSString().toLowerCase());\r\n\t\t}\r\n\t\t\r\n\t\treturn path;\r\n\t}",
"@Nonnull\n public Path getStoragePath(@Nonnull String original) {\n Path path = Paths.get(original);\n return this.getStoragePath(path);\n }",
"private void findPath()\n\t{\n\t\tpathfinding = true;\n\n\t\tmoves = Pathfinder.calcOneWayMove(city.getDrivingMap(), x, y, destX, destY);\n\t\tpathfinding = false;\n\t}",
"public Path getPath() {\r\n return getTargetPath().resolve(folder);\r\n }",
"public URL makeUrl(String path) throws IOException {\n path = Val.chkStr(path);\n URL url = null;\n \n if ((_localFolder.length() > 0) && (_externalFolder.length() > 0) &&\n path.startsWith(_localFolder)) {\n path = _externalFolder+path.substring(_localFolder.length());\n //LogUtil.getLogger().finer(\"Making URL for resource: \"+path);\n url = new URL(path); \n \n } else {\n //url = this.getClass().getClassLoader().getResource(path);\n //LogUtil.getLogger().finer(\"Making URL for resource: \"+path);\n url = Thread.currentThread().getContextClassLoader().getResource(path);\n }\n if (url == null) {\n throw new IOException(\"Unable to create resource URL for path: \"+path);\n }\n return url;\n}",
"public String getPath() \r\n\t{\r\n\t\tStringBuilder pathBuilder = new StringBuilder();\r\n\t\tfor(Cell c: path)\r\n\t\t\tpathBuilder.append(\" (\" + c.getRow() + ',' + c.getColumn() + ')');\r\n\t\t\r\n\t\treturn pathBuilder.toString();\r\n\t}",
"public String getPathName();",
"public String getPath()\n\t{\n\t\treturn letter + \":/\";\n\t}",
"public VariableBitString getPath(char symbol) {\r\n if(isEmpty()){\r\n throw new ArrayIndexOutOfBoundsException(\"No symbols in table\");\r\n }\r\n else {\r\n Node symbolNode = first;\r\n while(true) {\r\n if(symbolNode.symbol == symbol) {\r\n return symbolNode.path;\r\n }\r\n else if(symbolNode.next == null) {\r\n throw new NoSuchElementException(\"Symbol is not in the table\");\r\n }\r\n else {\r\n symbolNode = symbolNode.next;\r\n }\r\n }\r\n }\r\n }",
"public String getDirectoryPath() {\n return EXTERNAL_PATH;\n }",
"Path getPath(String name) throws IOException;"
] |
[
"0.6220461",
"0.57223266",
"0.5653778",
"0.56442434",
"0.56331414",
"0.5626344",
"0.5454092",
"0.5426457",
"0.5375721",
"0.5263233",
"0.52535",
"0.5249022",
"0.5242803",
"0.5237084",
"0.523676",
"0.5230905",
"0.52104133",
"0.5205881",
"0.5185584",
"0.5146203",
"0.51415145",
"0.51102",
"0.5100606",
"0.50367755",
"0.50367755",
"0.50367755",
"0.50367755",
"0.50367755",
"0.5019014",
"0.5004129",
"0.49981192",
"0.49901626",
"0.49710768",
"0.49393892",
"0.49360982",
"0.49341786",
"0.48986116",
"0.48964936",
"0.4895565",
"0.48930687",
"0.48877618",
"0.48773855",
"0.48727468",
"0.48658898",
"0.4859227",
"0.483143",
"0.48001534",
"0.47850537",
"0.47825754",
"0.47825754",
"0.47825754",
"0.47758934",
"0.4766506",
"0.47583517",
"0.4754009",
"0.47320276",
"0.47299188",
"0.4715856",
"0.4705194",
"0.4705194",
"0.46895236",
"0.46834075",
"0.46769255",
"0.46717632",
"0.46653536",
"0.46533084",
"0.46531925",
"0.46481708",
"0.46446657",
"0.4642626",
"0.46414837",
"0.4634506",
"0.4632964",
"0.46201107",
"0.45884413",
"0.45853195",
"0.4577775",
"0.45762795",
"0.45758885",
"0.45743552",
"0.4566272",
"0.45601404",
"0.455925",
"0.45414242",
"0.45393574",
"0.45252377",
"0.45228657",
"0.4518024",
"0.45177194",
"0.45119742",
"0.45100412",
"0.44999626",
"0.44990107",
"0.44955963",
"0.4492261",
"0.44897735",
"0.44890416",
"0.44826382",
"0.4481673",
"0.44788718"
] |
0.58434176
|
1
|
Convert the path to a path in the workspace, if possible. Either the path comes in as a path pointing inside the workspace, or we can find a linked resource which aliases to the same location.
|
static public IPath convertToWorkspacePath(IPath cpath, boolean makeCanonical) {
return convertToWorkspacePath(cpath, makeCanonical, true);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"static public IPath convertToWorkspaceLocation(IPath cpath) {\r\n if (!Platform.isRunning())\r\n return null;\r\n \r\n IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); \r\n IPath rootPath = root.getLocation();\r\n IPath newPath = convertToWorkspacePath(cpath);\r\n if (newPath == null)\r\n return null;\r\n \r\n // convert to full path\r\n return rootPath.append(newPath);\r\n }",
"static public IPath convertToWorkspacePath(IPath cpath) {\r\n \treturn convertToWorkspacePath(cpath, false);\r\n }",
"public static IPath getCanonicalWorkspacePath(IPath wsPath) {\r\n\t\tIPath resolvedPath = new Path(\"\"); //$NON-NLS-1$\r\n\t\tIContainer container = ResourcesPlugin.getWorkspace().getRoot();\r\n\t\t// flag to consume the rest of the path without lookup\r\n\t\tboolean failed = false;\r\n\t\tfor (String segment : wsPath.segments()) {\r\n\t\t\tif (failed || container == null) {\r\n\t\t\t\tresolvedPath = resolvedPath.append(segment);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tIResource child = container.findMember(segment);\r\n\t\t\tif (child != null) {\r\n\t\t\t\t// found, so correct caps\r\n\t\t\t\tresolvedPath = resolvedPath.append(segment);\r\n\t\t\t\tif (child instanceof IContainer) {\r\n\t\t\t\t\tcontainer = (IContainer) child;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontainer = null;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// not found: manually search\r\n\t\t\t\tboolean found = false;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfor (IResource member : container.members()) {\r\n\t\t\t\t\t\tif (member.getName().equalsIgnoreCase(segment)) {\r\n\t\t\t\t\t\t\tresolvedPath = resolvedPath.append(member.getName());\r\n\t\t\t\t\t\t\tfound = true;\r\n\t\t\t\t\t\t\tif (member instanceof IContainer) {\r\n\t\t\t\t\t\t\t\tcontainer = (IContainer) member;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcontainer = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (CoreException e) {\r\n\t\t\t\t\t// just fail\r\n\t\t\t\t}\r\n\t\t\t\tif (!found) {\r\n\t\t\t\t\tfailed = true;\r\n\t\t\t\t\tresolvedPath = resolvedPath.append(segment);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resolvedPath;\r\n\t}",
"String getExternalPath(String path);",
"ResourceLocation resolve(String path);",
"public String resolvePath();",
"@SuppressWarnings(\"deprecation\")\r\n\tstatic public IPath convertToWorkspacePath(IPath cpath, boolean makeCanonical, boolean resolveLinks) {\r\n if (!Platform.isRunning() || cpath == null)\r\n return null;\r\n \r\n if (makeCanonical) {\r\n\t\t\ttry {\r\n\t\t\t\t// Since we have a filesystem path, try using the filesystem\r\n\t\t\t\t// and Java's smarter APIs to fix the caps early. \r\n\t\t\t\t// Watch out for the device being set incorrectly, though.\r\n\t\t\t\tString device = cpath.getDevice();\r\n\t\t\t\tcpath = new Path(cpath.toFile().getCanonicalPath()).setDevice(device);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// Something's wrong with the path; just use it as-is\r\n\t\t\t}\r\n }\r\n \r\n IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); \r\n IFile file = root.getFileForLocation(cpath);\r\n if (file != null) {\r\n \treturn file.getFullPath().setDevice(null);\r\n }\r\n \r\n if (resolveLinks) {\r\n\t // try to see if a linked resource points to this\r\n\t IFile[] files = root.findFilesForLocation(cpath);\r\n\t IPath newPath = null;\r\n\t if (files.length > 0)\r\n\t newPath = files[0].getFullPath().setDevice(null);\r\n\t else {\r\n\t IContainer[] folders = root.findContainersForLocation(cpath);\r\n\t if (folders.length > 0)\r\n\t newPath = folders[0].getFullPath().setDevice(null);\r\n\t }\r\n\t return newPath;\r\n }\r\n \r\n return null;\r\n }",
"Path getLocation();",
"String getAbsolutePathWithinSlingHome(String relativePath);",
"IPath getPath();",
"Path getPath();",
"private String getEclipsePathFromWindowsPath(String path) {\n StringBuilder sbPath = new StringBuilder();\n char [] chars = path.toCharArray();\n for (int i = 0; i < chars.length; i++) {\n char c = chars[i];\n if (c == '\\\\') {\n sbPath.append('/');\n } else {\n sbPath.append(c);\n }\n }\n path = sbPath.toString();\n return path;\n }",
"public String getRelPath () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public Path getPathToWorkspaceFolder() {\n return pathToWorkspaceFolder;\n }",
"public String getLocationPath();",
"private String retrieveWorkSpaceFileLoc(String fileName) {\n ArrayList<String> regResourceProjects = loadRegistryResourceProjects();\n boolean fileExists = false;\n IWorkspace workspace = ResourcesPlugin.getWorkspace();\n String folder = workspace.getRoot().getLocation().toFile().getPath().toString();\n String resourceFilePath = null;\n for (String regResourceProject : regResourceProjects) {\n resourceFilePath = folder + File.separator + regResourceProject + File.separator +\n fileName;\n File resourceFile = new File(resourceFilePath);\n if (resourceFile.exists()) {\n fileExists = true;\n break;\n }\n }\n if (!fileExists) {\n displayUserError(RESGISTRY_RESOURCE_RETRIVING_ERROR, NO_SUCH_RESOURCE_EXISTS);\n }\n return resourceFilePath;\n }",
"String getRealPath(String path);",
"public void testFindContainersForLocation() {\n \t\t//should find the workspace root\n \t\tIWorkspaceRoot root = getWorkspace().getRoot();\n \t\tIContainer[] result = root.findContainersForLocation(root.getLocation());\n \t\tassertEquals(\"1.0\", 1, result.length);\n \t\tassertEquals(\"1.1\", root, result[0]);\n \t\t\n \t\t//deep linked resource\n \t\tIProject p1 = root.getProject(\"p1\");\n \t\tIProject p2 = root.getProject(\"p2\");\n \t\tIFolder parent = p2.getFolder(\"parent\");\n \t\tIFolder link = parent.getFolder(\"link\");\n \t\tensureExistsInWorkspace(new IResource[] {p1, p2, parent}, true);\n \t\ttry {\n \t\t\tlink.createLink(p1.getLocationURI(), IResource.NONE, getMonitor());\n \t\t} catch (CoreException e) {\n \t\t\tfail(\"1.99\", e);\n \t\t}\n \t\tresult = root.findContainersForLocation(p1.getLocation());\n \t\tassertEquals(\"2.0\", 2, result.length);\n \t\tboolean p1Found = false, linkFound = false;\n \t\tfor (int i = 0; i < result.length; i++) {\n \t\t\tif (result[i].equals(p1))\n \t\t\t\tp1Found = true;\n \t\t\telse if (result[i].equals(link))\n \t\t\t\tlinkFound = true;\n \t\t}\n \t\tassertTrue(\"2.1\", p1Found);\n \t\tassertTrue(\"2.2\", linkFound);\n \t\t\n \t\t// TODO add more tests\n \t}",
"@Override\n\t\tpublic List<String> getPathTo(InJarResourceImpl resource) {\n\t\t\t// TODO FD4SG la ligne ci-dessous est vraiment bizarre (getChildren renvoie une liste de RepositoryFolder alors que resource est\n\t\t\t// une ressource\n\t\t\tif (!getRootFolder().getChildren().contains(resource)) {\n\t\t\t\tList<String> pathTo = new ArrayList<>();\n\t\t\t\tStringTokenizer string = new StringTokenizer(/*resource.getURI()*/resource.getEntry().getName(),\n\t\t\t\t\t\tCharacter.toString(ClasspathResourceLocatorImpl.PATH_SEP.toCharArray()[0]));\n\t\t\t\twhile (string.hasMoreTokens()) {\n\t\t\t\t\tString next = string.nextToken();\n\t\t\t\t\tif (string.hasMoreTokens()) {\n\t\t\t\t\t\tpathTo.add(next);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn pathTo;\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"private IPath findInitialPath(IPath initialPath) {\n \t\tIPath path = cwd;\n \t\t\n \t\tif (initialPath != null) {\n \t\t\ttry {\n \t\t\t\tIFileInfo info = fileMgr.getResource(initialPath, new NullProgressMonitor()).fetchInfo();\n \t\t\t\tif (info.exists()) {\n \t\t\t\t\tpath = initialPath;\n \t\t\t\t}\n \t\t\t} catch (IOException e) {\n \t\t\t}\n \t\t}\n \t\treturn path;\n \t}",
"CtPath getPath();",
"public static String getAbsoluteWorkspacePath(\r\n \t\t\tString resourcePathInWorkspace, VpePageContext pageContext) {\r\n \r\n \t\tString resolvedValue = resourcePathInWorkspace\r\n \t\t\t\t.replaceFirst(\r\n \t\t\t\t\t\t\"^\\\\s*(\\\\#|\\\\$)\\\\{facesContext.externalContext.requestContextPath\\\\}\", Constants.EMPTY); //$NON-NLS-1$\r\n \r\n\t\tIFile baseFile = null;\r\n \t\tif (pageContext.getVisualBuilder().getCurrentIncludeInfo() != null\r\n \t\t\t\t&&(pageContext.getVisualBuilder().getCurrentIncludeInfo().getStorage() instanceof IFile)) {\r\n\t\t\tbaseFile = (IFile) pageContext.getVisualBuilder().getCurrentIncludeInfo()\r\n \t\t\t\t\t.getStorage();\r\n \t\t}\r\n\t\tif (baseFile == null)\r\n \t\t\treturn resolvedValue;\r\n \r\n\t\tresolvedValue = ElServiceUtil.replaceEl(baseFile, resolvedValue);\r\n \r\n \t\tURI uri = null;\r\n \t\ttry {\r\n \t\t\turi = new URI(resolvedValue);\r\n \t\t} catch (URISyntaxException e) {\r\n \t\t}\r\n \r\n \t\tif ((uri != null)\r\n \t\t\t\t&& (uri.isAbsolute() || (new File(resolvedValue)).exists()))\r\n \t\t\treturn resolvedValue;\r\n \r\n\t\t\r\n\t\t\r\n\t\tIFile resolvedFile = FileUtil.getFile(resolvedValue, baseFile);\r\n\t\tif (resolvedFile != null ) {\r\n\t\t\treturn Constants.FILE_PREFIX + resolvedFile.getLocation().toPortableString();\r\n\t\t} else {\r\n\t\t\treturn resolvedValue;\r\n\t\t}\r\n \t}",
"public VRL resolvePathVRL(String path) throws VRLSyntaxException\n\t{\n\t\treturn getLocation().resolvePath(path); \n\t}",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"public String resolvePath(String path, boolean tryCurrentPath) {\n String realPath = \"\";\n if (tryCurrentPath) {\n realPath = tryExtensionsPath(path);\n // Can't find the file in the active directory.\n if (realPath.isEmpty()) {\n // try to open the file in the same directory as the current file.\n int lastForwardSlash = currentFile().lastIndexOf('/');\n int lastBackwardSlash = currentFile().lastIndexOf('\\\\');\n int lastSlash = Math.max(lastForwardSlash, lastBackwardSlash);\n if (lastSlash != -1) {\n realPath = currentFile().substring(0, lastSlash+1) + path;\n realPath = tryExtensionsPath(realPath);\n }\n }\n }\n \n // Try all search paths\n for (String searchPath: searchPaths) {\n if (!realPath.isEmpty())\n break;\n \n realPath = searchPath + path;\n realPath = tryExtensionsPath(realPath);\n }\n \n return realPath;\n }",
"public Location getNeighbouringPath(String enteredPath) {\r\n\t\t\treturn this.getPlayer().getCurrentLocation().getPaths().get(enteredPath);\r\n\t\t}",
"public Path getPath();",
"private FilePath ensureWorkspaceExists(WorkflowJob job) throws Exception {\n FilePath path = remote.getWorkspaceFor(job);\n path.mkdirs();\n return path;\n }",
"public ResourcePath() {\n //_externalFolder = \"file:///C:/Program%20Files/ESRI/GPT9/gpt/\";\n //_localFolder = \"gpt/\";\n}",
"public RMPath convertPathToShape(RMPath aPath, RMShape aShape)\n{\n RMTransform transform = getTransformToShape(aShape);\n if(!transform.isIdentity()) { aPath = aPath.clone(); aPath.transformBy(transform); }\n return aPath;\n}",
"private ProjectResolutionResult resolveProject(TaskSelector.SelectionContext context, Path path, BuildState targetBuild) {\n if (!path.isAbsolute() && path.segmentCount() == 1) {\n return new ProjectResolutionResult(targetBuild, targetBuild.getMutableModel().getDefaultProject().getOwner(), true, path.getName());\n }\n\n // <path>:name -> resolve <path> to a project + select task with matching name in that project\n // when <path> is absolute -> resolve <path> relative to root project\n // when <path> is relative -> resolve <path> relative to default project\n\n Path projectPath = path.getParent();\n ProjectState matchingProject;\n if (projectPath.isAbsolute()) {\n matchingProject = buildRegistry.getRootBuild().getProjects().getRootProject();\n } else {\n matchingProject = targetBuild.getMutableModel().getDefaultProject().getOwner();\n }\n while (projectPath.segmentCount() > 0) {\n String next = projectPath.segment(0);\n matchingProject = selectProject(context, matchingProject, next);\n if (projectPath.segmentCount() == 1) {\n projectPath = Path.ROOT;\n } else {\n projectPath = projectPath.removeFirstSegments(1);\n }\n }\n LOGGER.info(\"Task path '{}' matched project '{}'\", context.getOriginalPath(), matchingProject.getIdentityPath());\n return new ProjectResolutionResult(matchingProject.getOwner(), matchingProject, false, path.getName());\n }",
"public ObjectNode resolvePaths();",
"private Resource findDDRSource(Resource resource) {\n Resource answer = null;\n if (resource != null) {\n ValueMap properties = resource.getValueMap();\n String ddrTargetPath = properties.get(DDR_TARGET_PROPERTY_NAME, String.class);\n if (ddrTargetPath == null) {\n answer = findDDRSource(resource.getParent());\n } else {\n answer = resource;\n }\n }\n return answer;\n }",
"FileSystem getRemoteWorkspace(final HudsonJob job) {\n return getFileSystemFromCache(workspaces, job.getName(), new Callable<RemoteFileSystem>() {\n @Override public RemoteFileSystem call() throws Exception {\n return builderConnector.getWorkspace(job);\n }\n });\n }",
"@Override\n\tpublic String resolve(EObject from) {\n\t\tString resolvename = super.resolve(from);\n\t\tif (null == resolvename) {\n\t\t\treturn resolvename;\n\t\t}\n\t\t\n\t\tif (!resolvename.endsWith(\".sats\") && !resolvename.endsWith(\".dats\")) {\n\t\t\t// todo didn't check whether path is valid\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// System.out.println(\"resolve: \" + resolvename);\n\t\t\n\t\tResource resource = from.eResource();\n\t\tURI importUri = URI.createURI(resolvename);\n\t\t// is already valid uri\n\t\tif (EcoreUtil2.isValidUri(resource, importUri)) {\n\t\t\treturn resolvename;\n\t\t}\n\n\t\t// get the name of the project\n\t\tString projname = null;\n\t\tString path = from.eResource().getURI().toString();\n\t\tfinal String platform = \"platform:/resource/\";\n\t\t// final String filesys = \"file://\";\n\t\tif (path.startsWith(platform)) {\n\t\t\tprojname = path.substring(platform.length()).split(\"/\")[0];\n\t\t\t// System.out.println(\"projname is \" + projname);\n\t\t resolvename = platform + projname + \"/\" + resolvename;\n\t\t}\n\n\t\treturn resolvename;\n\n\t}",
"Path createPath();",
"private String relativize(String p) {\n return Paths.get(\"\").toAbsolutePath().relativize(Paths.get(p).toAbsolutePath()).toString();\n }",
"public FilePath resolve(String relPath) {\n if (path.isEmpty()) {\n return FilePath.of(relPath);\n }\n return FilePath.of(path + \"/\" + relPath);\n }",
"public String getPath()\n {\n StringBuilder buff = new StringBuilder();\n Resource r = this;\n while(r != null)\n {\n if(r.getId() != 1)\n {\n buff.insert(0, r.getName());\n }\n r = r.getParent();\n if(r != null || this.getId() == 1)\n {\n buff.insert(0, '/');\n }\n }\n return buff.toString();\n }",
"public String getPath(String from, String to, String pathAlgo);",
"public String toLocalPath() {\n\n String parentPath = parent.toLocalPath();\n return StringUtils.isBlank(parentPath)\n ? element.getElement()\n : new StringBuilder()\n .append(parentPath)\n .append('.')\n .append(element.getElement())\n .toString();\n }",
"public abstract String getFullPath(final String resourcePath);",
"java.lang.String getXpath();",
"public String getShortScmURIPath() {\n String scmUrl = getScmUrl() != null ? getScmUrl() : getExternalScmUrl();\n try {\n URI scmUri = new URI(scmUrl);\n return scmUri.getPath();\n } catch (URISyntaxException e) {\n throw new RuntimeException(\"Invalid scm URI: \" + getScmUrl(), e);\n }\n\n }",
"public String getPath();",
"public String getPath();",
"public String getPath();",
"public String getPath () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public RMPath convertPathFromShape(RMPath aPath, RMShape aShape)\n{\n RMTransform transform = getTransformFromShape(aShape);\n if(!transform.isIdentity()) { aPath = aPath.clone(); aPath.transformBy(transform); }\n return aPath;\n}",
"private String solutionPath(State goal)\n\t{\n\t\t// TODO \n\t\t\n\t\treturn null; \n\t}",
"public FilePath resolve(FilePath relPath) {\n return resolve(relPath.toString());\n }",
"public String readSymbolicLink( SrvSession sess, TreeConnection tree, String path)\n throws AccessDeniedException, FileNotFoundException {\n \n // Access the associated database interface to check if it supports symbolic links\n \n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n DBInterface dbInterface = dbCtx.getDBInterface();\n String symLink = null;\n \n if ( dbInterface.supportsFeature( DBInterface.FeatureSymLinks)) {\n \n // Get, or create, the file state for the existing file\n \n FileState fstate = getFileState( path, dbCtx, true);\n \n // Get the file id of the existing file\n \n int fid = fstate.getFileId();\n int dirId = -1;\n \n if ( fid == -1) {\n \n // Split the current path string and find the file id of the existing file/directory\n \n dirId = findParentDirectoryId( dbCtx, path, true);\n if ( dirId == -1)\n throw new FileNotFoundException( path);\n \n // Get the file/directory name\n \n String[] oldPaths = FileName.splitPath( path);\n String fname = oldPaths[1];\n \n // Get the file id\n \n fid = getFileId( path, fname, dirId, dbCtx);\n if ( fid == -1)\n throw new FileNotFoundException( path);\n \n // Update the file state\n \n fstate.setFileId(fid);\n }\n \n try {\n \n // Database interface supports symbolic links, read the symbolic link\n \n symLink = dbInterface.readSymbolicLink( dirId, fid);\n }\n catch ( DBException ex) {\n throw new FileNotFoundException ( path);\n }\n }\n \n // Return the symbolic link data\n \n return symLink;\n }",
"public Path resolve(String part) {\n return Paths.get(part);\n }",
"private static ResolvedPath resolveAbsolutePath(\n EphemeralFsPath oiginalPath,\n EphemeralFsFileSystem fs,\n //the current directory\n //that parts will be resolved from\n INode current,\n //the parts of the path that must still be resolved\n //in reverse order\n List<EphemeralFsPath> remaining,\n //the steps we have already resolved\n List<ResolvedStep> steps,\n boolean noFollowLastSymlink) throws FileSystemException {\n \n if(remaining.isEmpty()) {\n return new ResolvedPath(fs, steps, current, null, !steps.isEmpty());\n }\n \n EphemeralFsPath currentPath = remaining.remove(remaining.size() -1);\n String fileName = currentPath.toString();\n\n if(fileName.equals(\".\")) {\n if(!current.isDir()) {\n throw new FileSystemException(oiginalPath + \": Not a directory\");\n }\n return resolveAbsolutePath(oiginalPath, fs, current, remaining, steps, noFollowLastSymlink);\n }\n else if(fileName.equals(\"..\")) {\n if(!current.isDir()) {\n throw new FileSystemException(oiginalPath + \": Not a directory\");\n }\n //we always have the root as the first step\n //\n if(steps.isEmpty()) {\n //we are trying to .. above the root\n //use root to explore\n //on linux, ls /../tmp will list /tmp\n return resolveAbsolutePath(oiginalPath, fs, fs.getRoot(), remaining, steps, noFollowLastSymlink);\n }\n ResolvedStep parent = steps.remove(steps.size() - 1);\n return resolveAbsolutePath(oiginalPath, fs, parent.directory, remaining, steps, noFollowLastSymlink);\n }\n \n if(current.isDir()) {\n DirectoryEntry entry = current.resolve(currentPath);\n if(entry != null) {\n if(entry.isSymbolicLink()) {\n if(noFollowLastSymlink && remaining.isEmpty()) {\n steps.add(new ResolvedStep(current, fileName));\n return new ResolvedPath(fs, steps, null, entry, true);\n }\n EphemeralFsPath linkTarget = entry.getSymbolicLink();\n EphemeralFsPath absolutePathSoFar = getPaths(fs, steps);\n List<EphemeralFsPath> newParts = absolutePathSoFar.resolve(linkTarget).splitPaths();\n for(int i = newParts.size() -1; i >= 0; i--) {\n remaining.add(newParts.get(i));\n }\n //we have a new absolute path to resolve\n //start over\n steps.clear();\n return resolveAbsolutePath(oiginalPath, fs, fs.getRoot(), remaining, steps, noFollowLastSymlink);\n }\n steps.add(new ResolvedStep(current, fileName));\n return resolveAbsolutePath(oiginalPath, fs, entry.getDestination(), remaining, steps, noFollowLastSymlink);\n }\n } \n\n //we can't resolve everything, stop\n //what we have resolved is still useful\n //for example resolving a non existing\n //path which we want to create\n steps.add(new ResolvedStep(current, fileName));\n if(remaining.isEmpty()) {\n return new ResolvedPath(fs, steps, null, null, true);\n } else {\n return new ResolvedPath(fs, steps, null, null, false); \n }\n \n }",
"public abstract String getPath();",
"public abstract String getPath();",
"protected StringBuilder convertPath(final String path) {\n\t\tStringBuilder pathBuffer = new StringBuilder(\"/app:company_home\");\n\t\tString[] parts = path.split(\"/\");\n\n\t\tString subpath;\n\n\t\tfor(String part : parts) {\n\t\t\tsubpath = part.trim();\n\n\t\t\tif(subpath.length() > 0) {\n\t\t\t\tpathBuffer.append(\"/cm:\").append(ISO9075.encode(subpath));\n\t\t\t}\n\t\t}\n\n\t\treturn pathBuffer;\n\t}",
"public DevicePath getDevicePath(Device device);",
"@Nullable String getPath();",
"private boolean hasSymbolicLink(Path path)\n {\n if (Files.isSymbolicLink(path))\n {\n return true;\n }\n\n // Lets try each path segment\n Path base = path.getRoot();\n for (Path segment : path)\n {\n base = base.resolve(segment);\n if (Files.isSymbolicLink(base))\n {\n return true;\n }\n }\n\n return false;\n }",
"public static Path getPathForObject(Object obj) {\r\n ReportsDirectory constant = fromObject(obj);\r\n return getTargetPath().resolve(constant.folder);\r\n }",
"public static IResource convertFileToExistingResource(File file) {\r\n IPath path = new Path(file.getAbsolutePath());\r\n \r\n IPath wsPath = convertToWorkspacePath(path, true);\r\n if (wsPath != null)\r\n \t return ResourcesPlugin.getWorkspace().getRoot().findMember(wsPath);\r\n \r\n return null;\r\n }",
"public void\nsetPath(SoPath path)\n{\n // ref the input path\n if (path != null)\n path.ref();\n\n // nuke the old path\n if (pathOfInterest != null) {\n pathOfInterest.unref();\n pathOfInterest = null;\n }\n // and copy the new path\n if (path != null) {\n pathOfInterest = path.copy();\n pathOfInterest.ref();\n }\n\n // unref the input path\n if (path != null)\n path.unref();\n\n}",
"Path getHasPath();",
"@Override\n\t\tpublic String getRealPath(String path) {\n\t\t\treturn null;\n\t\t}",
"public String getPath()\r\n/* 26: */ {\r\n/* 27:57 */ return this.path;\r\n/* 28: */ }",
"private List<TreeNode> translatePath(List path, TreeNode node) {\n \n // TODO: Find the correct node given two identical paths. \n // For example suppose we have two paths Classes/String and Classes/String.\n // This method will always translate to the first path, regardless of the\n // actual path given.\n \n List tail = new ArrayList();\n tail.addAll(path);\n Object target = tail.remove(0);\n \n if (!node.toString().equals(target.toString())) {\n return null;\n }\n \n List<TreeNode> newPath = new ArrayList<TreeNode>();\n newPath.add(node);\n \n // no more nodes to find, just return this one\n if (tail.isEmpty()) return newPath;\n \n Enumeration e = node.children();\n while(e.hasMoreElements()) {\n TreeNode child = (TreeNode)e.nextElement();\n List nodes = translatePath(tail, child);\n if (nodes != null) {\n newPath.addAll(nodes);\n return newPath;\n }\n }\n \n // the path was not found under this subtree\n return null;\n }",
"private static String returnDiretorioPai(Path a){\n return a.getParent().toString();\n }",
"private URI getRefinedResourceURI(Resource resource, String newName) {\n\t\tURI newUri = resource.getURI();\n\t\tString fileExtension = newUri.fileExtension();\n\t\tnewUri = newUri.trimSegments(1).appendSegment(newName).appendFileExtension(fileExtension);\n\t\treturn newUri; \n\t}",
"public String getWorkspacePath() {\n\t\tString workspacePath = userSettingsService.getUserSettings().getWorkspacePath();\n\t\treturn getAbsoluteSubDirectoryPath(workspacePath);\n\t}",
"SinglePathwayResults getSinglePathway(SinglePathwaySpecifier sps) throws SearchServiceException;",
"public IPath getPath() {\n \t\tif (remotePath.equals(\"\")) {\n \t\t\treturn null;\n \t\t}\n \t\treturn new Path(remotePath);\n \t}",
"@Nonnull\n Path getPath();",
"String resolvePath(String root_url, Enumeration path)\n {\n if (! root_url.endsWith(URL_PATH_SEPARATOR))\n root_url = root_url+URL_PATH_SEPARATOR;\n\n StringBuffer sb = new StringBuffer();\n while (path.hasMoreElements())\n {\n sb.append(path.nextElement());\n sb.append(URL_PATH_SEPARATOR);\n }\n String p = sb.toString();\n if (p.startsWith(URL_PATH_SEPARATOR))\n p = p.substring(1);\n\n return root_url + p;\n }",
"private static String toAbsPathStr(String relPath, FileSystem fs) {\n String retPath = \"\";\n Directory tmpDir = (Directory) fs.checkPath(relPath, \"directory\");\n while (!tmpDir.equals(fs.getRoot())) {\n retPath = \"/\" + tmpDir.getName() + retPath;\n tmpDir = tmpDir.getParentDirectory();\n }\n return retPath;\n }",
"public static String path(String link) {\n\n if(Strings.isNullOrEmpty(link)) {\n return \"\";\n }\n\n boolean relative = false;\n if(!link.contains(\"://\")) {\n if(!link.startsWith(\"/\")) {\n link = \"/\" + link;\n relative = true;\n }\n link = \"https://broken.com\" + link;\n }\n\n try {\n return !relative ? new URI(link).getPath() : new URI(link).getPath().substring(1);\n } catch(URISyntaxException ue) {\n return \"\";\n }\n }",
"public Path tipPathtoRelPath(Path tipPath) {\n\t\tPath absPath = tipPathToAbsPath(tipPath);\n\t\tPath relPath = path.relativize(absPath);\n\t\treturn relPath;\n\t}",
"void resourceChanged(IPath workspacePath);",
"private String getOutputFolder(String path){\n\n //Remove the portion of the path which is prior to our repositories file path\n path = StringUtils.removeStart(FilenameUtils.getFullPath(path), REPOSITORY_LOCATION);\n //Return the path without leading and ending / and ensures the file path uses forward slashes instead of backslashes\n return StringUtils.strip(StringUtils.strip(path,\"/\"),\"\\\\\").replace(\"\\\\\", \"/\");\n }",
"protected Path resolveDfsPath(String attribute) throws SmartFrogException, RemoteException {\n String pathName = sfResolve(attribute, \"\", true);\n try {\n return new Path(pathName);\n } catch (IllegalArgumentException e) {\n throw new SmartFrogLifecycleException(\"Failed to create the path defined by attribute \" + attribute\n + \" with value \\\"\" + pathName\n + \"\\\" : \" + e,\n e,\n this);\n }\n }",
"String getRootAlias();",
"public String path(String path1, String path2);",
"public DefinitionPath getPath() {\n\t\treturn path;\n\t}",
"public void gettingDesktopPath() {\n FileSystemView filesys = FileSystemView.getFileSystemView();\n File[] roots = filesys.getRoots();\n homePath = filesys.getHomeDirectory().toString();\n System.out.println(homePath);\n //checking if file existing on that location\n pathTo = homePath + \"\\\\SpisakReversa.xlsx\";\n }",
"public Path createSourcespath()\n {\n if( m_sourcesPath == null )\n {\n m_sourcesPath = new Path();\n }\n Path path1 = m_sourcesPath;\n final Path path = new Path();\n path1.addPath( path );\n return path;\n }",
"public static IPath getComparablePath(IPath path) {\r\n\t\tif (path == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tif (HostOS.IS_WIN32) {\r\n\t\t\treturn new Path(path.toOSString().toLowerCase());\r\n\t\t}\r\n\t\t\r\n\t\treturn path;\r\n\t}",
"@Nonnull\n public Path getStoragePath(@Nonnull String original) {\n Path path = Paths.get(original);\n return this.getStoragePath(path);\n }",
"public Path getPath() {\r\n return getTargetPath().resolve(folder);\r\n }",
"private void findPath()\n\t{\n\t\tpathfinding = true;\n\n\t\tmoves = Pathfinder.calcOneWayMove(city.getDrivingMap(), x, y, destX, destY);\n\t\tpathfinding = false;\n\t}",
"public URL makeUrl(String path) throws IOException {\n path = Val.chkStr(path);\n URL url = null;\n \n if ((_localFolder.length() > 0) && (_externalFolder.length() > 0) &&\n path.startsWith(_localFolder)) {\n path = _externalFolder+path.substring(_localFolder.length());\n //LogUtil.getLogger().finer(\"Making URL for resource: \"+path);\n url = new URL(path); \n \n } else {\n //url = this.getClass().getClassLoader().getResource(path);\n //LogUtil.getLogger().finer(\"Making URL for resource: \"+path);\n url = Thread.currentThread().getContextClassLoader().getResource(path);\n }\n if (url == null) {\n throw new IOException(\"Unable to create resource URL for path: \"+path);\n }\n return url;\n}",
"public String getPath() \r\n\t{\r\n\t\tStringBuilder pathBuilder = new StringBuilder();\r\n\t\tfor(Cell c: path)\r\n\t\t\tpathBuilder.append(\" (\" + c.getRow() + ',' + c.getColumn() + ')');\r\n\t\t\r\n\t\treturn pathBuilder.toString();\r\n\t}",
"public String getPathName();",
"public String getPath()\n\t{\n\t\treturn letter + \":/\";\n\t}",
"public VariableBitString getPath(char symbol) {\r\n if(isEmpty()){\r\n throw new ArrayIndexOutOfBoundsException(\"No symbols in table\");\r\n }\r\n else {\r\n Node symbolNode = first;\r\n while(true) {\r\n if(symbolNode.symbol == symbol) {\r\n return symbolNode.path;\r\n }\r\n else if(symbolNode.next == null) {\r\n throw new NoSuchElementException(\"Symbol is not in the table\");\r\n }\r\n else {\r\n symbolNode = symbolNode.next;\r\n }\r\n }\r\n }\r\n }",
"public String getDirectoryPath() {\n return EXTERNAL_PATH;\n }",
"Path getPath(String name) throws IOException;"
] |
[
"0.62219846",
"0.58443296",
"0.5723528",
"0.56537104",
"0.56447566",
"0.563427",
"0.56252414",
"0.54558986",
"0.54276377",
"0.5377956",
"0.52653456",
"0.5253758",
"0.5250187",
"0.52449673",
"0.5238877",
"0.52382815",
"0.5231728",
"0.52105784",
"0.520833",
"0.5187905",
"0.5147905",
"0.5143242",
"0.5098866",
"0.5038794",
"0.5038794",
"0.5038794",
"0.5038794",
"0.5038794",
"0.5018986",
"0.5005806",
"0.50003195",
"0.49909547",
"0.49718234",
"0.49395496",
"0.4935039",
"0.4933821",
"0.48977435",
"0.4897387",
"0.48970452",
"0.48949766",
"0.48895484",
"0.48786485",
"0.4875335",
"0.4867221",
"0.48614678",
"0.48337033",
"0.480185",
"0.47855398",
"0.47845685",
"0.47845685",
"0.47845685",
"0.47770864",
"0.47664154",
"0.47607002",
"0.47551054",
"0.4730615",
"0.47305468",
"0.47161412",
"0.47071546",
"0.47071546",
"0.46888384",
"0.4684142",
"0.46792668",
"0.4669954",
"0.466754",
"0.46551147",
"0.46516228",
"0.46502358",
"0.46448824",
"0.46444106",
"0.46406993",
"0.46361083",
"0.46345899",
"0.46218547",
"0.45871842",
"0.4586811",
"0.457905",
"0.45757276",
"0.45756304",
"0.45755613",
"0.4567517",
"0.45609322",
"0.45605037",
"0.4541675",
"0.45393842",
"0.45254323",
"0.45245042",
"0.45192957",
"0.4518547",
"0.45123687",
"0.45111018",
"0.4500974",
"0.45008197",
"0.44951022",
"0.4494818",
"0.44914135",
"0.4491275",
"0.44839263",
"0.44827327",
"0.44802004"
] |
0.5110133
|
22
|
Convert the path to a path in the workspace, if possible. Either the path comes in as a path pointing inside the workspace, or we can find a linked resource which aliases to the same location.
|
@SuppressWarnings("deprecation")
static public IPath convertToWorkspacePath(IPath cpath, boolean makeCanonical, boolean resolveLinks) {
if (!Platform.isRunning() || cpath == null)
return null;
if (makeCanonical) {
try {
// Since we have a filesystem path, try using the filesystem
// and Java's smarter APIs to fix the caps early.
// Watch out for the device being set incorrectly, though.
String device = cpath.getDevice();
cpath = new Path(cpath.toFile().getCanonicalPath()).setDevice(device);
} catch (IOException e) {
// Something's wrong with the path; just use it as-is
}
}
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IFile file = root.getFileForLocation(cpath);
if (file != null) {
return file.getFullPath().setDevice(null);
}
if (resolveLinks) {
// try to see if a linked resource points to this
IFile[] files = root.findFilesForLocation(cpath);
IPath newPath = null;
if (files.length > 0)
newPath = files[0].getFullPath().setDevice(null);
else {
IContainer[] folders = root.findContainersForLocation(cpath);
if (folders.length > 0)
newPath = folders[0].getFullPath().setDevice(null);
}
return newPath;
}
return null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"static public IPath convertToWorkspaceLocation(IPath cpath) {\r\n if (!Platform.isRunning())\r\n return null;\r\n \r\n IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); \r\n IPath rootPath = root.getLocation();\r\n IPath newPath = convertToWorkspacePath(cpath);\r\n if (newPath == null)\r\n return null;\r\n \r\n // convert to full path\r\n return rootPath.append(newPath);\r\n }",
"static public IPath convertToWorkspacePath(IPath cpath) {\r\n \treturn convertToWorkspacePath(cpath, false);\r\n }",
"public static IPath getCanonicalWorkspacePath(IPath wsPath) {\r\n\t\tIPath resolvedPath = new Path(\"\"); //$NON-NLS-1$\r\n\t\tIContainer container = ResourcesPlugin.getWorkspace().getRoot();\r\n\t\t// flag to consume the rest of the path without lookup\r\n\t\tboolean failed = false;\r\n\t\tfor (String segment : wsPath.segments()) {\r\n\t\t\tif (failed || container == null) {\r\n\t\t\t\tresolvedPath = resolvedPath.append(segment);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tIResource child = container.findMember(segment);\r\n\t\t\tif (child != null) {\r\n\t\t\t\t// found, so correct caps\r\n\t\t\t\tresolvedPath = resolvedPath.append(segment);\r\n\t\t\t\tif (child instanceof IContainer) {\r\n\t\t\t\t\tcontainer = (IContainer) child;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontainer = null;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// not found: manually search\r\n\t\t\t\tboolean found = false;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfor (IResource member : container.members()) {\r\n\t\t\t\t\t\tif (member.getName().equalsIgnoreCase(segment)) {\r\n\t\t\t\t\t\t\tresolvedPath = resolvedPath.append(member.getName());\r\n\t\t\t\t\t\t\tfound = true;\r\n\t\t\t\t\t\t\tif (member instanceof IContainer) {\r\n\t\t\t\t\t\t\t\tcontainer = (IContainer) member;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcontainer = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (CoreException e) {\r\n\t\t\t\t\t// just fail\r\n\t\t\t\t}\r\n\t\t\t\tif (!found) {\r\n\t\t\t\t\tfailed = true;\r\n\t\t\t\t\tresolvedPath = resolvedPath.append(segment);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resolvedPath;\r\n\t}",
"String getExternalPath(String path);",
"ResourceLocation resolve(String path);",
"public String resolvePath();",
"Path getLocation();",
"String getAbsolutePathWithinSlingHome(String relativePath);",
"IPath getPath();",
"Path getPath();",
"private String getEclipsePathFromWindowsPath(String path) {\n StringBuilder sbPath = new StringBuilder();\n char [] chars = path.toCharArray();\n for (int i = 0; i < chars.length; i++) {\n char c = chars[i];\n if (c == '\\\\') {\n sbPath.append('/');\n } else {\n sbPath.append(c);\n }\n }\n path = sbPath.toString();\n return path;\n }",
"public String getRelPath () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public Path getPathToWorkspaceFolder() {\n return pathToWorkspaceFolder;\n }",
"private String retrieveWorkSpaceFileLoc(String fileName) {\n ArrayList<String> regResourceProjects = loadRegistryResourceProjects();\n boolean fileExists = false;\n IWorkspace workspace = ResourcesPlugin.getWorkspace();\n String folder = workspace.getRoot().getLocation().toFile().getPath().toString();\n String resourceFilePath = null;\n for (String regResourceProject : regResourceProjects) {\n resourceFilePath = folder + File.separator + regResourceProject + File.separator +\n fileName;\n File resourceFile = new File(resourceFilePath);\n if (resourceFile.exists()) {\n fileExists = true;\n break;\n }\n }\n if (!fileExists) {\n displayUserError(RESGISTRY_RESOURCE_RETRIVING_ERROR, NO_SUCH_RESOURCE_EXISTS);\n }\n return resourceFilePath;\n }",
"public String getLocationPath();",
"String getRealPath(String path);",
"public void testFindContainersForLocation() {\n \t\t//should find the workspace root\n \t\tIWorkspaceRoot root = getWorkspace().getRoot();\n \t\tIContainer[] result = root.findContainersForLocation(root.getLocation());\n \t\tassertEquals(\"1.0\", 1, result.length);\n \t\tassertEquals(\"1.1\", root, result[0]);\n \t\t\n \t\t//deep linked resource\n \t\tIProject p1 = root.getProject(\"p1\");\n \t\tIProject p2 = root.getProject(\"p2\");\n \t\tIFolder parent = p2.getFolder(\"parent\");\n \t\tIFolder link = parent.getFolder(\"link\");\n \t\tensureExistsInWorkspace(new IResource[] {p1, p2, parent}, true);\n \t\ttry {\n \t\t\tlink.createLink(p1.getLocationURI(), IResource.NONE, getMonitor());\n \t\t} catch (CoreException e) {\n \t\t\tfail(\"1.99\", e);\n \t\t}\n \t\tresult = root.findContainersForLocation(p1.getLocation());\n \t\tassertEquals(\"2.0\", 2, result.length);\n \t\tboolean p1Found = false, linkFound = false;\n \t\tfor (int i = 0; i < result.length; i++) {\n \t\t\tif (result[i].equals(p1))\n \t\t\t\tp1Found = true;\n \t\t\telse if (result[i].equals(link))\n \t\t\t\tlinkFound = true;\n \t\t}\n \t\tassertTrue(\"2.1\", p1Found);\n \t\tassertTrue(\"2.2\", linkFound);\n \t\t\n \t\t// TODO add more tests\n \t}",
"@Override\n\t\tpublic List<String> getPathTo(InJarResourceImpl resource) {\n\t\t\t// TODO FD4SG la ligne ci-dessous est vraiment bizarre (getChildren renvoie une liste de RepositoryFolder alors que resource est\n\t\t\t// une ressource\n\t\t\tif (!getRootFolder().getChildren().contains(resource)) {\n\t\t\t\tList<String> pathTo = new ArrayList<>();\n\t\t\t\tStringTokenizer string = new StringTokenizer(/*resource.getURI()*/resource.getEntry().getName(),\n\t\t\t\t\t\tCharacter.toString(ClasspathResourceLocatorImpl.PATH_SEP.toCharArray()[0]));\n\t\t\t\twhile (string.hasMoreTokens()) {\n\t\t\t\t\tString next = string.nextToken();\n\t\t\t\t\tif (string.hasMoreTokens()) {\n\t\t\t\t\t\tpathTo.add(next);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn pathTo;\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"private IPath findInitialPath(IPath initialPath) {\n \t\tIPath path = cwd;\n \t\t\n \t\tif (initialPath != null) {\n \t\t\ttry {\n \t\t\t\tIFileInfo info = fileMgr.getResource(initialPath, new NullProgressMonitor()).fetchInfo();\n \t\t\t\tif (info.exists()) {\n \t\t\t\t\tpath = initialPath;\n \t\t\t\t}\n \t\t\t} catch (IOException e) {\n \t\t\t}\n \t\t}\n \t\treturn path;\n \t}",
"CtPath getPath();",
"public static String getAbsoluteWorkspacePath(\r\n \t\t\tString resourcePathInWorkspace, VpePageContext pageContext) {\r\n \r\n \t\tString resolvedValue = resourcePathInWorkspace\r\n \t\t\t\t.replaceFirst(\r\n \t\t\t\t\t\t\"^\\\\s*(\\\\#|\\\\$)\\\\{facesContext.externalContext.requestContextPath\\\\}\", Constants.EMPTY); //$NON-NLS-1$\r\n \r\n\t\tIFile baseFile = null;\r\n \t\tif (pageContext.getVisualBuilder().getCurrentIncludeInfo() != null\r\n \t\t\t\t&&(pageContext.getVisualBuilder().getCurrentIncludeInfo().getStorage() instanceof IFile)) {\r\n\t\t\tbaseFile = (IFile) pageContext.getVisualBuilder().getCurrentIncludeInfo()\r\n \t\t\t\t\t.getStorage();\r\n \t\t}\r\n\t\tif (baseFile == null)\r\n \t\t\treturn resolvedValue;\r\n \r\n\t\tresolvedValue = ElServiceUtil.replaceEl(baseFile, resolvedValue);\r\n \r\n \t\tURI uri = null;\r\n \t\ttry {\r\n \t\t\turi = new URI(resolvedValue);\r\n \t\t} catch (URISyntaxException e) {\r\n \t\t}\r\n \r\n \t\tif ((uri != null)\r\n \t\t\t\t&& (uri.isAbsolute() || (new File(resolvedValue)).exists()))\r\n \t\t\treturn resolvedValue;\r\n \r\n\t\t\r\n\t\t\r\n\t\tIFile resolvedFile = FileUtil.getFile(resolvedValue, baseFile);\r\n\t\tif (resolvedFile != null ) {\r\n\t\t\treturn Constants.FILE_PREFIX + resolvedFile.getLocation().toPortableString();\r\n\t\t} else {\r\n\t\t\treturn resolvedValue;\r\n\t\t}\r\n \t}",
"static public IPath convertToWorkspacePath(IPath cpath, boolean makeCanonical) {\r\n \treturn convertToWorkspacePath(cpath, makeCanonical, true);\r\n }",
"public VRL resolvePathVRL(String path) throws VRLSyntaxException\n\t{\n\t\treturn getLocation().resolvePath(path); \n\t}",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"public String resolvePath(String path, boolean tryCurrentPath) {\n String realPath = \"\";\n if (tryCurrentPath) {\n realPath = tryExtensionsPath(path);\n // Can't find the file in the active directory.\n if (realPath.isEmpty()) {\n // try to open the file in the same directory as the current file.\n int lastForwardSlash = currentFile().lastIndexOf('/');\n int lastBackwardSlash = currentFile().lastIndexOf('\\\\');\n int lastSlash = Math.max(lastForwardSlash, lastBackwardSlash);\n if (lastSlash != -1) {\n realPath = currentFile().substring(0, lastSlash+1) + path;\n realPath = tryExtensionsPath(realPath);\n }\n }\n }\n \n // Try all search paths\n for (String searchPath: searchPaths) {\n if (!realPath.isEmpty())\n break;\n \n realPath = searchPath + path;\n realPath = tryExtensionsPath(realPath);\n }\n \n return realPath;\n }",
"public Location getNeighbouringPath(String enteredPath) {\r\n\t\t\treturn this.getPlayer().getCurrentLocation().getPaths().get(enteredPath);\r\n\t\t}",
"public Path getPath();",
"private FilePath ensureWorkspaceExists(WorkflowJob job) throws Exception {\n FilePath path = remote.getWorkspaceFor(job);\n path.mkdirs();\n return path;\n }",
"public ResourcePath() {\n //_externalFolder = \"file:///C:/Program%20Files/ESRI/GPT9/gpt/\";\n //_localFolder = \"gpt/\";\n}",
"public RMPath convertPathToShape(RMPath aPath, RMShape aShape)\n{\n RMTransform transform = getTransformToShape(aShape);\n if(!transform.isIdentity()) { aPath = aPath.clone(); aPath.transformBy(transform); }\n return aPath;\n}",
"private ProjectResolutionResult resolveProject(TaskSelector.SelectionContext context, Path path, BuildState targetBuild) {\n if (!path.isAbsolute() && path.segmentCount() == 1) {\n return new ProjectResolutionResult(targetBuild, targetBuild.getMutableModel().getDefaultProject().getOwner(), true, path.getName());\n }\n\n // <path>:name -> resolve <path> to a project + select task with matching name in that project\n // when <path> is absolute -> resolve <path> relative to root project\n // when <path> is relative -> resolve <path> relative to default project\n\n Path projectPath = path.getParent();\n ProjectState matchingProject;\n if (projectPath.isAbsolute()) {\n matchingProject = buildRegistry.getRootBuild().getProjects().getRootProject();\n } else {\n matchingProject = targetBuild.getMutableModel().getDefaultProject().getOwner();\n }\n while (projectPath.segmentCount() > 0) {\n String next = projectPath.segment(0);\n matchingProject = selectProject(context, matchingProject, next);\n if (projectPath.segmentCount() == 1) {\n projectPath = Path.ROOT;\n } else {\n projectPath = projectPath.removeFirstSegments(1);\n }\n }\n LOGGER.info(\"Task path '{}' matched project '{}'\", context.getOriginalPath(), matchingProject.getIdentityPath());\n return new ProjectResolutionResult(matchingProject.getOwner(), matchingProject, false, path.getName());\n }",
"public ObjectNode resolvePaths();",
"@Override\n\tpublic String resolve(EObject from) {\n\t\tString resolvename = super.resolve(from);\n\t\tif (null == resolvename) {\n\t\t\treturn resolvename;\n\t\t}\n\t\t\n\t\tif (!resolvename.endsWith(\".sats\") && !resolvename.endsWith(\".dats\")) {\n\t\t\t// todo didn't check whether path is valid\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// System.out.println(\"resolve: \" + resolvename);\n\t\t\n\t\tResource resource = from.eResource();\n\t\tURI importUri = URI.createURI(resolvename);\n\t\t// is already valid uri\n\t\tif (EcoreUtil2.isValidUri(resource, importUri)) {\n\t\t\treturn resolvename;\n\t\t}\n\n\t\t// get the name of the project\n\t\tString projname = null;\n\t\tString path = from.eResource().getURI().toString();\n\t\tfinal String platform = \"platform:/resource/\";\n\t\t// final String filesys = \"file://\";\n\t\tif (path.startsWith(platform)) {\n\t\t\tprojname = path.substring(platform.length()).split(\"/\")[0];\n\t\t\t// System.out.println(\"projname is \" + projname);\n\t\t resolvename = platform + projname + \"/\" + resolvename;\n\t\t}\n\n\t\treturn resolvename;\n\n\t}",
"private Resource findDDRSource(Resource resource) {\n Resource answer = null;\n if (resource != null) {\n ValueMap properties = resource.getValueMap();\n String ddrTargetPath = properties.get(DDR_TARGET_PROPERTY_NAME, String.class);\n if (ddrTargetPath == null) {\n answer = findDDRSource(resource.getParent());\n } else {\n answer = resource;\n }\n }\n return answer;\n }",
"FileSystem getRemoteWorkspace(final HudsonJob job) {\n return getFileSystemFromCache(workspaces, job.getName(), new Callable<RemoteFileSystem>() {\n @Override public RemoteFileSystem call() throws Exception {\n return builderConnector.getWorkspace(job);\n }\n });\n }",
"Path createPath();",
"private String relativize(String p) {\n return Paths.get(\"\").toAbsolutePath().relativize(Paths.get(p).toAbsolutePath()).toString();\n }",
"public FilePath resolve(String relPath) {\n if (path.isEmpty()) {\n return FilePath.of(relPath);\n }\n return FilePath.of(path + \"/\" + relPath);\n }",
"public String getPath()\n {\n StringBuilder buff = new StringBuilder();\n Resource r = this;\n while(r != null)\n {\n if(r.getId() != 1)\n {\n buff.insert(0, r.getName());\n }\n r = r.getParent();\n if(r != null || this.getId() == 1)\n {\n buff.insert(0, '/');\n }\n }\n return buff.toString();\n }",
"public String getPath(String from, String to, String pathAlgo);",
"public String toLocalPath() {\n\n String parentPath = parent.toLocalPath();\n return StringUtils.isBlank(parentPath)\n ? element.getElement()\n : new StringBuilder()\n .append(parentPath)\n .append('.')\n .append(element.getElement())\n .toString();\n }",
"public abstract String getFullPath(final String resourcePath);",
"java.lang.String getXpath();",
"public String getShortScmURIPath() {\n String scmUrl = getScmUrl() != null ? getScmUrl() : getExternalScmUrl();\n try {\n URI scmUri = new URI(scmUrl);\n return scmUri.getPath();\n } catch (URISyntaxException e) {\n throw new RuntimeException(\"Invalid scm URI: \" + getScmUrl(), e);\n }\n\n }",
"public String getPath();",
"public String getPath();",
"public String getPath();",
"public String getPath () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public RMPath convertPathFromShape(RMPath aPath, RMShape aShape)\n{\n RMTransform transform = getTransformFromShape(aShape);\n if(!transform.isIdentity()) { aPath = aPath.clone(); aPath.transformBy(transform); }\n return aPath;\n}",
"private String solutionPath(State goal)\n\t{\n\t\t// TODO \n\t\t\n\t\treturn null; \n\t}",
"public FilePath resolve(FilePath relPath) {\n return resolve(relPath.toString());\n }",
"public String readSymbolicLink( SrvSession sess, TreeConnection tree, String path)\n throws AccessDeniedException, FileNotFoundException {\n \n // Access the associated database interface to check if it supports symbolic links\n \n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n DBInterface dbInterface = dbCtx.getDBInterface();\n String symLink = null;\n \n if ( dbInterface.supportsFeature( DBInterface.FeatureSymLinks)) {\n \n // Get, or create, the file state for the existing file\n \n FileState fstate = getFileState( path, dbCtx, true);\n \n // Get the file id of the existing file\n \n int fid = fstate.getFileId();\n int dirId = -1;\n \n if ( fid == -1) {\n \n // Split the current path string and find the file id of the existing file/directory\n \n dirId = findParentDirectoryId( dbCtx, path, true);\n if ( dirId == -1)\n throw new FileNotFoundException( path);\n \n // Get the file/directory name\n \n String[] oldPaths = FileName.splitPath( path);\n String fname = oldPaths[1];\n \n // Get the file id\n \n fid = getFileId( path, fname, dirId, dbCtx);\n if ( fid == -1)\n throw new FileNotFoundException( path);\n \n // Update the file state\n \n fstate.setFileId(fid);\n }\n \n try {\n \n // Database interface supports symbolic links, read the symbolic link\n \n symLink = dbInterface.readSymbolicLink( dirId, fid);\n }\n catch ( DBException ex) {\n throw new FileNotFoundException ( path);\n }\n }\n \n // Return the symbolic link data\n \n return symLink;\n }",
"public Path resolve(String part) {\n return Paths.get(part);\n }",
"private static ResolvedPath resolveAbsolutePath(\n EphemeralFsPath oiginalPath,\n EphemeralFsFileSystem fs,\n //the current directory\n //that parts will be resolved from\n INode current,\n //the parts of the path that must still be resolved\n //in reverse order\n List<EphemeralFsPath> remaining,\n //the steps we have already resolved\n List<ResolvedStep> steps,\n boolean noFollowLastSymlink) throws FileSystemException {\n \n if(remaining.isEmpty()) {\n return new ResolvedPath(fs, steps, current, null, !steps.isEmpty());\n }\n \n EphemeralFsPath currentPath = remaining.remove(remaining.size() -1);\n String fileName = currentPath.toString();\n\n if(fileName.equals(\".\")) {\n if(!current.isDir()) {\n throw new FileSystemException(oiginalPath + \": Not a directory\");\n }\n return resolveAbsolutePath(oiginalPath, fs, current, remaining, steps, noFollowLastSymlink);\n }\n else if(fileName.equals(\"..\")) {\n if(!current.isDir()) {\n throw new FileSystemException(oiginalPath + \": Not a directory\");\n }\n //we always have the root as the first step\n //\n if(steps.isEmpty()) {\n //we are trying to .. above the root\n //use root to explore\n //on linux, ls /../tmp will list /tmp\n return resolveAbsolutePath(oiginalPath, fs, fs.getRoot(), remaining, steps, noFollowLastSymlink);\n }\n ResolvedStep parent = steps.remove(steps.size() - 1);\n return resolveAbsolutePath(oiginalPath, fs, parent.directory, remaining, steps, noFollowLastSymlink);\n }\n \n if(current.isDir()) {\n DirectoryEntry entry = current.resolve(currentPath);\n if(entry != null) {\n if(entry.isSymbolicLink()) {\n if(noFollowLastSymlink && remaining.isEmpty()) {\n steps.add(new ResolvedStep(current, fileName));\n return new ResolvedPath(fs, steps, null, entry, true);\n }\n EphemeralFsPath linkTarget = entry.getSymbolicLink();\n EphemeralFsPath absolutePathSoFar = getPaths(fs, steps);\n List<EphemeralFsPath> newParts = absolutePathSoFar.resolve(linkTarget).splitPaths();\n for(int i = newParts.size() -1; i >= 0; i--) {\n remaining.add(newParts.get(i));\n }\n //we have a new absolute path to resolve\n //start over\n steps.clear();\n return resolveAbsolutePath(oiginalPath, fs, fs.getRoot(), remaining, steps, noFollowLastSymlink);\n }\n steps.add(new ResolvedStep(current, fileName));\n return resolveAbsolutePath(oiginalPath, fs, entry.getDestination(), remaining, steps, noFollowLastSymlink);\n }\n } \n\n //we can't resolve everything, stop\n //what we have resolved is still useful\n //for example resolving a non existing\n //path which we want to create\n steps.add(new ResolvedStep(current, fileName));\n if(remaining.isEmpty()) {\n return new ResolvedPath(fs, steps, null, null, true);\n } else {\n return new ResolvedPath(fs, steps, null, null, false); \n }\n \n }",
"public abstract String getPath();",
"public abstract String getPath();",
"protected StringBuilder convertPath(final String path) {\n\t\tStringBuilder pathBuffer = new StringBuilder(\"/app:company_home\");\n\t\tString[] parts = path.split(\"/\");\n\n\t\tString subpath;\n\n\t\tfor(String part : parts) {\n\t\t\tsubpath = part.trim();\n\n\t\t\tif(subpath.length() > 0) {\n\t\t\t\tpathBuffer.append(\"/cm:\").append(ISO9075.encode(subpath));\n\t\t\t}\n\t\t}\n\n\t\treturn pathBuffer;\n\t}",
"public DevicePath getDevicePath(Device device);",
"@Nullable String getPath();",
"private boolean hasSymbolicLink(Path path)\n {\n if (Files.isSymbolicLink(path))\n {\n return true;\n }\n\n // Lets try each path segment\n Path base = path.getRoot();\n for (Path segment : path)\n {\n base = base.resolve(segment);\n if (Files.isSymbolicLink(base))\n {\n return true;\n }\n }\n\n return false;\n }",
"public static Path getPathForObject(Object obj) {\r\n ReportsDirectory constant = fromObject(obj);\r\n return getTargetPath().resolve(constant.folder);\r\n }",
"public static IResource convertFileToExistingResource(File file) {\r\n IPath path = new Path(file.getAbsolutePath());\r\n \r\n IPath wsPath = convertToWorkspacePath(path, true);\r\n if (wsPath != null)\r\n \t return ResourcesPlugin.getWorkspace().getRoot().findMember(wsPath);\r\n \r\n return null;\r\n }",
"public void\nsetPath(SoPath path)\n{\n // ref the input path\n if (path != null)\n path.ref();\n\n // nuke the old path\n if (pathOfInterest != null) {\n pathOfInterest.unref();\n pathOfInterest = null;\n }\n // and copy the new path\n if (path != null) {\n pathOfInterest = path.copy();\n pathOfInterest.ref();\n }\n\n // unref the input path\n if (path != null)\n path.unref();\n\n}",
"Path getHasPath();",
"@Override\n\t\tpublic String getRealPath(String path) {\n\t\t\treturn null;\n\t\t}",
"public String getPath()\r\n/* 26: */ {\r\n/* 27:57 */ return this.path;\r\n/* 28: */ }",
"private List<TreeNode> translatePath(List path, TreeNode node) {\n \n // TODO: Find the correct node given two identical paths. \n // For example suppose we have two paths Classes/String and Classes/String.\n // This method will always translate to the first path, regardless of the\n // actual path given.\n \n List tail = new ArrayList();\n tail.addAll(path);\n Object target = tail.remove(0);\n \n if (!node.toString().equals(target.toString())) {\n return null;\n }\n \n List<TreeNode> newPath = new ArrayList<TreeNode>();\n newPath.add(node);\n \n // no more nodes to find, just return this one\n if (tail.isEmpty()) return newPath;\n \n Enumeration e = node.children();\n while(e.hasMoreElements()) {\n TreeNode child = (TreeNode)e.nextElement();\n List nodes = translatePath(tail, child);\n if (nodes != null) {\n newPath.addAll(nodes);\n return newPath;\n }\n }\n \n // the path was not found under this subtree\n return null;\n }",
"private static String returnDiretorioPai(Path a){\n return a.getParent().toString();\n }",
"private URI getRefinedResourceURI(Resource resource, String newName) {\n\t\tURI newUri = resource.getURI();\n\t\tString fileExtension = newUri.fileExtension();\n\t\tnewUri = newUri.trimSegments(1).appendSegment(newName).appendFileExtension(fileExtension);\n\t\treturn newUri; \n\t}",
"public String getWorkspacePath() {\n\t\tString workspacePath = userSettingsService.getUserSettings().getWorkspacePath();\n\t\treturn getAbsoluteSubDirectoryPath(workspacePath);\n\t}",
"SinglePathwayResults getSinglePathway(SinglePathwaySpecifier sps) throws SearchServiceException;",
"public IPath getPath() {\n \t\tif (remotePath.equals(\"\")) {\n \t\t\treturn null;\n \t\t}\n \t\treturn new Path(remotePath);\n \t}",
"@Nonnull\n Path getPath();",
"String resolvePath(String root_url, Enumeration path)\n {\n if (! root_url.endsWith(URL_PATH_SEPARATOR))\n root_url = root_url+URL_PATH_SEPARATOR;\n\n StringBuffer sb = new StringBuffer();\n while (path.hasMoreElements())\n {\n sb.append(path.nextElement());\n sb.append(URL_PATH_SEPARATOR);\n }\n String p = sb.toString();\n if (p.startsWith(URL_PATH_SEPARATOR))\n p = p.substring(1);\n\n return root_url + p;\n }",
"public static String path(String link) {\n\n if(Strings.isNullOrEmpty(link)) {\n return \"\";\n }\n\n boolean relative = false;\n if(!link.contains(\"://\")) {\n if(!link.startsWith(\"/\")) {\n link = \"/\" + link;\n relative = true;\n }\n link = \"https://broken.com\" + link;\n }\n\n try {\n return !relative ? new URI(link).getPath() : new URI(link).getPath().substring(1);\n } catch(URISyntaxException ue) {\n return \"\";\n }\n }",
"private static String toAbsPathStr(String relPath, FileSystem fs) {\n String retPath = \"\";\n Directory tmpDir = (Directory) fs.checkPath(relPath, \"directory\");\n while (!tmpDir.equals(fs.getRoot())) {\n retPath = \"/\" + tmpDir.getName() + retPath;\n tmpDir = tmpDir.getParentDirectory();\n }\n return retPath;\n }",
"public Path tipPathtoRelPath(Path tipPath) {\n\t\tPath absPath = tipPathToAbsPath(tipPath);\n\t\tPath relPath = path.relativize(absPath);\n\t\treturn relPath;\n\t}",
"void resourceChanged(IPath workspacePath);",
"private String getOutputFolder(String path){\n\n //Remove the portion of the path which is prior to our repositories file path\n path = StringUtils.removeStart(FilenameUtils.getFullPath(path), REPOSITORY_LOCATION);\n //Return the path without leading and ending / and ensures the file path uses forward slashes instead of backslashes\n return StringUtils.strip(StringUtils.strip(path,\"/\"),\"\\\\\").replace(\"\\\\\", \"/\");\n }",
"protected Path resolveDfsPath(String attribute) throws SmartFrogException, RemoteException {\n String pathName = sfResolve(attribute, \"\", true);\n try {\n return new Path(pathName);\n } catch (IllegalArgumentException e) {\n throw new SmartFrogLifecycleException(\"Failed to create the path defined by attribute \" + attribute\n + \" with value \\\"\" + pathName\n + \"\\\" : \" + e,\n e,\n this);\n }\n }",
"String getRootAlias();",
"public String path(String path1, String path2);",
"public DefinitionPath getPath() {\n\t\treturn path;\n\t}",
"public void gettingDesktopPath() {\n FileSystemView filesys = FileSystemView.getFileSystemView();\n File[] roots = filesys.getRoots();\n homePath = filesys.getHomeDirectory().toString();\n System.out.println(homePath);\n //checking if file existing on that location\n pathTo = homePath + \"\\\\SpisakReversa.xlsx\";\n }",
"public Path createSourcespath()\n {\n if( m_sourcesPath == null )\n {\n m_sourcesPath = new Path();\n }\n Path path1 = m_sourcesPath;\n final Path path = new Path();\n path1.addPath( path );\n return path;\n }",
"public static IPath getComparablePath(IPath path) {\r\n\t\tif (path == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tif (HostOS.IS_WIN32) {\r\n\t\t\treturn new Path(path.toOSString().toLowerCase());\r\n\t\t}\r\n\t\t\r\n\t\treturn path;\r\n\t}",
"@Nonnull\n public Path getStoragePath(@Nonnull String original) {\n Path path = Paths.get(original);\n return this.getStoragePath(path);\n }",
"private void findPath()\n\t{\n\t\tpathfinding = true;\n\n\t\tmoves = Pathfinder.calcOneWayMove(city.getDrivingMap(), x, y, destX, destY);\n\t\tpathfinding = false;\n\t}",
"public Path getPath() {\r\n return getTargetPath().resolve(folder);\r\n }",
"public URL makeUrl(String path) throws IOException {\n path = Val.chkStr(path);\n URL url = null;\n \n if ((_localFolder.length() > 0) && (_externalFolder.length() > 0) &&\n path.startsWith(_localFolder)) {\n path = _externalFolder+path.substring(_localFolder.length());\n //LogUtil.getLogger().finer(\"Making URL for resource: \"+path);\n url = new URL(path); \n \n } else {\n //url = this.getClass().getClassLoader().getResource(path);\n //LogUtil.getLogger().finer(\"Making URL for resource: \"+path);\n url = Thread.currentThread().getContextClassLoader().getResource(path);\n }\n if (url == null) {\n throw new IOException(\"Unable to create resource URL for path: \"+path);\n }\n return url;\n}",
"public String getPath() \r\n\t{\r\n\t\tStringBuilder pathBuilder = new StringBuilder();\r\n\t\tfor(Cell c: path)\r\n\t\t\tpathBuilder.append(\" (\" + c.getRow() + ',' + c.getColumn() + ')');\r\n\t\t\r\n\t\treturn pathBuilder.toString();\r\n\t}",
"public String getPathName();",
"public String getPath()\n\t{\n\t\treturn letter + \":/\";\n\t}",
"public VariableBitString getPath(char symbol) {\r\n if(isEmpty()){\r\n throw new ArrayIndexOutOfBoundsException(\"No symbols in table\");\r\n }\r\n else {\r\n Node symbolNode = first;\r\n while(true) {\r\n if(symbolNode.symbol == symbol) {\r\n return symbolNode.path;\r\n }\r\n else if(symbolNode.next == null) {\r\n throw new NoSuchElementException(\"Symbol is not in the table\");\r\n }\r\n else {\r\n symbolNode = symbolNode.next;\r\n }\r\n }\r\n }\r\n }",
"public String getDirectoryPath() {\n return EXTERNAL_PATH;\n }",
"Path getPath(String name) throws IOException;"
] |
[
"0.6219269",
"0.5841756",
"0.5722039",
"0.5653024",
"0.5644985",
"0.5633211",
"0.54541904",
"0.54266846",
"0.5375393",
"0.5262776",
"0.5252619",
"0.5248993",
"0.52416754",
"0.52373827",
"0.5236632",
"0.52303654",
"0.52115566",
"0.5206632",
"0.5186087",
"0.51457465",
"0.514145",
"0.5108558",
"0.51006436",
"0.50361395",
"0.50361395",
"0.50361395",
"0.50361395",
"0.50361395",
"0.50193936",
"0.50041926",
"0.49979866",
"0.49897584",
"0.4970357",
"0.4937532",
"0.49363428",
"0.4934988",
"0.48975977",
"0.48973104",
"0.4896372",
"0.48925668",
"0.48884043",
"0.48783726",
"0.48727745",
"0.4865853",
"0.4859311",
"0.48323908",
"0.48001066",
"0.47832564",
"0.4781935",
"0.4781935",
"0.4781935",
"0.47754204",
"0.4764528",
"0.4756715",
"0.47549883",
"0.473111",
"0.47303897",
"0.47162873",
"0.47049573",
"0.47049573",
"0.46873674",
"0.46836364",
"0.46764398",
"0.46709418",
"0.4665398",
"0.4653425",
"0.46527418",
"0.46492907",
"0.464379",
"0.46422997",
"0.46420518",
"0.46337718",
"0.46336317",
"0.46187544",
"0.45888087",
"0.4585772",
"0.45764244",
"0.45763505",
"0.45746896",
"0.45738512",
"0.45663738",
"0.45597765",
"0.45578066",
"0.45415998",
"0.45385185",
"0.45252952",
"0.45224807",
"0.45177168",
"0.45172933",
"0.4511486",
"0.45089358",
"0.45011008",
"0.44984496",
"0.44940996",
"0.44921452",
"0.4489264",
"0.44880697",
"0.44827637",
"0.4480881",
"0.44789773"
] |
0.5625862
|
6
|
Convert the full path to a full path inside the workspace, if possible. (E.g. change a linked resource to the real full path.) Either the path comes in as a path pointing inside the workspace, or we can find a linked resource which aliases to the same location.
|
static public IPath convertToWorkspaceLocation(IPath cpath) {
if (!Platform.isRunning())
return null;
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IPath rootPath = root.getLocation();
IPath newPath = convertToWorkspacePath(cpath);
if (newPath == null)
return null;
// convert to full path
return rootPath.append(newPath);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String resolvePath();",
"String getRealPath(String path);",
"String fullpath(String path) {\n return fullpath(path, null);\n }",
"@SuppressWarnings(\"deprecation\")\r\n\tstatic public IPath convertToWorkspacePath(IPath cpath, boolean makeCanonical, boolean resolveLinks) {\r\n if (!Platform.isRunning() || cpath == null)\r\n return null;\r\n \r\n if (makeCanonical) {\r\n\t\t\ttry {\r\n\t\t\t\t// Since we have a filesystem path, try using the filesystem\r\n\t\t\t\t// and Java's smarter APIs to fix the caps early. \r\n\t\t\t\t// Watch out for the device being set incorrectly, though.\r\n\t\t\t\tString device = cpath.getDevice();\r\n\t\t\t\tcpath = new Path(cpath.toFile().getCanonicalPath()).setDevice(device);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// Something's wrong with the path; just use it as-is\r\n\t\t\t}\r\n }\r\n \r\n IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); \r\n IFile file = root.getFileForLocation(cpath);\r\n if (file != null) {\r\n \treturn file.getFullPath().setDevice(null);\r\n }\r\n \r\n if (resolveLinks) {\r\n\t // try to see if a linked resource points to this\r\n\t IFile[] files = root.findFilesForLocation(cpath);\r\n\t IPath newPath = null;\r\n\t if (files.length > 0)\r\n\t newPath = files[0].getFullPath().setDevice(null);\r\n\t else {\r\n\t IContainer[] folders = root.findContainersForLocation(cpath);\r\n\t if (folders.length > 0)\r\n\t newPath = folders[0].getFullPath().setDevice(null);\r\n\t }\r\n\t return newPath;\r\n }\r\n \r\n return null;\r\n }",
"String getAbsolutePathWithinSlingHome(String relativePath);",
"private String getEclipsePathFromWindowsPath(String path) {\n StringBuilder sbPath = new StringBuilder();\n char [] chars = path.toCharArray();\n for (int i = 0; i < chars.length; i++) {\n char c = chars[i];\n if (c == '\\\\') {\n sbPath.append('/');\n } else {\n sbPath.append(c);\n }\n }\n path = sbPath.toString();\n return path;\n }",
"static public IPath convertToWorkspacePath(IPath cpath) {\r\n \treturn convertToWorkspacePath(cpath, false);\r\n }",
"private String toCompletePath(String fullRequest) {\n \n///Parse request for file path\nString requestLine[] = new String[] {\" \", \" \", \" \"};\n requestLine = fullRequest.split(\" \");\nString partialPath = requestLine[1];\n \n//If requested path is just \"/\" or \"\", don't return any path\n if(partialPath.length() <= 1) {\n noFileRequested = true;\n return null;\n }\n \nString completePath;\n//If using my Windows machine, the path is different than the school Linux machines\nif (Windows)\n completePath = \"C:/Users/Michelle/eclipse-workspace/P1\" + partialPath;\nelse\n completePath = \".\" + partialPath;\n \n return completePath;\n}",
"public abstract String getFullPath(final String resourcePath);",
"public String getLocationPath();",
"public static IPath getCanonicalWorkspacePath(IPath wsPath) {\r\n\t\tIPath resolvedPath = new Path(\"\"); //$NON-NLS-1$\r\n\t\tIContainer container = ResourcesPlugin.getWorkspace().getRoot();\r\n\t\t// flag to consume the rest of the path without lookup\r\n\t\tboolean failed = false;\r\n\t\tfor (String segment : wsPath.segments()) {\r\n\t\t\tif (failed || container == null) {\r\n\t\t\t\tresolvedPath = resolvedPath.append(segment);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tIResource child = container.findMember(segment);\r\n\t\t\tif (child != null) {\r\n\t\t\t\t// found, so correct caps\r\n\t\t\t\tresolvedPath = resolvedPath.append(segment);\r\n\t\t\t\tif (child instanceof IContainer) {\r\n\t\t\t\t\tcontainer = (IContainer) child;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontainer = null;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// not found: manually search\r\n\t\t\t\tboolean found = false;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfor (IResource member : container.members()) {\r\n\t\t\t\t\t\tif (member.getName().equalsIgnoreCase(segment)) {\r\n\t\t\t\t\t\t\tresolvedPath = resolvedPath.append(member.getName());\r\n\t\t\t\t\t\t\tfound = true;\r\n\t\t\t\t\t\t\tif (member instanceof IContainer) {\r\n\t\t\t\t\t\t\t\tcontainer = (IContainer) member;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcontainer = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (CoreException e) {\r\n\t\t\t\t\t// just fail\r\n\t\t\t\t}\r\n\t\t\t\tif (!found) {\r\n\t\t\t\t\tfailed = true;\r\n\t\t\t\t\tresolvedPath = resolvedPath.append(segment);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resolvedPath;\r\n\t}",
"ResourceLocation resolve(String path);",
"String getExternalPath(String path);",
"public String resolvePath(String path, boolean tryCurrentPath) {\n String realPath = \"\";\n if (tryCurrentPath) {\n realPath = tryExtensionsPath(path);\n // Can't find the file in the active directory.\n if (realPath.isEmpty()) {\n // try to open the file in the same directory as the current file.\n int lastForwardSlash = currentFile().lastIndexOf('/');\n int lastBackwardSlash = currentFile().lastIndexOf('\\\\');\n int lastSlash = Math.max(lastForwardSlash, lastBackwardSlash);\n if (lastSlash != -1) {\n realPath = currentFile().substring(0, lastSlash+1) + path;\n realPath = tryExtensionsPath(realPath);\n }\n }\n }\n \n // Try all search paths\n for (String searchPath: searchPaths) {\n if (!realPath.isEmpty())\n break;\n \n realPath = searchPath + path;\n realPath = tryExtensionsPath(realPath);\n }\n \n return realPath;\n }",
"Path getLocation();",
"public String fullpath(String path, Args namespace) {\n return path;\n }",
"public abstract String getFullPath();",
"private String relativize(String p) {\n return Paths.get(\"\").toAbsolutePath().relativize(Paths.get(p).toAbsolutePath()).toString();\n }",
"private static ResolvedPath resolveAbsolutePath(\n EphemeralFsPath oiginalPath,\n EphemeralFsFileSystem fs,\n //the current directory\n //that parts will be resolved from\n INode current,\n //the parts of the path that must still be resolved\n //in reverse order\n List<EphemeralFsPath> remaining,\n //the steps we have already resolved\n List<ResolvedStep> steps,\n boolean noFollowLastSymlink) throws FileSystemException {\n \n if(remaining.isEmpty()) {\n return new ResolvedPath(fs, steps, current, null, !steps.isEmpty());\n }\n \n EphemeralFsPath currentPath = remaining.remove(remaining.size() -1);\n String fileName = currentPath.toString();\n\n if(fileName.equals(\".\")) {\n if(!current.isDir()) {\n throw new FileSystemException(oiginalPath + \": Not a directory\");\n }\n return resolveAbsolutePath(oiginalPath, fs, current, remaining, steps, noFollowLastSymlink);\n }\n else if(fileName.equals(\"..\")) {\n if(!current.isDir()) {\n throw new FileSystemException(oiginalPath + \": Not a directory\");\n }\n //we always have the root as the first step\n //\n if(steps.isEmpty()) {\n //we are trying to .. above the root\n //use root to explore\n //on linux, ls /../tmp will list /tmp\n return resolveAbsolutePath(oiginalPath, fs, fs.getRoot(), remaining, steps, noFollowLastSymlink);\n }\n ResolvedStep parent = steps.remove(steps.size() - 1);\n return resolveAbsolutePath(oiginalPath, fs, parent.directory, remaining, steps, noFollowLastSymlink);\n }\n \n if(current.isDir()) {\n DirectoryEntry entry = current.resolve(currentPath);\n if(entry != null) {\n if(entry.isSymbolicLink()) {\n if(noFollowLastSymlink && remaining.isEmpty()) {\n steps.add(new ResolvedStep(current, fileName));\n return new ResolvedPath(fs, steps, null, entry, true);\n }\n EphemeralFsPath linkTarget = entry.getSymbolicLink();\n EphemeralFsPath absolutePathSoFar = getPaths(fs, steps);\n List<EphemeralFsPath> newParts = absolutePathSoFar.resolve(linkTarget).splitPaths();\n for(int i = newParts.size() -1; i >= 0; i--) {\n remaining.add(newParts.get(i));\n }\n //we have a new absolute path to resolve\n //start over\n steps.clear();\n return resolveAbsolutePath(oiginalPath, fs, fs.getRoot(), remaining, steps, noFollowLastSymlink);\n }\n steps.add(new ResolvedStep(current, fileName));\n return resolveAbsolutePath(oiginalPath, fs, entry.getDestination(), remaining, steps, noFollowLastSymlink);\n }\n } \n\n //we can't resolve everything, stop\n //what we have resolved is still useful\n //for example resolving a non existing\n //path which we want to create\n steps.add(new ResolvedStep(current, fileName));\n if(remaining.isEmpty()) {\n return new ResolvedPath(fs, steps, null, null, true);\n } else {\n return new ResolvedPath(fs, steps, null, null, false); \n }\n \n }",
"private IPath findInitialPath(IPath initialPath) {\n \t\tIPath path = cwd;\n \t\t\n \t\tif (initialPath != null) {\n \t\t\ttry {\n \t\t\t\tIFileInfo info = fileMgr.getResource(initialPath, new NullProgressMonitor()).fetchInfo();\n \t\t\t\tif (info.exists()) {\n \t\t\t\t\tpath = initialPath;\n \t\t\t\t}\n \t\t\t} catch (IOException e) {\n \t\t\t}\n \t\t}\n \t\treturn path;\n \t}",
"public static String getAbsoluteWorkspacePath(\r\n \t\t\tString resourcePathInWorkspace, VpePageContext pageContext) {\r\n \r\n \t\tString resolvedValue = resourcePathInWorkspace\r\n \t\t\t\t.replaceFirst(\r\n \t\t\t\t\t\t\"^\\\\s*(\\\\#|\\\\$)\\\\{facesContext.externalContext.requestContextPath\\\\}\", Constants.EMPTY); //$NON-NLS-1$\r\n \r\n\t\tIFile baseFile = null;\r\n \t\tif (pageContext.getVisualBuilder().getCurrentIncludeInfo() != null\r\n \t\t\t\t&&(pageContext.getVisualBuilder().getCurrentIncludeInfo().getStorage() instanceof IFile)) {\r\n\t\t\tbaseFile = (IFile) pageContext.getVisualBuilder().getCurrentIncludeInfo()\r\n \t\t\t\t\t.getStorage();\r\n \t\t}\r\n\t\tif (baseFile == null)\r\n \t\t\treturn resolvedValue;\r\n \r\n\t\tresolvedValue = ElServiceUtil.replaceEl(baseFile, resolvedValue);\r\n \r\n \t\tURI uri = null;\r\n \t\ttry {\r\n \t\t\turi = new URI(resolvedValue);\r\n \t\t} catch (URISyntaxException e) {\r\n \t\t}\r\n \r\n \t\tif ((uri != null)\r\n \t\t\t\t&& (uri.isAbsolute() || (new File(resolvedValue)).exists()))\r\n \t\t\treturn resolvedValue;\r\n \r\n\t\t\r\n\t\t\r\n\t\tIFile resolvedFile = FileUtil.getFile(resolvedValue, baseFile);\r\n\t\tif (resolvedFile != null ) {\r\n\t\t\treturn Constants.FILE_PREFIX + resolvedFile.getLocation().toPortableString();\r\n\t\t} else {\r\n\t\t\treturn resolvedValue;\r\n\t\t}\r\n \t}",
"public String getShortenedPath(String ruleFilePath) {\n String[] splitFilePath = ruleFilePath.split(\"/\");\n String str = \"\";\n if (splitFilePath.length > 2) {\n int index = splitFilePath.length - 2;\n for (int i = index; i < splitFilePath.length; i++) {\n str += \"/\" + splitFilePath[i];\n }\n System.out.println(\"Using shortened file path.\");\n return str;\n } else {\n System.out.println(\"Using full file path.\");\n return ruleFilePath;\n } \n }",
"public FilePath resolve(String relPath) {\n if (path.isEmpty()) {\n return FilePath.of(relPath);\n }\n return FilePath.of(path + \"/\" + relPath);\n }",
"private static String toAbsPathStr(String relPath, FileSystem fs) {\n String retPath = \"\";\n Directory tmpDir = (Directory) fs.checkPath(relPath, \"directory\");\n while (!tmpDir.equals(fs.getRoot())) {\n retPath = \"/\" + tmpDir.getName() + retPath;\n tmpDir = tmpDir.getParentDirectory();\n }\n return retPath;\n }",
"public String toLocalPath() {\n\n String parentPath = parent.toLocalPath();\n return StringUtils.isBlank(parentPath)\n ? element.getElement()\n : new StringBuilder()\n .append(parentPath)\n .append('.')\n .append(element.getElement())\n .toString();\n }",
"@Override\n\t\tpublic String getRealPath(String path) {\n\t\t\treturn null;\n\t\t}",
"public FilePath relativize(FilePath fullPath) {\n String fullPathString = fullPath.path;\n if (fullPathString.startsWith(path + \"/\")) {\n return FilePath.of(fullPathString.substring(path.length() + 1));\n } else {\n // Not a relative path\n return fullPath;\n }\n }",
"public String getShortScmURIPath() {\n String scmUrl = getScmUrl() != null ? getScmUrl() : getExternalScmUrl();\n try {\n URI scmUri = new URI(scmUrl);\n return scmUri.getPath();\n } catch (URISyntaxException e) {\n throw new RuntimeException(\"Invalid scm URI: \" + getScmUrl(), e);\n }\n\n }",
"public String getRelPath () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"protected StringBuilder convertPath(final String path) {\n\t\tStringBuilder pathBuffer = new StringBuilder(\"/app:company_home\");\n\t\tString[] parts = path.split(\"/\");\n\n\t\tString subpath;\n\n\t\tfor(String part : parts) {\n\t\t\tsubpath = part.trim();\n\n\t\t\tif(subpath.length() > 0) {\n\t\t\t\tpathBuffer.append(\"/cm:\").append(ISO9075.encode(subpath));\n\t\t\t}\n\t\t}\n\n\t\treturn pathBuffer;\n\t}",
"public static String localizePath(String path)\r\n {\r\n StringBuilder result = new StringBuilder();\r\n char nextChar;\r\n for(int i = 0; i < path.length(); i++)\r\n {\r\n nextChar = path.charAt(i);\r\n if((nextChar == '/') || (nextChar == '\\\\'))\r\n {\r\n // Convert the URI separator to the system dependent path separator\r\n result.append(File.separatorChar);\r\n }\r\n else\r\n {\r\n result.append(nextChar);\r\n }\r\n }\r\n \r\n return result.toString();\r\n }",
"Path getPath();",
"public String getPath()\n {\n StringBuilder buff = new StringBuilder();\n Resource r = this;\n while(r != null)\n {\n if(r.getId() != 1)\n {\n buff.insert(0, r.getName());\n }\n r = r.getParent();\n if(r != null || this.getId() == 1)\n {\n buff.insert(0, '/');\n }\n }\n return buff.toString();\n }",
"static public IPath convertToWorkspacePath(IPath cpath, boolean makeCanonical) {\r\n \treturn convertToWorkspacePath(cpath, makeCanonical, true);\r\n }",
"public ResourcePath() {\n //_externalFolder = \"file:///C:/Program%20Files/ESRI/GPT9/gpt/\";\n //_localFolder = \"gpt/\";\n}",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"public static String resolveRelativePath(String relPath, String absPath) {\r\n\t\t// if relative path is really absolute, then ignore absPath (eInnovation\r\n\t\t// change)\r\n\t\tif (relPath.startsWith(\"/\")) {\r\n\t\t\tabsPath = \"\";\r\n\t\t}\r\n\r\n\t\tString newAbsPath = absPath;\r\n\t\tString newRelPath = relPath;\r\n\t\tif (relPath.startsWith(\"$\")) {\r\n\t\t\treturn relPath;\r\n\t\t} else if (absPath.endsWith(\"/\")) {\r\n\t\t\tnewAbsPath = absPath.substring(0, absPath.length() - 1);\r\n\t\t} else {\r\n\t\t\t// absPath ends with a filename, remove it (eInnovation change)\r\n\t\t\tint lastSlashIndex = absPath.lastIndexOf('/');\r\n\t\t\tif (lastSlashIndex >= 0) {\r\n\t\t\t\tnewAbsPath = absPath.substring(0, lastSlashIndex);\r\n\t\t\t} else {\r\n\t\t\t\tnewAbsPath = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tint relPos = newRelPath.indexOf(\"../\");\r\n\t\twhile (relPos > -1) {\r\n\t\t\tnewRelPath = newRelPath.substring(relPos + 3);\r\n\t\t\tint lastSlashInAbsPath = newAbsPath.lastIndexOf(\"/\");\r\n\t\t\tif (lastSlashInAbsPath >= 0) {\r\n\t\t\t\tnewAbsPath = newAbsPath.substring(0,\r\n\t\t\t\t\t\tnewAbsPath.lastIndexOf(\"/\"));\r\n\t\t\t} else {\r\n\t\t\t\t// eInnovation change: fix potential exception\r\n\t\t\t\tnewAbsPath = \"\";\r\n\t\t\t}\r\n\t\t\trelPos = newRelPath.indexOf(\"../\");\r\n\t\t}\r\n\t\tString returnedPath;\r\n\t\tif (newRelPath.startsWith(\"/\")) {\r\n\t\t\treturnedPath = newAbsPath + newRelPath;\r\n\t\t} else {\r\n\t\t\treturnedPath = newAbsPath + \"/\" + newRelPath;\r\n\t\t}\r\n\r\n\t\t// remove any \".\" references to current directory (eInnovation change)\r\n\t\t// For example:\r\n\t\t// \"./junk\" becomes \"junk\"\r\n\t\t// \"/./junk\" becomes \"/junk\"\r\n\t\t// \"junk/.\" becomes \"junk\"\r\n\t\twhile (returnedPath.endsWith(\"/.\")) {\r\n\t\t\treturnedPath = returnedPath.substring(0, returnedPath.length() - 2);\r\n\t\t}\r\n\t\tdo {\r\n\t\t\tint dotSlashIndex = returnedPath.lastIndexOf(\"./\");\r\n\t\t\tif (dotSlashIndex < 0) {\r\n\t\t\t\tbreak;\r\n\t\t\t} else if (dotSlashIndex == 0\r\n\t\t\t\t\t|| returnedPath.charAt(dotSlashIndex - 1) != '.') {\r\n\t\t\t\tString firstSubstring;\r\n\t\t\t\tif (dotSlashIndex > 0) {\r\n\t\t\t\t\tfirstSubstring = returnedPath.substring(0, dotSlashIndex);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfirstSubstring = \"\";\r\n\t\t\t\t}\r\n\t\t\t\tString secondSubstring;\r\n\t\t\t\tif (dotSlashIndex + 2 < returnedPath.length()) {\r\n\t\t\t\t\tsecondSubstring = returnedPath.substring(dotSlashIndex + 2,\r\n\t\t\t\t\t\t\treturnedPath.length());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsecondSubstring = \"\";\r\n\t\t\t\t}\r\n\t\t\t\treturnedPath = firstSubstring + secondSubstring;\r\n\t\t\t}\r\n\t\t} while (true);\r\n\r\n\t\treturn returnedPath;\r\n\t}",
"private String fixPath(String Path) {\n\n // Nothing to do if we're running the plugin on a Windows machine.\n if (Global.IsWindowsOS()) {\n return Path;\n }\n\n // Replace all of the Windows separator characters with linux separator characters.\n String NewPath = Path.replaceAll(\"\\\\\\\\\", File.separator);\n\n Log.getInstance().write(Log.LOGLEVEL_TRACE, \"RecordingEpisode.fixPath: \" + Path + \"->\" + NewPath);\n \n return NewPath;\n }",
"IPath getPath();",
"public String getAbsPath();",
"@Override\n\tpublic String getRealPath(String path) {\n\t\treturn null;\n\t}",
"public String getFullPath()\n {\n return( fullPath );\n }",
"private String retrieveWorkSpaceFileLoc(String fileName) {\n ArrayList<String> regResourceProjects = loadRegistryResourceProjects();\n boolean fileExists = false;\n IWorkspace workspace = ResourcesPlugin.getWorkspace();\n String folder = workspace.getRoot().getLocation().toFile().getPath().toString();\n String resourceFilePath = null;\n for (String regResourceProject : regResourceProjects) {\n resourceFilePath = folder + File.separator + regResourceProject + File.separator +\n fileName;\n File resourceFile = new File(resourceFilePath);\n if (resourceFile.exists()) {\n fileExists = true;\n break;\n }\n }\n if (!fileExists) {\n displayUserError(RESGISTRY_RESOURCE_RETRIVING_ERROR, NO_SUCH_RESOURCE_EXISTS);\n }\n return resourceFilePath;\n }",
"private URI getRefinedResourceURI(Resource resource, String newName) {\n\t\tURI newUri = resource.getURI();\n\t\tString fileExtension = newUri.fileExtension();\n\t\tnewUri = newUri.trimSegments(1).appendSegment(newName).appendFileExtension(fileExtension);\n\t\treturn newUri; \n\t}",
"private String normalizePath(String path)\n {\n return path.replaceAll(\"\\\\\\\\{1,}\", \"/\");\n }",
"public Path resolve(String part) {\n return Paths.get(part);\n }",
"private static String translateToAssetPath(URI assetRefURI, URI docBaseURI) {\n String assetPath;\n\n if (isDocumentRelativeURI(assetRefURI)) {\n assetPath = docBaseURI.resolve(assetRefURI).normalize().getPath();\n\n // Note: A leading slash is prepended, when Path.getPath() does not return a String with\n // a leading slash. This could be the case if the document's base URI does not have a path portion.\n // The leading slash is required to adhere to the pattern of a normalized asset path.\n assetPath = assetPath.startsWith(\"/\") ? assetPath : \"/\" + assetPath;\n } else if (isProtocolRelativeURI(assetRefURI)) {\n assetPath = assetRefURI.normalize().getPath();\n } else if (isRootRelativeURI(assetRefURI)) {\n assetPath = assetRefURI.normalize().toString();\n } else if (assetRefURI.isAbsolute()) {\n assetPath = assetRefURI.normalize().getPath();\n } else {\n\n // Note: This could be an error as well, but in auto-build mode, there can\n // easy be a situation, that would raise and thus kill the process. One could\n // think about differentiating behavior based on one-time and auto-build mode\n // but there's not the necessary infrastructure (e.g. a generation context object)\n // for that right now.\n LOG.warn(String.format(\"Failed to discern URL type of '%s' when trying to map it to the corresponding \" +\n \"site asset path. Leaving it unprocessed.\", assetRefURI));\n assetPath = assetRefURI.toString();\n }\n\n return cutOptionalFingerprint(assetPath);\n }",
"@Test\n public void testRelativize_bothAbsolute() {\n assertRelativizedPathEquals(\"b/c\", pathService.parsePath(\"/a\"), \"/a/b/c\");\n assertRelativizedPathEquals(\"c/d\", pathService.parsePath(\"/a/b\"), \"/a/b/c/d\");\n }",
"String resolvePath(String root_url, Enumeration path)\n {\n if (! root_url.endsWith(URL_PATH_SEPARATOR))\n root_url = root_url+URL_PATH_SEPARATOR;\n\n StringBuffer sb = new StringBuffer();\n while (path.hasMoreElements())\n {\n sb.append(path.nextElement());\n sb.append(URL_PATH_SEPARATOR);\n }\n String p = sb.toString();\n if (p.startsWith(URL_PATH_SEPARATOR))\n p = p.substring(1);\n\n return root_url + p;\n }",
"private String getOutputFolder(String path){\n\n //Remove the portion of the path which is prior to our repositories file path\n path = StringUtils.removeStart(FilenameUtils.getFullPath(path), REPOSITORY_LOCATION);\n //Return the path without leading and ending / and ensures the file path uses forward slashes instead of backslashes\n return StringUtils.strip(StringUtils.strip(path,\"/\"),\"\\\\\").replace(\"\\\\\", \"/\");\n }",
"private String getFullPath()\n\t{\n\t\tif (libraryName.equals(\"\"))\n\t\t{\n\t\t\treturn fileName;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn libraryName + \"/\" + fileName;\n\t\t}\n\t}",
"public String getProjectRelativeFileName(URI resourceURI, IFileSystemAccess fsa) {\r\n\t\t// @see http://www.eclipse.org/forums/index.php/m/1230878/#msg_1230878\r\n\t\tif (!resourceURI.isPlatformResource())\r\n\t\t\tthrow new IllegalArgumentException(\"Not a Platform Resource URI: \" + resourceURI.toString());\r\n\t\t// This is bit of a hack, but it works...\r\n\t\tString sURI = resourceURI.toPlatformString(true);\r\n\t\tString withoutProject = sURI.substring(sURI.indexOf('/', 1) + 1);\r\n\t\treturn withoutProject;\r\n\t\t// Something like this may be a better use of the API, but is much more difficult to unit test in EFactoryJSONGeneratorTest, so not pursued: \r\n\t\t// URI projectRootURI = ((IFileSystemAccessExtension2)fsa).getURI(\".\");\r\n\t\t// URI resourceWithoutProjectURI = resourceURI.deresolve(projectRootURI);\r\n\t\t// return resourceWithoutProjectURI.toString();\r\n\t}",
"private String solutionPath(State goal)\n\t{\n\t\t// TODO \n\t\t\n\t\treturn null; \n\t}",
"@Override\n\t\tpublic List<String> getPathTo(InJarResourceImpl resource) {\n\t\t\t// TODO FD4SG la ligne ci-dessous est vraiment bizarre (getChildren renvoie une liste de RepositoryFolder alors que resource est\n\t\t\t// une ressource\n\t\t\tif (!getRootFolder().getChildren().contains(resource)) {\n\t\t\t\tList<String> pathTo = new ArrayList<>();\n\t\t\t\tStringTokenizer string = new StringTokenizer(/*resource.getURI()*/resource.getEntry().getName(),\n\t\t\t\t\t\tCharacter.toString(ClasspathResourceLocatorImpl.PATH_SEP.toCharArray()[0]));\n\t\t\t\twhile (string.hasMoreTokens()) {\n\t\t\t\t\tString next = string.nextToken();\n\t\t\t\t\tif (string.hasMoreTokens()) {\n\t\t\t\t\t\tpathTo.add(next);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn pathTo;\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"private String getRelativePath(Path reference, Path child) {\n String output;\n String sval = child.toString(); \n final int index = sval.indexOf(reference.toString());\n if(index != -1) {\n output = sval.substring(index);\n }else{\n output = null;\n }\nLog.getInstance().log(Level.FINER, \"Path: {0}, relative: {1}\", this.getClass(), child, output); \n return output;\n }",
"@Override\n\tpublic String resolve(EObject from) {\n\t\tString resolvename = super.resolve(from);\n\t\tif (null == resolvename) {\n\t\t\treturn resolvename;\n\t\t}\n\t\t\n\t\tif (!resolvename.endsWith(\".sats\") && !resolvename.endsWith(\".dats\")) {\n\t\t\t// todo didn't check whether path is valid\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// System.out.println(\"resolve: \" + resolvename);\n\t\t\n\t\tResource resource = from.eResource();\n\t\tURI importUri = URI.createURI(resolvename);\n\t\t// is already valid uri\n\t\tif (EcoreUtil2.isValidUri(resource, importUri)) {\n\t\t\treturn resolvename;\n\t\t}\n\n\t\t// get the name of the project\n\t\tString projname = null;\n\t\tString path = from.eResource().getURI().toString();\n\t\tfinal String platform = \"platform:/resource/\";\n\t\t// final String filesys = \"file://\";\n\t\tif (path.startsWith(platform)) {\n\t\t\tprojname = path.substring(platform.length()).split(\"/\")[0];\n\t\t\t// System.out.println(\"projname is \" + projname);\n\t\t resolvename = platform + projname + \"/\" + resolvename;\n\t\t}\n\n\t\treturn resolvename;\n\n\t}",
"@Test\n public void testMakeAbsolute() {\n System.out.println(\"makeAbsolute\");\n Setting sr = Setting.factory(\"relative\", Setting.SETTING_TYPE.TPATH, Paths.get(\"relPath\"));\n Setting sh = Setting.factory(\"home\", Setting.SETTING_TYPE.THOMEDIR, Paths.get(\"c:\\\\\"));\n final Object sro = sr.getValue();\n assert (sro instanceof Path);\n final Object sho = sh.getValue();\n assert (sho instanceof Path);\n\n Path srp = (Path) sro;\n Path shp = (Path) sho;\n\n String srps = srp.toString();\n String shps = shp.toString();\n assertEquals(\"relPath\", srps);\n assertEquals(\"c:\\\\\", shps);\n\n Path expResult = Paths.get(\"c:\\\\\", \"relPath\");\n Path result = Setting.makeAbsolute(srp);\n assertEquals(expResult, result);\n\n }",
"public VRL resolvePathVRL(String path) throws VRLSyntaxException\n\t{\n\t\treturn getLocation().resolvePath(path); \n\t}",
"protected static String getObjectPath(URI resource) {\n String objectPath = resource.getPath().isEmpty() ? \"/\" : resource.getPath();\n return String.format(\"%s%s\", resource.getAuthority(),\n objectPath.charAt(0) == '/' ? objectPath : \"/\" + objectPath);\n }",
"public String getPath() {\n String result = \"\";\n Directory curDir = this;\n // Keep looping while the current directories parent exists\n while (curDir.parent != null) {\n // Create the full path string based on the name\n result = curDir.getName() + \"/\" + result;\n curDir = (Directory) curDir.getParent();\n }\n // Return the full string\n result = \"/#/\" + result;\n return result;\n }",
"public FilePath resolve(FilePath relPath) {\n return resolve(relPath.toString());\n }",
"private static String returnDiretorioPai(Path a){\n return a.getParent().toString();\n }",
"public static String path(String link) {\n\n if(Strings.isNullOrEmpty(link)) {\n return \"\";\n }\n\n boolean relative = false;\n if(!link.contains(\"://\")) {\n if(!link.startsWith(\"/\")) {\n link = \"/\" + link;\n relative = true;\n }\n link = \"https://broken.com\" + link;\n }\n\n try {\n return !relative ? new URI(link).getPath() : new URI(link).getPath().substring(1);\n } catch(URISyntaxException ue) {\n return \"\";\n }\n }",
"public Path tipPathtoRelPath(Path tipPath) {\n\t\tPath absPath = tipPathToAbsPath(tipPath);\n\t\tPath relPath = path.relativize(absPath);\n\t\treturn relPath;\n\t}",
"public Path getPath();",
"private String makePathAbsolute(String pathString, IPath root) {\n IPath path = new Path(pathString.trim());\n if (!path.isEmpty() && !path.isAbsolute()) {\n IPath filePath = root.append(path);\n return filePath.toOSString();\n }\n return path.toOSString();\n }",
"private String formatRootPathForDisplay(File root) {\n\t\t\tString s = root.getPath();\n\t\t\treturn s.length() > 1 && s.endsWith(\"\\\\\") ? s.substring(0, s.length() - 1) : s;\n\t\t}",
"public Location getNeighbouringPath(String enteredPath) {\r\n\t\t\treturn this.getPlayer().getCurrentLocation().getPaths().get(enteredPath);\r\n\t\t}",
"private static String normalizePathString(String path) {\n String noUnion = removePrefix(path, \"union:/\");\n // Remove scheme marker\n String noScheme = removeAndBefore(noUnion, \"//\");\n // Remove '%2370!' that forge has, example:\n // union:/C:/Users/natan/.gradle/caches/fabric-loom/1.17.1/net.fabricmc.yarn.1_17_1.1.17.1+build.61-v2-forge-1.17.1-37.0.69/forge-1.17.1-37.0.69-minecraft-mapped.jar%2371!\n // We use 'removeLastPercentSymbol' instead of removing everything after last occurrence of '%' so it works with spaces as well\n // (the last space will be 'deleted', but that doesn't matter for our purposes)\n String noPercent = removeLastPercentSymbol(noScheme);\n // Remove trailing '/' and '!'\n return removeSuffix(removeSuffix(noPercent, \"/\"), \"!\");\n }",
"public String getPath();",
"public String getPath();",
"public String getPath();",
"public static String normalizePath(String path)\r\n {\r\n StringBuilder result = new StringBuilder();\r\n char nextChar;\r\n for(int i = 0; i < path.length(); i++)\r\n {\r\n nextChar = path.charAt(i);\r\n if((nextChar == '\\\\'))\r\n {\r\n // Convert the Windows style path separator to the standard path separator\r\n result.append('/');\r\n }\r\n else\r\n {\r\n result.append(nextChar);\r\n }\r\n }\r\n \r\n return result.toString();\r\n }",
"public String simplifyPath2(String path) {\n\t\tString[] strs = path.split(\"/\");\n\t\tLinkedList<String> l = new LinkedList<String>();\n\n\t\tfor (String s : strs) {\n\t\t\tif (s.equals(\"..\")) {\n\t\t\t\tif (!l.isEmpty())\n\t\t\t\t\tl.removeLast();\n\t\t\t} else if (s.equals(\"\") || s.equals(\".\"))\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\tl.addLast(s);\n\n\t\t}\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (String s : l) {\n\t\t\tsb.append('/');\n\t\t\tsb.append(s);\n\t\t}\n\t\tif (l.size() == 0)\n\t\t\tsb.append('/');\n\t\treturn sb.toString();\n\t}",
"public RMPath convertPathFromShape(RMPath aPath, RMShape aShape)\n{\n RMTransform transform = getTransformFromShape(aShape);\n if(!transform.isIdentity()) { aPath = aPath.clone(); aPath.transformBy(transform); }\n return aPath;\n}",
"CtPath getPath();",
"public String simplifyPath(String path) {\n String[] s = path.split(\"/\");\n StringBuilder sb = new StringBuilder(\"/\");\n for(String S:s){\n if(S.equals(\"\")||S.equals(\".\")){\n continue;\n }\n else if(S.equals(\"..\")){\n if(sb.charAt(sb.length()-1) != '/')\n {\n sb.deleteCharAt(sb.length()-1);\n }\n else{\n sb.delete(sb.length()-2, sb.length()-1);\n }\n\n }\n else{\n sb.append(S);\n sb.append('/');\n }\n }\n sb.deleteCharAt(sb.length()-1);\n return sb.toString();\n }",
"public RMPath convertPathToShape(RMPath aPath, RMShape aShape)\n{\n RMTransform transform = getTransformToShape(aShape);\n if(!transform.isIdentity()) { aPath = aPath.clone(); aPath.transformBy(transform); }\n return aPath;\n}",
"public static void main(String[] args) {\n Path currentDir = Paths.get(\".\");\n System.out.println(currentDir.toAbsolutePath());\n Path parentDir = Paths.get(\"..\");\n System.out.println(parentDir.toAbsolutePath());\n Path currentDir2 = Paths.get(\"d:\\\\data\\\\projects\\\\.\\\\a-project\");\n System.out.println(currentDir2);\n String path = \"d:\\\\data\\\\projects\\\\a-project\\\\..\\\\another-project\";\n Path parentDir2 = Paths.get(path);\n System.out.println(parentDir2);\n\n String originalPath =\n \"d:\\\\data\\\\projects\\\\a-project\\\\..\\\\another-project\";\n\n Path path1 = Paths.get(originalPath);\n System.out.println(\"path1 = \" + path1);\n\n Path path2 = path1.normalize();\n System.out.println(\"path2 = \" + path2);\n }",
"public static String getPath() {\n\t\t// Lấy đường dẫn link\n\t\tAuthentication auth1 = SecurityContextHolder.getContext().getAuthentication();\n\t\tAgentconnection cus = (Agentconnection) auth1.getPrincipal();\n\t\t \n\t\t//String PATH_STRING_REAL = fileStorageProperties.getUploadDir()+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t String PATH_STRING_REAL = \"E:/ezcloud/upload/\"+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t return PATH_STRING_REAL;\n\t}",
"public String getRelativePath();",
"protected String getRelativePath(Path path) {\n\t\treturn baseFolderUri.relativize(path.toUri()).toString();\n\t}",
"public Path getPathToWorkspaceFolder() {\n return pathToWorkspaceFolder;\n }",
"private static String getFullPath(String pathname) {\n String fullPath = null;\n\n // make sure the path starts with a slash\n if (pathname.startsWith(\"/\"))\n fullPath = pathname;\n else\n fullPath = process.getDir() + \"/\" + pathname;\n return fullPath;\n }",
"public static void main(String... args) {\nPath path = Paths.get(\".\");\ntry {\n out.println(path.normalize());\n} catch(IOException e){out.println(e);}\n\ntry {\n out.println(path.toRealPath());\n} catch(IOException e){out.println(e);}\n\n}",
"public abstract String getPath();",
"public abstract String getPath();",
"public ArrayList<String> shortenPath(ArrayList<String> path){\n int currentX = testFunction.startingX;\n int currentY = testFunction.startingY;\n ArrayList<ArrayList<Integer>> board = testFunction.board;\n for (int i = 0; i < path.size(); i++) {\n if(path.get(i).equals(\"U\")) currentY++;\n if(path.get(i).equals(\"D\")) currentY--;\n if(path.get(i).equals(\"L\")) currentX--;\n if(path.get(i).equals(\"R\")) currentX++;\n if(currentX < board.size() && currentY < board.get(0).size() && currentX >= 0 && currentY >= 0) {\n if (board.get(currentX).get(currentY) == 8) {\n ArrayList<String> shortPath = new ArrayList<>();\n for (int j = 0; j <= i; j++) {\n shortPath.add(path.get(j));\n }\n return shortPath;\n }\n }\n }\n return path;\n }",
"public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }",
"public String getPath(String from, String to, String pathAlgo);",
"Path getRootPath();",
"public String remotePath(String pathOrGAV) {\n\t\tif (Archive.isValid(pathOrGAV)) {\n\t\t\treturn Archive.valueOf(pathOrGAV).remotePath;\n\t\t}\n\t\treturn pathOrGAV;\n\t}",
"@Override\n public List<String> pathFromDisambiguation(ResolvedTime now) {\n return now.toHierarchy();\n }",
"@JsonIgnore\n\tpublic String getAbsoluteURI() {\n\t\treturn path.toUri().toString();\n\t}",
"public String simplifyPath(String path) {\n String resString=\"\";\n String[] steRes=path.split(\"/|\\\\.\");\n if (steRes.length==0)\n return \"/\";\n return '/'+steRes[steRes.length-1];\n }",
"static String localPath(String name) {\n\t\tchar c = File.separatorChar;\n\t\treturn name.replace((char) (c ^ '/' ^ '\\\\'), c);\n\t}"
] |
[
"0.6104972",
"0.60416",
"0.5838979",
"0.5778081",
"0.5775615",
"0.57148266",
"0.5701763",
"0.5688448",
"0.5614072",
"0.55846727",
"0.5580416",
"0.5571331",
"0.5567523",
"0.5556715",
"0.5556705",
"0.5511602",
"0.5490028",
"0.5473625",
"0.5467969",
"0.54641557",
"0.54237294",
"0.54211026",
"0.5409311",
"0.5408396",
"0.53984684",
"0.5380534",
"0.53698844",
"0.5366795",
"0.53363544",
"0.5311306",
"0.5301589",
"0.529281",
"0.52781624",
"0.52633214",
"0.52491826",
"0.52481186",
"0.52481186",
"0.52481186",
"0.52481186",
"0.52481186",
"0.52295923",
"0.522749",
"0.5222013",
"0.5215165",
"0.5198471",
"0.51983774",
"0.5190536",
"0.5179255",
"0.5159931",
"0.51324534",
"0.51234674",
"0.5102713",
"0.51018614",
"0.5100636",
"0.5100431",
"0.5090935",
"0.508945",
"0.5087558",
"0.50848454",
"0.50794077",
"0.5064879",
"0.50485814",
"0.5039127",
"0.50355476",
"0.5033694",
"0.5029218",
"0.50262237",
"0.5020986",
"0.50025445",
"0.49926558",
"0.49901983",
"0.49766484",
"0.4973035",
"0.49684292",
"0.49684292",
"0.49684292",
"0.49490842",
"0.49471483",
"0.49457946",
"0.49452925",
"0.49439985",
"0.49429595",
"0.49297503",
"0.49260944",
"0.49213737",
"0.49077922",
"0.48929936",
"0.48908967",
"0.48810518",
"0.4879996",
"0.4879996",
"0.48799086",
"0.48611847",
"0.4856927",
"0.48560697",
"0.48500532",
"0.48474747",
"0.48419005",
"0.4837391",
"0.48144266"
] |
0.6276491
|
0
|
Variant of routine that works with caseinsensitive matching.
|
public static int matchingFirstSegments(IPath my, IPath anotherPath) {
if (my == null || anotherPath == null)
return 0;
int anotherPathLen = anotherPath.segmentCount();
int max = Math.min(my.segmentCount(), anotherPathLen);
int count = 0;
for (int i = 0; i < max; i++) {
if (!my.segment(i).equalsIgnoreCase(anotherPath.segment(i))) {
return count;
}
count++;
}
return count;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"String getCaseSensitive();",
"boolean isCaseInsensitive();",
"int getCaseSensitive();",
"private static boolean equalsIgnoreCase(String inputOfCustomer) {\n\t\treturn false;\n\t}",
"private boolean startsWithIgnoreCase(String str1, String str2) {\n return str1 != null && str2 != null && str1.toUpperCase().startsWith(str2.toUpperCase());\n }",
"public boolean equalsIgnoreCase(String anotherString) {\n/* 225 */ return this.m_str.equalsIgnoreCase(anotherString);\n/* */ }",
"public ICase retourneLaCase() ;",
"@In Boolean caseSensitive();",
"public static FieldMatcher ignoreCase() {\n return (columnName, recordOneField, recordTwoField) -> {\n //we do not want to do a case-insensitive comparison for the key and for case-sensitive columns\n if (!caseSensitiveColumns.contains(columnName) && !columnName.equals(keyColumn)) {\n return recordOneField.equalsIgnoreCase(recordTwoField);\n } else {\n return recordOneField.equals(recordTwoField);\n }\n };\n }",
"private boolean searchCondition(String searched, String actual) {\n return actual.toLowerCase().contains(searched.toLowerCase());\n }",
"List<Item> findByNameContainingIgnoreCase(String name);",
"public void testCompareIgnoreCase() {\n\t\tString one = \"hello\";\n\t\tString two = \"In the house\";\n\t\t//h vor i\n\t\tassertTrue(comp.compareStrings(one, two) > 0);\n\t\tassertEquals(0, comp.compareStrings(one, one));\n\t\tassertTrue(comp.compareStrings(two, one) < 0);\n\t}",
"public String ignoreCase(String in)\n {\n return in;\n }",
"public static String matchCase(String match, String word, boolean caps, boolean capsLock) {\n \tif(match == null || match.equals(\"\")) {\n \t\t// No string to match. Use caps flags instead.\n \t\tif(capsLock)\n \t\t\treturn word.toUpperCase();\n \t\telse if(caps)\n \t\t\treturn capFirstChar(word);\n \t\telse\n \t\t\treturn word;\n \t}\n\n \tif(isAllCaps(match))\n \t{\n \t\tif(match.length() == 1)\n \t\t\treturn capFirstChar(word);\n \t\telse\n \t\t\t// User is typing in all-caps\n \t\t\treturn word.toUpperCase();\n \t}\n\n \tif(isAllCaps(word))\n \t\t// Suggestion is in all-caps. Do nothing.\n \t\treturn word;\n\n \tif(isMixedCase(word))\n \t\t// Suggestion is in mixed case. Do nothing.\n \t\treturn word;\n\n \tif(isCapitalized(match))\n \t\t// First letter is caps.\n \t\treturn capFirstChar(word);\n\n \t// If word is in lower case or MiXeD CaPs, do nothing\n \treturn word;\n }",
"@Override\r\n\t\t\tpublic boolean test(String t, String u) {\n\t\t\t\t return t.equalsIgnoreCase(u);\r\n\t\t\t}",
"static int indexOf(String src, String sub, int start, boolean caseSensitive) {\n if (caseSensitive) {\n int pos = src.indexOf(sub, start);\n return pos;\n } else {\n for (int pos=start; pos<=src.length()-sub.length(); ++pos) {\n boolean match = true;\n for (int i=0; i<sub.length(); ++i) {\n if (Character.toLowerCase(src.charAt(pos+i))!=Character.toLowerCase(sub.charAt(i))) {\n match = false;\n break;\n }\n }\n if (match)\n return pos;\n }\n return -1;\n }\n }",
"List<Student> findByNameContainingIgnoringCase(String name);",
"public abstract boolean containsUppercaseLetters(String str);",
"@SuppressWarnings(\"squid:S1067\")\n Predicate<GenomePath> getSubstringPredicate(final String query, final boolean matchCase) {\n return genomePath -> query == null\n || query.length() == 0\n || genomePath.getName().toLowerCase(Locale.US).contains(query.toLowerCase(Locale.US)) && !matchCase\n || genomePath.getName().contains(query);\n }",
"private boolean contains(String key, String word, boolean caseSensitive) {\n\t\tint keyLen = key.length();\n\n\t\tif (caseSensitive) {\n\t\t\tfor (int i = 0; i <= word.length() - keyLen; i++) {\n\t\t\t\tif (word.substring(i, i + keyLen).equals(key)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (int i = 0; i <= word.length() - keyLen; i++) {\n\t\t\t\tif (word.substring(i, i + keyLen).equalsIgnoreCase(key)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public static boolean startsWithIgnoreCase(CharSequence target, CharSequence start) {\n int targetLength = target.length();\n int startLength = start.length();\n if (startLength > targetLength) {\n return false;\n }\n if (Character.toLowerCase(target.charAt(startLength - 1)) != Character.toLowerCase(start.charAt(startLength - 1))) {\n return false;\n }\n for (int i = 0; i < startLength; i++) {\n if (start.charAt(i) != target.charAt(i) && Character.toLowerCase(start.charAt(i)) != target.charAt(i) && Character.toUpperCase(start.charAt(i)) != target.charAt(i)) {\n return false;\n }\n }\n return true;\n }",
"public static boolean contentEqualsIgnoreCase(CharSequence a, CharSequence b) {\n int len = a.length();\n if (b.length() != len) {\n return false;\n }\n return biIterate(a, (index, ch, l, remaining) -> {\n boolean match = Character.toLowerCase(ch) == Character.toLowerCase(b.charAt(index));\n return !match ? BiIterateResult.NO : BiIterateResult.MAYBE;\n }).isOk();\n }",
"public static boolean startsWithIgnoreCase(String string1, String string2) {\n // this could be optimized, but anyway it doesn't seem to be a performance killer\n return string1.toUpperCase().startsWith(string2.toUpperCase());\n }",
"List<City> findByNameIgnoringCase(String cityName);",
"static int safeIndexOf(String src, String sub, int start, boolean caseSensitive) throws UnexpectedFormatException {\n if (caseSensitive) {\n int pos = src.indexOf(sub, start);\n if (pos<0)\n throw new UnexpectedFormatException();\n return pos;\n } else {\n for (int pos=start; pos<=src.length()-sub.length(); ++pos) {\n boolean match = true;\n for (int i=0; i<sub.length(); ++i) {\n if (Character.toLowerCase(src.charAt(pos+i))!=Character.toLowerCase(sub.charAt(i))) {\n match = false;\n break;\n }\n }\n if (match)\n return pos;\n }\n throw new UnexpectedFormatException();\n }\n }",
"public int compareToIgnoreCase(XMLString str) {\n/* 265 */ return this.m_str.compareToIgnoreCase(str.toString());\n/* */ }",
"public static List<String> getMatches(String value, Collection<String> list, boolean caseInsensitive) {\n List<String> result = new LinkedList<>();\n\n for (String str : list) {\n if (str.startsWith(value.toLowerCase())\n || (caseInsensitive && str.toLowerCase().startsWith(value.toLowerCase()))) {\n result.add(str);\n }\n }\n\n return result;\n }",
"private static boolean findKeyWord(String str, String kw, boolean caseSensitive) {\r\n\t\t\r\n\t\tif(str.isEmpty() || kw.isEmpty()) {\r\n\t\t\tSystem.out.println(\"One of your input lines was blank. Returning false.\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif(str.length() < kw.length()) {\r\n\t\t\tSystem.out.println(\"KW longer than str. Returning false.\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif(!caseSensitive) {\r\n\t\t\tif(str.contains(kw)) {\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tString str1 = str.toLowerCase();\r\n\t\t\tString kw1 = str.toLowerCase();\r\n\t\t\tif(str1.contains(kw1)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\t\r\n\t\treturn false;\r\n\t}",
"public boolean areStringComparisonsCaseInsensitive() {\n \t\treturn false;\n \t}",
"static private boolean findIgnoreCase(String[] strings,\n\t\t\tString requiredString) {\n\t\tfor (String string : strings) {\n\t\t\tif (string.equalsIgnoreCase(requiredString))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean getIgnoreCase() {\n\treturn ignoreCase;\n }",
"public String getCaseInsensitiveLike(){\n \t\treturn \"like\";\n \t}",
"public static int indexOf(String big, String small, int start, boolean forward, boolean caseSensitive) {\n int len = big.length(), slen = small.length();\n if (slen == 0)\n return -1;\n while (start >= 0 && start < len) {\n for (int i = 0;; i++) {\n if (i >= slen)\n return start;\n if (start + i >= len)\n break;\n int b = big.charAt(start + i), s = small.charAt(i);\n if (!caseSensitive && b >= 'A' && b <= 'Z')\n b = (b - 'A') + 'a';\n if (!caseSensitive && s >= 'A' && s <= 'Z')\n s = (s - 'A') + 'a';\n if (b != s)\n break;\n }\n if (forward)\n start++;\n else\n start--;\n }\n return -1;\n }",
"@Override\n\tpublic boolean isCaseSensitive(int arg0) throws SQLException {\n\t\treturn false;\n\t}",
"public static boolean beginsWithCapital( String w ) \r\n { String t = w.substring(0,1);\r\n\treturn t.toUpperCase().equals(t);\r\n }",
"public void searchEither(String search)\n {\n // Sets the input to be all lower case\n search = search.toLowerCase();\n r.searchEither(search);\n }",
"public static boolean isEqualIgnoreCase(String str1, String str2) {\n\treturn (null == str1 && null == str2) || (null != str1 && null != str2 && str1.toUpperCase().trim().equals(str2.toUpperCase().trim()));\n }",
"protected boolean normalizeContains(String str, String substring) {\n\t\tif (str == null || substring == null) {\n\t\t\treturn false;\n\t\t}\n\t\tint index = normalizeAndLowercase(str).indexOf(normalizeAndLowercase(substring));\n\t\treturn index >= 0;\n\t}",
"public static boolean equalsIgnoreCase(String str1, String str2) {\n return StringUtils.equalsIgnoreCase(str1, str2);\n }",
"public static boolean isMatch(Boolean ignoreAccents, String originalString, String userInput){\n Log.d(TAG, \"isMatch: Orig:[\"+originalString+\"] Input:[\"+userInput+\"]\");\n final Collator instance = Collator.getInstance();\n\n instance.setStrength(ignoreAccents?Collator.NO_DECOMPOSITION:Collator.IDENTICAL);\n // Zero is a match\n int comp = instance.compare(originalString.toLowerCase(), userInput.toLowerCase());\n return (comp==0);\n }",
"public static void main(String[] args) {\nString s = \"HElLo WoRlD WelCOMe To JaVa\";\nSystem.out.println(s.toLowerCase());\n\t}",
"public static boolean matchExactIgnoreCase(String word1, String word2) {\n return word1.equalsIgnoreCase(word2);\n }",
"public static Comparator<CharSequence> charSequenceComparator(boolean caseInsensitive) {\n return caseInsensitive ? CharSequenceComparator.INSENSITIVE : CharSequenceComparator.SENSITIVE;\n }",
"protected abstract boolean matches(String paramString, int paramInt);",
"public boolean checkLowerCase(String password) {\n return password.matches(\".*[a-z].*\");\n }",
"int lower();",
"public static boolean isCaseSensitive(String fieldPropAltName) {\n\t\t// both-sensitive or diacritics-insensitive\n\t\treturn fieldPropAltName.endsWith(ALT_SEP + \"s\") || fieldPropAltName.endsWith(ALT_SEP + \"di\");\n\t}",
"public XMLString toLowerCase() {\n/* 702 */ return new XMLStringDefault(this.m_str.toLowerCase());\n/* */ }",
"protected static boolean match( String pattern, String str, boolean isCaseSensitive )\n {\n char[] patArr = pattern.toCharArray();\n char[] strArr = str.toCharArray();\n int patIdxStart = 0;\n int patIdxEnd = patArr.length - 1;\n int strIdxStart = 0;\n int strIdxEnd = strArr.length - 1;\n char ch;\n\n boolean containsStar = false;\n for( int i = 0; i < patArr.length; i++ )\n {\n if( patArr[ i ] == '*' )\n {\n containsStar = true;\n break;\n }\n }\n\n if( !containsStar )\n {\n // No '*'s, so we make a shortcut\n if( patIdxEnd != strIdxEnd )\n {\n return false;// Pattern and string do not have the same size\n }\n for( int i = 0; i <= patIdxEnd; i++ )\n {\n ch = patArr[ i ];\n if( ch != '?' )\n {\n if( isCaseSensitive && ch != strArr[ i ] )\n {\n return false;// Character mismatch\n }\n if( !isCaseSensitive && Character.toUpperCase( ch ) !=\n Character.toUpperCase( strArr[ i ] ) )\n {\n return false;// Character mismatch\n }\n }\n }\n return true;// String matches against pattern\n }\n\n if( patIdxEnd == 0 )\n {\n return true;// Pattern contains only '*', which matches anything\n }\n\n // Process characters before first star\n while( ( ch = patArr[ patIdxStart ] ) != '*' && strIdxStart <= strIdxEnd )\n {\n if( ch != '?' )\n {\n if( isCaseSensitive && ch != strArr[ strIdxStart ] )\n {\n return false;// Character mismatch\n }\n if( !isCaseSensitive && Character.toUpperCase( ch ) !=\n Character.toUpperCase( strArr[ strIdxStart ] ) )\n {\n return false;// Character mismatch\n }\n }\n patIdxStart++;\n strIdxStart++;\n }\n if( strIdxStart > strIdxEnd )\n {\n // All characters in the string are used. Check if only '*'s are\n // left in the pattern. If so, we succeeded. Otherwise failure.\n for( int i = patIdxStart; i <= patIdxEnd; i++ )\n {\n if( patArr[ i ] != '*' )\n {\n return false;\n }\n }\n return true;\n }\n\n // Process characters after last star\n while( ( ch = patArr[ patIdxEnd ] ) != '*' && strIdxStart <= strIdxEnd )\n {\n if( ch != '?' )\n {\n if( isCaseSensitive && ch != strArr[ strIdxEnd ] )\n {\n return false;// Character mismatch\n }\n if( !isCaseSensitive && Character.toUpperCase( ch ) !=\n Character.toUpperCase( strArr[ strIdxEnd ] ) )\n {\n return false;// Character mismatch\n }\n }\n patIdxEnd--;\n strIdxEnd--;\n }\n if( strIdxStart > strIdxEnd )\n {\n // All characters in the string are used. Check if only '*'s are\n // left in the pattern. If so, we succeeded. Otherwise failure.\n for( int i = patIdxStart; i <= patIdxEnd; i++ )\n {\n if( patArr[ i ] != '*' )\n {\n return false;\n }\n }\n return true;\n }\n\n // process pattern between stars. padIdxStart and patIdxEnd point\n // always to a '*'.\n while( patIdxStart != patIdxEnd && strIdxStart <= strIdxEnd )\n {\n int patIdxTmp = -1;\n for( int i = patIdxStart + 1; i <= patIdxEnd; i++ )\n {\n if( patArr[ i ] == '*' )\n {\n patIdxTmp = i;\n break;\n }\n }\n if( patIdxTmp == patIdxStart + 1 )\n {\n // Two stars next to each other, skip the first one.\n patIdxStart++;\n continue;\n }\n // Find the pattern between padIdxStart & padIdxTmp in str between\n // strIdxStart & strIdxEnd\n int patLength = ( patIdxTmp - patIdxStart - 1 );\n int strLength = ( strIdxEnd - strIdxStart + 1 );\n int foundIdx = -1;\n strLoop :\n for( int i = 0; i <= strLength - patLength; i++ )\n {\n for( int j = 0; j < patLength; j++ )\n {\n ch = patArr[ patIdxStart + j + 1 ];\n if( ch != '?' )\n {\n if( isCaseSensitive && ch != strArr[ strIdxStart + i + j ] )\n {\n continue strLoop;\n }\n if( !isCaseSensitive && Character.toUpperCase( ch ) !=\n Character.toUpperCase( strArr[ strIdxStart + i + j ] ) )\n {\n continue strLoop;\n }\n }\n }\n\n foundIdx = strIdxStart + i;\n break;\n }\n\n if( foundIdx == -1 )\n {\n return false;\n }\n\n patIdxStart = patIdxTmp;\n strIdxStart = foundIdx + patLength;\n }\n\n // All characters in the string are used. Check if only '*'s are left\n // in the pattern. If so, we succeeded. Otherwise failure.\n for( int i = patIdxStart; i <= patIdxEnd; i++ )\n {\n if( patArr[ i ] != '*' )\n {\n return false;\n }\n }\n return true;\n }",
"public void assertTextPresentIgnoreCase(String expected, String actual) {\n assertTextPresent(expected.toLowerCase(), actual.toLowerCase());\n }",
"@Test\r\n public void testAssessCase() throws Exception{\r\n System.out.println(\"assessCase\");\r\n Case aCase = new StringCase(\"abc123\");\r\n RuleSetImpl instance = new RuleSetImpl(\"Test\", true);\r\n instance.addRule(new RegExRule(\".*\", \"string\"));\r\n instance.addRule(new RegExRule(\"a.*\", \"aString\"));\r\n Opinion result = instance.assessCase(aCase, null, \"Test\", RuleSet.ALWAYSPERSIST, null, null, null, false);\r\n assertTrue(result.getLabel().contains(\"string\"));\r\n assertTrue(result.getLabel().contains(\"aString\"));\r\n System.out.println(result.getEnrichedCase(\"Test\", aCase, false, null));\r\n assertTrue(result.getEnrichedCase(\"Test\", aCase, false, null).contains(\"Test\"));\r\n }",
"public boolean isIgnoreCase() {\n return this.ignoreCase;\n }",
"private boolean m50391c(String str) {\n for (String equalsIgnoreCase : this.f30705A0) {\n if (str.equalsIgnoreCase(equalsIgnoreCase)) {\n return true;\n }\n }\n return false;\n }",
"private static String cup(String str) {\n\t\treturn str.substring(0,1).toLowerCase() + str.substring(1); \n\t}",
"public boolean match(String str){\n if(this.name.equalsIgnoreCase(str))\n return true; \n return false;\n }",
"private boolean myContains(String str2, String search2) {\n if (search2.length() == 0) {\n return true;\n }\n int k = 0;\n int f = 0;\n String str = str2.toLowerCase();\n String search = search2.toLowerCase();\n for (int i = 0; i < str.length(); i++) {\n if (str.charAt(i) == search.charAt(k)) {\n k += 1;\n f += 1;\n if (f == search.length()) {\n return true;\n }\n } else {\n k = 0;\n f = 0;\n }\n }\n return false;\n }",
"public static boolean containsCaseInsensitive(char lookFor, CharSequence in) {\n char lookFor1 = Character.toLowerCase(lookFor);\n char lookFor2 = Character.toUpperCase(lookFor);\n return biIterate(in, (index, ch, len, remaining) -> {\n if (ch == lookFor1 || ch == lookFor2) {\n return BiIterateResult.YES;\n }\n return BiIterateResult.MAYBE;\n }).isSuccess();\n }",
"static String abbreviation(String a, String b) {\r\n \r\n HashSet<Character> aSet = new HashSet<>();\r\n\r\n for(int i = 0 ; i< a.length() ; i++){\r\n aSet.add(a.charAt(i));\r\n }\r\n \r\n for(int i = 0 ; i < b.length() ; i++){\r\n \r\n if(aSet.contains(b.charAt(i)) ){\r\n aSet.remove(b.charAt(i));\r\n }\r\n else if(aSet.contains(Character.toLowerCase(b.charAt(i)))){\r\n aSet.remove(Character.toLowerCase(b.charAt(i)));\r\n }\r\n else{\r\n return \"NO\";\r\n }\r\n \r\n\r\n }\r\n\r\n Iterator<Character> it = aSet.iterator();\r\n while(it.hasNext()){\r\n\r\n if(!isLowerCase(it.next())){\r\n return \"NO\";\r\n }\r\n }\r\n return \"YES\";\r\n \r\n /*\r\n String regex = \"\";\r\n for(int i = 0 ; i < b.length() ; i++){\r\n regex += \"[a-z]*\" + \"[\" + b.charAt(i) + \"|\" + Character.toLowerCase(b.charAt(i)) + \"]\";\r\n }\r\n regex += \"[a-z]*\";\r\n Pattern ptrn = Pattern.compile(regex);\r\n Matcher matcher = ptrn.matcher(a);\r\n\r\n return matcher.matches() ? \"YES\" : \"NO\";\r\n*/\r\n \r\n /*\r\n int aPtr = 0;\r\n\r\n //b e F g H\r\n // E F H\r\n for(int i = 0 ; i < b.length() ; i++){\r\n\r\n if(aPtr + 1 >= a.length())\r\n return \"NO\";\r\n //if(aPtr + 1 == a.length() && i + 1 == b.length())\r\n // return \"YES\";\r\n\r\n System.out.println(b.charAt(i) + \" \" + a.charAt(aPtr));\r\n if(b.charAt(i) == a.charAt(aPtr)){\r\n aPtr++;\r\n }else if(b.charAt(i) == Character.toUpperCase(a.charAt(aPtr)) && isLowerCase(a.charAt(aPtr))){\r\n aPtr++;\r\n\r\n } else if(b.charAt(i) != a.charAt(aPtr) && !isLowerCase(a.charAt(aPtr))){\r\n return \"NO\";\r\n }else if(b.charAt(i) != a.charAt(aPtr) && isLowerCase(a.charAt(aPtr))){\r\n aPtr++;\r\n i--;\r\n }\r\n\r\n\r\n\r\n }\r\n for(int i = aPtr ; i < a.length() ; i++){\r\n if(!isLowerCase(a.charAt(i)))\r\n return \"NO\";\r\n }\r\n\r\n return \"YES\";\r\n */\r\n\r\n }",
"@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER})\n SelectorBuilderInterface<SelectorT> containsIgnoreCase(String field, String propertyValue);",
"protected String alterCase(String value) {\n\t\tswitch (getCase()) {\n\t\tcase UPPERCASE:\n\t\t\treturn value.toUpperCase();\n\t\tcase LOWERCASE:\n\t\t\treturn value.toLowerCase();\n\t\tdefault:\n\t\t\treturn value;\n\t\t}\n\t}",
"@Test\n public void testPatter(){\n String str = \"select * from t_user where deletea dropa\";\n str = str.toUpperCase();\n // String re = \"(update|delete|insert|drop|alter)\";\n // String re = \"(update\\\\b)|(delete\\\\b)|(insert)|(drop)|(alter)\";\n // String re = \"\\\\b[(update)|(delete)|(insert)|(drop)|(alter)\\\\b\";\n // System.out.println(str.indexOf(\"updatea\"));\n // System.out.println(\"update\".matches(str));\n // System.out.println(str.matches(re));\n /* System.out.println(re.matches(str));\n String[] ss = str.split(re);\n System.out.println(ss.length);\n for(String s: ss){\n System.out.println(s);\n }*/\n\n String re =\"(\\\\bupdate\\\\b)|(\\\\bdelete\\\\b)|(\\\\binsert\\\\b)|(\\\\bdrop\\\\b)|(\\\\balter\\\\b)\";\n Pattern p = Pattern.compile(re,Pattern.CASE_INSENSITIVE );\n Matcher m = p.matcher(str);\n System.out.println(m.find());\n\n }",
"public boolean detectCapitalUse_regex(String word){\n return word.matches(\"[A-Z]*|.[a-z]*\");\n }",
"public static boolean equalsIgnoreCase(String string1, String string2)\r\n {\r\n return string1 == null ? string2 == null : string1.equalsIgnoreCase(string2);\r\n }",
"@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER, AdsUtility.SELECTOR_FIELD})\n SelectorBuilderInterface<SelectorT> containsIgnoreCase(EntityField field, String propertyValue);",
"public static boolean equalsIgnoreCase(final CharSequence left, final int leftOffset, final int leftLength,\n final CharSequence right, final int rightOffset, final int rightLength) {\n if (leftLength == rightLength) {\n for (int i = 0; i < rightLength; i++) {\n if (toLowerCase(left.charAt(i + leftOffset)) != toLowerCase(right.charAt(i + rightOffset))) {\n return false;\n }\n }\n return true;\n }\n return false;\n }",
"String filter(String text)\n {\n return text.trim().toLowerCase();\n }",
"public boolean match(String word)\n {\n int flags = 0;\n if (ignoreCase)\n {\n flags = flags | Pattern.CASE_INSENSITIVE;\n }\n return Pattern.compile(pattern, flags).matcher(word).find();\n }",
"public boolean isCaseSensitive() {\n\t\treturn false;\n\t}",
"@Test\n\tvoid runRegExUpperCaseText_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"SARGON\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<MatchResponse> response = a.search(\"books/babylon.txt\");\n\t\t\tassertEquals(0, response.size());\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}",
"public String getLowercaseFunction() {\n \t\treturn \"lower\";\n \t}",
"public abstract boolean isSingleCharMatcher();",
"public void test_caselessmatch04() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch04.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = \"matches('K', '[A-Z]', 'i')\";\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }",
"private static boolean matchSearchWord(String word, String matchWord) {\n // The regex is to match words even though they contain special characters.\n // If this wasn't done the function would not match e.g. Java to \"Java\"\n return word.toLowerCase().replaceAll(\"[^a-zA-Z0-9]\", \"\").equals(matchWord.toLowerCase());\n }",
"public static void main(String[] a){\n System.out.println(\"abc\".contains(\"a\"));//Verdadero\n\tSystem.out.println(\"abc\".contains(\"B\")); //Falso\n }",
"public boolean isCaseSensitive() {\n return this.caseSensitive;\n }",
"@org.junit.Test\n\tpublic void testingStringChangeCase() {\n\t\tString result=object.replaceLowerUpperCase(\"Game of Thrones\");\n\t\tassertEquals(\"gAME OF tHRONES\",result );\n\t}",
"private boolean isLowerCase(final String message) {\n\t\treturn message.contains(\"variable should be in lower case\"); //$NON-NLS-1$\n\t}",
"private static String xcase(String s, Function<Character, Character> f) {\n if (s == null || s.length() == 0) {\n return s;\n }\n return f.apply(s.charAt(0)) + (s.length() > 1 ? s.substring(1) : \"\");\n }",
"public StringSearch(String pattern, CharacterIterator target, ULocale locale) {\n/* 177 */ super(null, null); throw new RuntimeException(\"Stub!\");\n/* */ }",
"public T getExactMatch(String arg)\n\t{\n\t\treturn null;\n\t}",
"String searchVowel();",
"public boolean containsCaseInsensitive(String s, List<String> l) {\n\t\tfor (String string : l) {\n\t\t\tif (string.equalsIgnoreCase(s)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public static boolean isEqualIgnoreCase(String str1, String str2, String str3) {\n\treturn isEqualIgnoreCase(str1, str2) || isEqualIgnoreCase(str1, str3);\n }",
"public static boolean stringContains(String targetStr,String testStr,boolean ignoreCase) {\n\t\t\n\t\tint i; //Used in iteration.\n\t\tif(targetStr == null && testStr == null) {\n\t\t\treturn true;\n\t\t}\n\t\t//now that the 'both null' case is taken care of, we can do this:\n\t\tif(targetStr == null || testStr == null) {\n\t\t\treturn false;\n\t\t}\n\t\t//now we know that both strings are not null\n\t\tint targetLen = targetStr.length();\n\t\tint testLen = testStr.length();\n\t\tfor (i = 0; i <= (targetLen - testLen); i++)\n\t\t\tif (targetStr.regionMatches(ignoreCase, i, testStr, 0, testLen)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean match(String str) {\n\t\treturn false;\n\t}",
"public StringSearch(String pattern, CharacterIterator target, Locale locale) {\n/* 158 */ super(null, null); throw new RuntimeException(\"Stub!\");\n/* */ }",
"public static void main(String[] args) {\n\n\n String ad=\"erdogan\";\n String soyad= \"HOZAN\";\n\n System.out.println(\"ad: \"+ ad.toUpperCase());\n System.out.println(\"soyad:\" + soyad.toLowerCase());\n\n }",
"public static boolean equalIgnoreCase(final String a, final String b) {\n boolean result;\n if (a == null) {\n result = b == null;\n } else {\n result = a.equalsIgnoreCase(b);\n }\n return result;\n }",
"private boolean noUpper(String password) {\n return !password.equals(password.toLowerCase());\n }",
"OfBizUser getCaseInsensitive(long directoryId, String userName);",
"private String upperCaseFL(String in) {\n\t\treturn in.substring(0,1).toUpperCase() + in.substring(1,in.length());\n\t}",
"void setCaseSensitive(int value);",
"public boolean getCaseSesitive() {\n\t\treturn this.caseSensitive;\n\t}",
"public XMLString toLowerCase(Locale locale) {\n/* 687 */ return new XMLStringDefault(this.m_str.toLowerCase(locale));\n/* */ }",
"@Override\n\tpublic Set<Person> getfindByNameContainingIgnoreCase(String name) {\n\t\treturn null;\n\t}",
"private String fixupCase(String s) {\r\n boolean nextIsUpper = true;\r\n StringBuffer sb = new StringBuffer();\r\n\r\n for (int i = 0; i < s.length(); i++) {\r\n char c = s.charAt(i);\r\n if (nextIsUpper) {\r\n c = Character.toUpperCase(c);\r\n } else {\r\n c = Character.toLowerCase(c);\r\n }\r\n sb.append(c);\r\n nextIsUpper = Character.isWhitespace(c);\r\n }\r\n return sb.toString();\r\n }",
"protected boolean isAttributeCaseSensitive() {\n return true;\n }",
"public boolean matchesExactName(String exactName) {\r\n\t\treturn matchesExactName(exactName, caseSensitivityMode);\r\n\t}",
"protected boolean normalizeEquals(String str, String substring) {\n\t\tif (str == null || substring == null) {\n\t\t\treturn false;\n\t\t}\n\t\treturn normalizeAndLowercase(str).equals(normalizeAndLowercase(substring));\n\t}",
"public abstract boolean matches(char c);",
"public StringSearch(String pattern, CharacterIterator target, RuleBasedCollator collator) {\n/* 144 */ super(null, null); throw new RuntimeException(\"Stub!\");\n/* */ }"
] |
[
"0.7101637",
"0.6891024",
"0.6717425",
"0.66803277",
"0.6597042",
"0.6577928",
"0.65709966",
"0.6564515",
"0.64880514",
"0.6336553",
"0.6317159",
"0.62787175",
"0.6273134",
"0.62571573",
"0.62471944",
"0.623885",
"0.62178206",
"0.61729664",
"0.61173326",
"0.60240245",
"0.5973553",
"0.5961766",
"0.59465355",
"0.5933012",
"0.59208524",
"0.5920798",
"0.5900032",
"0.5890823",
"0.5874639",
"0.5873879",
"0.5854406",
"0.5852106",
"0.58497614",
"0.58469164",
"0.5840676",
"0.57958764",
"0.5791267",
"0.5768606",
"0.5752945",
"0.57378477",
"0.5734617",
"0.5729151",
"0.57050717",
"0.57033706",
"0.57023835",
"0.5697541",
"0.5697077",
"0.5690559",
"0.56828356",
"0.56693095",
"0.56499785",
"0.56488836",
"0.56440324",
"0.5643159",
"0.5595364",
"0.5584037",
"0.55643374",
"0.5559797",
"0.5554644",
"0.55533516",
"0.55485415",
"0.5542736",
"0.5541145",
"0.5539634",
"0.55371076",
"0.5536171",
"0.5532267",
"0.5512936",
"0.5497216",
"0.5495037",
"0.5491666",
"0.54885453",
"0.54792005",
"0.5476033",
"0.54720104",
"0.54706854",
"0.54623735",
"0.5453667",
"0.5451104",
"0.54347724",
"0.5434381",
"0.5420071",
"0.5417704",
"0.54137087",
"0.54085225",
"0.54013747",
"0.5388323",
"0.53833365",
"0.5375146",
"0.5369534",
"0.535942",
"0.53503007",
"0.531913",
"0.5316949",
"0.5315193",
"0.5313876",
"0.53048867",
"0.52992713",
"0.5289778",
"0.5287286",
"0.5284285"
] |
0.0
|
-1
|
Map the given file to a path in the current workspace.
|
public static IFile convertFileToIFile(IContainer container, File file) {
IPath path = new Path(file.getAbsolutePath());
IPath rootPath = container.getLocation();
int match = matchingFirstSegments(path, rootPath);
Check.checkState(match >= rootPath.segmentCount());
path = path.removeFirstSegments(match);
IFile wsFile = container.getFile(path);
return wsFile;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String getMappingFilePath();",
"public static void openFile(File map) throws IOException {\n\t\ttry {\n\t\t\tinput = new ObjectInputStream(new FileInputStream(map));\n\t\t\t\n\t\t} catch(IOException e) {\n\t\t\tSystem.err.println(\"Error: Unable to open map file.\");\n\t\t\tthrow e;\n\t\t}\n\t}",
"public static IFile convertFileToIFile(File file) {\r\n IPath path = new Path(file.getAbsolutePath());\r\n \r\n IPath wsPath = convertToWorkspacePath(path, true);\r\n if (wsPath != null)\r\n \treturn ResourcesPlugin.getWorkspace().getRoot().getFile(wsPath);\r\n \r\n return null;\r\n }",
"public static IResource convertFileToExistingResource(File file) {\r\n IPath path = new Path(file.getAbsolutePath());\r\n \r\n IPath wsPath = convertToWorkspacePath(path, true);\r\n if (wsPath != null)\r\n \t return ResourcesPlugin.getWorkspace().getRoot().findMember(wsPath);\r\n \r\n return null;\r\n }",
"protected String getMapFile() {\n return mapFile;\n }",
"public String resolvePath();",
"Map<File, File> getOutputFileMap();",
"public String getLocationPath();",
"public void open() {\r\n\t\tFile f = getOpenFile(\"Map Files\", \"tilemap\");\r\n\t\tif (f == null) return;\r\n\t\tfile = f;\r\n\t\tframe.setTitle(\"Tile Mapper - \"+file.getName());\r\n\t\tSystem.out.println(\"Opening \"+file.getAbsolutePath());\r\n\r\n\t\ttry {\r\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\r\n\t\t\tInputStream is = this.getClass().getClassLoader().getResourceAsStream(\"tilemapper/Map.xsd\");\r\n\t\t\tfactory.setSchema(SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(new StreamSource(is)));\r\n\r\n\t\t\tDocument dom = factory.newDocumentBuilder().parse(file);\r\n\r\n\t\t\t// we have a valid document\r\n\t\t\t//printNode(dom, \"\");\r\n\t\t\tNode mapNode = null;\r\n\t\t\tNodeList nodes = dom.getChildNodes();\r\n\t\t\tfor (int i=0; i<nodes.getLength(); i++) {\r\n\t\t\t\tNode node = nodes.item(i);\r\n\t\t\t\tif (node.getNodeName() == \"Map\") mapNode = node;\r\n\t\t\t}\r\n\t\t\tif (mapNode == null) return;\r\n\t\t\tmapPanel.parseDOM((Element)mapNode);\r\n\r\n\t\t} catch (ParserConfigurationException e) {\r\n\t\t\tSystem.out.println(\"The underlying parser does not support the requested features.\");\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (FactoryConfigurationError e) {\r\n\t\t\tSystem.out.println(\"Error occurred obtaining Document Builder Factory.\");\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"java.lang.String getFileLoc();",
"Path getFilePath();",
"public abstract String getFileLocation();",
"Path getContent(String filename);",
"public void setJobFilePath(File file) {\n Preferences prefs = Preferences.userNodeForPackage(MainApp.class);\n if (file != null) {\n prefs.put(powerdropshipDir, file.getPath());\n\n primaryStage.setTitle(\"PowerDropship - \" + file.getName());\n } else {\n prefs.remove(powerdropshipDir);\n\n primaryStage.setTitle(\"PowerDropship\");\n }\n }",
"java.lang.String getFilePath();",
"private void createMap(File inFile)\r\n\t\tthrows Exception\r\n\t{\n\t\tBufferedReader in = new BufferedReader(new FileReader(inFile));\r\n\r\n\t\t// Chromosomes\r\n\t\tString[] chrms = in.readLine().split(\",\");\r\n\t\t// Marker positions\r\n\t\tString[] mrkrs = in.readLine().split(\",\");\r\n\t\tin.close();\r\n\r\n\r\n\t\t// Now rewrite it in Flapjack map format\r\n\t\tBufferedWriter out = new BufferedWriter(new FileWriter(new File(wrkDir, \"map\")));\r\n\t\tout.write(\"# fjFile = MAP\");\r\n\t\tout.newLine();\r\n\r\n\t\tfor (int i = 0; i < chrms.length; i++)\r\n\t\t{\r\n\t\t\tMarker m = new Marker(i, chrms[i], mrkrs[i]);\r\n\t\t\tmarkers.add(m);\r\n\r\n\t\t\tout.write(m.name + \"\\t\" + m.chr + \"\\t\" + m.pos);\r\n\t\t\tout.newLine();\r\n\t\t}\r\n\t\tout.close();\r\n\r\n\t\tmarkers.stream().forEach(marker -> {\r\n\r\n\t\t\tSystem.out.println(marker.name);\r\n\r\n\t\t});\r\n\t}",
"public boolean saveMapAs(File newFile)\n {\n this.file = newFile;\n \n return saveMap();\n }",
"protected String cacheKeyForFile(File file) {\n \treturn file.getAbsolutePath();\n }",
"private String retrieveWorkSpaceFileLoc(String fileName) {\n ArrayList<String> regResourceProjects = loadRegistryResourceProjects();\n boolean fileExists = false;\n IWorkspace workspace = ResourcesPlugin.getWorkspace();\n String folder = workspace.getRoot().getLocation().toFile().getPath().toString();\n String resourceFilePath = null;\n for (String regResourceProject : regResourceProjects) {\n resourceFilePath = folder + File.separator + regResourceProject + File.separator +\n fileName;\n File resourceFile = new File(resourceFilePath);\n if (resourceFile.exists()) {\n fileExists = true;\n break;\n }\n }\n if (!fileExists) {\n displayUserError(RESGISTRY_RESOURCE_RETRIVING_ERROR, NO_SUCH_RESOURCE_EXISTS);\n }\n return resourceFilePath;\n }",
"TiledMap loadMap(String path);",
"public void mo210a(File file) {\n }",
"public void writeFile(String filePath, Map input) {\n }",
"@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }",
"File getTilePathBase();",
"Path getLocation();",
"void path(String path);",
"void path(String path);",
"public FileService(@Value(\"${armory.filelocation}\") String saveLocation) {\n mapLines = Collections.synchronizedSortedMap(new TreeMap<>());\n this.saveLocation = saveLocation;\n checkIfLocationExists();\n }",
"String getFilePath();",
"private static String[][] getMap(String inputFile, String[][] Map) {\n\t\tFile text = new File(inputFile);\t\r\n\t\tint j = 0;\r\n\r\n\t\ttry {\r\n\t\t\tScanner s = new Scanner(text);\r\n\t\t\tString nex = s.nextLine();\r\n\t\t\t\r\n\t\t\twhile(s.hasNextLine())\r\n\t\t\t{\r\n\t\t\tnex = s.nextLine();\r\n\t\t\tfor (int i = 0; i < nex.length(); i++)\r\n\t\t\t{\r\n\t\t\t\tchar c = nex.charAt(i);\r\n\t\t\t\tString d = Character.toString(c);\r\n\t\t\t\tMap[j][i] = d;\t\r\n\t\t\t}\r\n\t\t\tj++;\r\n\t\t\t}\t\r\n\t\t\ts.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t\treturn Map;\r\n}",
"public void source(String path) throws Exception;",
"public FileWithFaultLocations getFile(final String file);",
"SourceFilePath getFilePath();",
"public static void saveFilePath(File file) {\n Preferences prefs = Preferences.userNodeForPackage(Main.class);\n if (file != null) {\n prefs.put(\"filePath\", file.getPath());\n } else {\n prefs.remove(\"filePath\");\n }\n }",
"private String mainAccessToFile(String fileName, DataLocation loc, AccessMode am, String destDir) {\n FileAccessParams fap = new FileAccessParams(am, loc);\n DataLocation targetLocation = ap.mainAccessToFile(loc, fap, destDir);\n\n // Checks on target\n String path = (targetLocation == null) ? fileName : targetLocation.getPath();\n DataLocation finalLocation = (targetLocation == null) ? loc : targetLocation;\n if (finalLocation == null) {\n ErrorManager.fatal(ERROR_FILE_NAME);\n return null;\n }\n\n // Return the final target path\n String finalPath;\n MultiURI u = finalLocation.getURIInHost(Comm.getAppHost());\n if (u != null) {\n finalPath = u.getPath();\n } else {\n finalPath = path;\n }\n\n return finalPath;\n }",
"void requestMapChange(String path);",
"protected abstract void processProjectFile(Path path);",
"public static FileSource fromPath(String filename) {\n return fromPath(filename, new SmarterMap());\n }",
"void changeFilePath(String newFilePath);",
"public MapProcessor(String mapFile) throws IOException\n {\n validateReflexMapFile(mapFile);\n\n if (reflexValidated)\n {\n //Set the map file parameter\n this.mapFile = mapFile;\n\n //Initialize the map scanner\n mapScanner = new Scanner(new File(mapFile));\n\n //Tell the user everything is honky dory for the scanner\n System.out.println(\"\\nLoaded your file: \" + mapFile);\n\n //The name of the file with the modification in the name\n String partialFileName = mapFile.substring(0, mapFile.length() - 4);\n\n //Initialize the file writer\n mapWriter = new FileWriter(partialFileName + \"_BrushShifted.map\");\n\n //Tell the user everything is honky dory for the writer\n System.out.println(\"Initialized empty map file for writing: \" + partialFileName + \"_BrushShifted.map\");\n\n lines = new String[lineCount()];\n System.out.println(\"Created array of lines with size \" + lines.length + \"\\n\");\n }\n }",
"public static void put(File file) throws IOException {\n while (LogicManager.isUpdating()) {} // wait until current update has finished\n\n LogicManager.setPaused(true);\n\n // open output stream\n ObjectOutputStream out = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(file)));\n\n // write viewport data\n out.writeObject(Window.getCurrentInstance()\n .getGameDisplay()\n .getViewport());\n out.writeObject(new Integer(Window.getCurrentInstance()\n .getGameDisplay()\n .getScaling()));\n\n // write map data\n Point[] data = GridManager.dumpScene();\n out.writeObject(data);\n out.flush();\n out.close();\n }",
"public MapMessage processFile(File file) {\r\n\t\ttry {\r\n\r\n\t\t\tScanner input = new Scanner(file);\r\n\r\n\t\t\twhile (input.hasNext()) {\r\n\t\t\t\tString line = input.nextLine();\r\n\t\t\t\tif (!line.isEmpty()) {\r\n\t\t\t\t\tfileContent.append(line).append(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tinput.close();\r\n\r\n\t\t} catch (FileNotFoundException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\tMapMessage mapMessage = validateMap(fileContent.toString());\r\n\t\treturn mapMessage;\r\n\t}",
"public void setMap()\n {\n gameManager.setMap( savedFilesFrame.getCurrent_index() );\n }",
"private void init(File file) throws VlException\n {\n // under windows: will return windows path\n String path = file.getAbsolutePath();\n\n //\n // Forward Flip backslashes !\n // Do this ONLY for the local filesystem !\n //\n\n if (File.separatorChar != VRL.SEP_CHAR)\n path = VRL.uripath(path, true, File.separatorChar);\n\n // under widows: will convert windows path to URI path !\n setLocation(new VRL(VRS.FILE_SCHEME, null, path));\n this.path = getPath(); // use URI path !\n\n _file = file;\n }",
"private static void navigate(Project project, VirtualFile file, int line, int column) {\n final OpenFileDescriptor openFileDescriptor = new OpenFileDescriptor(project, file, line, column);\n if (openFileDescriptor.canNavigate()) {\n log.info(\"Trying to navigate to \" + file.getPath() + \":\" + line);\n openFileDescriptor.navigate(true);\n Window parentWindow = WindowManager.getInstance().suggestParentWindow(project);\n if (parentWindow != null) {\n parentWindow.toFront();\n }\n } else {\n log.warn(\"Cannot navigate\");\n }\n }",
"public static MobilityMap parseMap( String filename ) throws FileNotFoundException\r\n {\r\n File f = new File( filename );\r\n return parseMap( f );\r\n }",
"private void getMap(String sqlFile) throws IOException {\r\n\r\n\t\tLOG.info(\"getMap\");\r\n\r\n\t\tString fileContent = loadFile(sqlFile);\r\n\t\tString[] querys = getStringArray(fileContent, END_QUERY_PATTERN);\r\n\t\tfillMap(querys);\r\n\r\n\t\tLOG.info(\"END getMap\");\r\n\t\t\r\n\t}",
"private File getIOFile() {\n \t\tIPath location = resource.getLocation();\n \t\tif(location!=null) {\n \t\t\treturn location.toFile();\n \t\t}\n \t\treturn null;\n \t}",
"public void get(String file) {\n\n }",
"public void map(String line, ImoocContext context);",
"public File fileRelativeToSource(File f) {\n if (f.isAbsolute()) {\n return f;\n } else {\n return new File(_basedir, f.getPath());\n }\n }",
"public static void solveMaze(String inputFile, String outputFile) \r\n\t{\t\r\n\t\t\r\n\t\tif(new File(inputFile).isFile() == false)\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tthrow new FileNotFoundException();\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Gets the dimensions to assign to the 2d String array size\r\n\t\tString[][] Dimensions = getDimensions(inputFile);\r\n\t\t\r\n\t\t//Gets each row and column character of the maze file and adds it the 2d String array\r\n\t\tString[][] Map = getMap(inputFile, Dimensions);\r\n\t\t\r\n\t\tint startRow = 0;\r\n\t\tint startColumn = 0;\t\t\r\n\t\t\r\n\t\t\r\n\t\t//This finds the Starting values, startRow and startColumn\r\n\t\tfor(int i = 0; i < Map.length; i++)\r\n\t\t{\r\n\t\t\tfor(int j = 0; j < Map[0].length; j++)\r\n\t\t\t{\r\n\t\t\t\tString check = Map[i][j];\r\n\t\t\t\tif (check.compareTo(\"S\") == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tstartRow = i;\r\n\t\t\t\t\tstartColumn = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//This sends the startRow, startColumn, 2d String array named Map (which contains all the coordinates), \r\n\t\t//and the output and input file names to getPath. \r\n\t\tSystem.out.println(getPath(startRow, startColumn, Map, outputFile, inputFile));\t\t\r\n\t}",
"File getWorkfile();",
"private static void copyFile(File scrFile, File file) {\n\t\r\n}",
"private static File resolveMetaFile(String path) {\n return new File(StringUtils.substringBefore(path, DEF_LOC_ARTIFACT) + DEF_REL_META + File.separator + \"project.tms.json\");\n }",
"@Override\n public void open(File file)\n {\n MazeInfoModel mim = Main.getPrimaryFrameInstance().getMazeInfoModel();\n if (!mim.addMaze(file))\n JOptionPane.showMessageDialog(this, \"<html>Unable to load \" +\n \"<br />\" +\n file.getAbsolutePath() +\n \"</html\", \"Maze Open Error\", JOptionPane.ERROR_MESSAGE);\n\n }",
"private static String getSourceFile() {\n\t\tFileChooser fileChooser = new FileChooser(System.getProperty(\"user.home\"),\n\t\t\t\t\"Chose json file containing satellite data!\", \"json\");\n\t\tFile file = fileChooser.getFile();\n\t\tif (file == null) {\n\t\t\tSystem.exit(-42);\n\t\t}\n\t\treturn file.getAbsolutePath();\n\t}",
"String getFilepath();",
"File getLoadLocation();",
"public String getPath() {\n\t\treturn file.getPath();\n\t}",
"static File localFile(String path, String name) {\n\t\tFile f = new File(path, name.replace('*', 'X'));\n\t\treturn new File(f.getAbsolutePath()); /* make EVM use user.dir */\n\t}",
"public void setMapFile(String mapName) {\n map = Map.loadFromJSON(mapName);\n }",
"public Node getFileLocation(String filename)\n\t{\n\t\treturn nodeManager.getNodeList().getFileLocation(filename);\n\t}",
"public MapData(String mapName) {\n this.mapName = mapName;\n readFile();\n}",
"public String getPath();",
"public String getPath();",
"public String getPath();",
"FileObject getFile();",
"FileObject getFile();",
"ResourceLocation resolve(String path);",
"protected synchronized Hashtable getMappingsFromFile() throws Exception {\n\n \t\n\t\tInputStream path = null;\n\n\t\tpath = getClass().getResourceAsStream(\"../../../config/mappings.txt\");\n\n\t\tSystem.out.println(\"Path is - \" + path);\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(path));\n/*\t\tStringBuilder sb = new StringBuilder();\n\t\tString line1 = null;\n\t\twhile ((line1 = reader.readLine()) != null) {\n\t\t\tsb.append(line1 + \"\\n\");\n\t\t}\n*/\t\t//System.out.println(\"String is - \" + sb.toString());\n\t\t\n/* \tFile f = new File(\"src/edu/ucsd/crbs/incf/components/services/emage/mappings.txt\");\n System.out.println(\"Mapping - \" + f.getAbsolutePath());\n\n*/ /*if(sb.toString().trim().equals(\"\") || sb.toString() == null ) {\n System.err.println(\"bisel.ReadMappings cannot find mapping file\");\n System.exit(1);\n }*/\n\n Hashtable mappings = new Hashtable(17, new Float(1.25).floatValue());\n\n\n //BufferedReader br = new BufferedReader(new FileReader(f));\n String line = reader.readLine();\n while(line != null) { \n StringTokenizer st = new StringTokenizer(line, \"*\");\n String aba = st.nextToken();\n String emap = st.nextToken();\n mappings.put(aba, emap);\n line = reader.readLine();\n }\n\n reader.close();\n return mappings;\n }",
"public FileLocation(File file) {\n this(file, -1, -1);\n }",
"public void setMarkersReferenceFromTRC(String filename) {\n opensimMocoJNI.MocoTrack_setMarkersReferenceFromTRC__SWIG_1(swigCPtr, this, filename);\n }",
"public void mapUserFileToUserFileEntity(UserFile userFile, UserFileEntity userFileEntity) {\n\t\tif(userFile == null) {\n\t\t\treturn;\n\t\t}\n\n\t\t//--- Generic mapping \n\t\tmap(userFile, userFileEntity);\n\n\t}",
"public String searchFromGridFile(File file) {\n String result = \"\";\n\n // TODO: read file and generate path using AStar algorithm\n\n return result;\n }",
"public static void save(File file, Workspace workspace) {\r\n if (file != null) {\r\n // System.out.println(\"Workspace Save -->\" + file);\r\n try {\r\n FileOutputStream ostream = new FileOutputStream(file);\r\n try {\r\n WorkspaceSerializer serializer = new WorkspaceSerializer(\r\n workspace);\r\n serializer.serialize(ostream);\r\n workspace.setWorkspaceChanged(false);\r\n } finally {\r\n ostream.close();\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }",
"private InputSource filesystemLookup(ResourceLocation matchingEntry) {\n\n String uri = matchingEntry.getLocation();\n // the following line seems to be necessary on Windows under JDK 1.2\n uri = uri.replace(File.separatorChar, '/');\n URL baseURL;\n\n //\n // The ResourceLocation may specify a relative path for its\n // location attribute. This is resolved using the appropriate\n // base.\n //\n if (matchingEntry.getBase() != null) {\n baseURL = matchingEntry.getBase();\n } else {\n try {\n baseURL = FILE_UTILS.getFileURL(getProject().getBaseDir());\n } catch (MalformedURLException ex) {\n throw new BuildException(\"Project basedir cannot be converted to a URL\");\n }\n }\n\n URL url = null;\n try {\n url = new URL(baseURL, uri);\n } catch (MalformedURLException ex) {\n // this processing is useful under Windows when the location of the DTD\n // has been given as an absolute path\n // see Bugzilla Report 23913\n File testFile = new File(uri);\n if (testFile.exists() && testFile.canRead()) {\n log(\"uri : '\"\n + uri + \"' matches a readable file\", Project.MSG_DEBUG);\n try {\n url = FILE_UTILS.getFileURL(testFile);\n } catch (MalformedURLException ex1) {\n throw new BuildException(\n \"could not find an URL for :\" + testFile.getAbsolutePath());\n }\n } else {\n log(\"uri : '\"\n + uri + \"' does not match a readable file\", Project.MSG_DEBUG);\n\n }\n }\n\n InputSource source = null;\n if (url != null && \"file\".equals(url.getProtocol())) {\n String fileName = FILE_UTILS.fromURI(url.toString());\n if (fileName != null) {\n log(\"fileName \" + fileName, Project.MSG_DEBUG);\n File resFile = new File(fileName);\n if (resFile.exists() && resFile.canRead()) {\n try {\n source = new InputSource(Files.newInputStream(resFile.toPath()));\n String sysid = JAXPUtils.getSystemId(resFile);\n source.setSystemId(sysid);\n log(\"catalog entry matched a readable file: '\"\n + sysid + \"'\", Project.MSG_DEBUG);\n } catch (IOException ex) {\n // ignore\n }\n }\n }\n }\n return source;\n }",
"public void setWorldFile(File newFile) {\n File configDirectory = new File(newFile,CONFIG_DIRECTORY);\n configDirectory.mkdir();\n\n String configName = generalConfigFile.getPath();\n String generalConfigDirectoryName = generalConfigFile.getParentFile().getPath();\n String detailName = configName.substring(generalConfigDirectoryName.length()+1);\n //logger.info(\"Filename \"+detailName);\n File localConfigFile = new File(configDirectory,detailName);\n setWorldConfigFile(localConfigFile);\n }",
"public static File getResourceAsFile(String fileEntry) {\n\t\tFile file = null;\n \ttry {\n \t\tURL url \t= Activator.getDefault().getBundle().getEntry(fileEntry);\n \t\tURL fileURL = FileLocator.toFileURL(url);\n \t\tURL resolve = FileLocator.resolve(fileURL);\n \t\tfile \t\t= new File(resolve.getFile());\n \t} catch(Exception e){\n Activator.getDefault().log(e.getMessage(), e);\n \t}\n \treturn file;\n\t\t\n\t}",
"public static File loadFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(Main.class);\n String filePath = prefs.get(\"filePath\", null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }",
"public UserFile mapUserFileEntityToUserFile(UserFileEntity userFileEntity) {\n\t\tif(userFileEntity == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\t//--- Generic mapping \n\t\tUserFile userFile = map(userFileEntity, UserFile.class);\n\n\t\treturn userFile;\n\t}",
"void openFilePath(String newFilePath) throws IllegalValueException;",
"private static String getEntryName(File source, File file) throws IOException {\n\t\tint index = source.getAbsolutePath().length() + 1;\n\t\tString path = file.getCanonicalPath();\n\n\t\treturn path.substring(index);\n\t}",
"private static boolean getPath(int startRow, int startColumn, String[][] Map, String outputFile, String inputFile) {\n\t\tQueue<Node> q = new LinkedList<Node>();\t\t\t\t\r\n\t\t\r\n\t\t//Sets the Start Node Row and Column values.\r\n\t\tNode Start = new Node(startRow + \" \" + startColumn);\r\n\t\tStart.column = startColumn;\r\n\t\tStart.row = startRow;\r\n\t\t\r\n\t\t//This is the up, left, right, and down coordinates for searching neighboring items.\r\n\t\tint[]dx = {0, 0, -1, 1};\r\n\t\tint[]dy = {-1, 1, 0, 0};\r\n\t\t\r\n\r\n\t\t//Adds the Start Node to the Queue.\r\n\t\tq.add(Start);\r\n\t\twhile(q.size() > 0)\r\n\t\t{\r\n\t\t\t//This takes the first item in the Queue for comparing and looking at its neighbors.\r\n\t\t\tNode x = q.poll();\r\n\t\t\t\r\n\t\t\tif(x.visited != 1)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t//If the current node is the Goal, then it retraces it's steps (cameFrom) and prints out the path onto the 2d array named Map.\r\n\t\t\tif (Map[x.row][x.column].compareTo(\"G\") == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\twhile (x.cameFrom != null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (Map[x.row][x.column].compareTo(\"G\") != 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tMap[x.row][x.column] = \".\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tx = x.cameFrom;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t//Here is where it writes the solution and maze to a text file.\r\n\t\t\t\t\t\tFile file = new File(outputFile);\r\n\r\n\t\t\t\t\t\tif (!file.exists()) {\r\n\t\t\t\t\t\t\tfile.createNewFile();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile());\r\n\t\t\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tFile text = new File(inputFile);\r\n\t\t\t\t\t\tScanner rowColumn;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\trowColumn = new Scanner(text);\r\n\t\t\t\t\t\t\tString row = rowColumn.next();\r\n\t\t\t\t\t\t\tString row2 = rowColumn.next();\r\n\t\t\t\t\t\t\tbw.write(row + \" \" + row2 + \"\\n\");\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor(int i = 0; i < Map.length; i++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfor(int j = 0; j < Map[0].length; j++)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tbw.write(Map[i][j]);\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbw.write(\"\\n\");\r\n\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t\tbw.close();\r\n\r\n\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\t//This checks the up, left, right, and down values of the current Node.\r\n\t\t\tfor(int i = 0; i < 4; i++)\r\n\t\t\t{\r\n\t\t\t\tint yy = x.row + dx[i];\r\n\t\t\t\tint xx = x.column + dy[i];\r\n\t\t\t\r\n\t\t\t\tif(xx >= 1 && yy >= 1)\r\n\t\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t\tif(Map[yy][xx].compareTo(\" \") == 0 && Map[yy][xx].compareTo(\"X\") != 0 && (x.visited != 1) || Map[yy][xx].compareTo(\"G\") == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tboolean on = true;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//This checks the Queue and makes sure the current item isn't in there. \r\n\t\t\t\t\t\t//If it is, then it turns off the switch. \r\n\t\t\t\t\t\tfor(Node I: q)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tif (I.column == xx && I.row == yy)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\ton = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (on == true)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t//If a node hasn't been looked at yet, it creates a node for it and adds it to the Queue. \r\n\t\t\t\t\t\tNode Neighbor = new Node(yy + \" \" + xx);\r\n\t\t\t\t\t\tNeighbor.column = xx;\r\n\t\t\t\t\t\tNeighbor.row = yy;\r\n\t\t\t\t\t\tNeighbor.cameFrom = x;\r\n\t\t\t\t\t\tq.add(Neighbor);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//Turns the switch back on after the ForEach loop\r\n\t\t\t\t\t\ton = true;\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t\t//Here is where I'm trying to check if all the Nodes in the Queue have been visited,\r\n\t\t\t//If so, then it will return false because there is no path. Not currently working though. \r\n\t\t\tx.visited = 1;\r\n\t\t\tint counter = 0;\r\n\t\t\tfor(Node temp: q)\r\n\t\t\t{\r\n\t\t\t\tif (temp.visited == 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tcounter++;\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\tif (q.size() == counter)\r\n\t\t\t\t\t{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t}\t\t\r\n\t\treturn false;\r\n\t}",
"public void saveMap() {\n this.scanMap();\n String userHome = System.getProperty(\"user.home\");\n BinaryExporter export = BinaryExporter.getInstance();\n File file = new File(userHome + \"world.j3o\");\n try {\n export.save(this.testNode, file); \n } catch (IOException ex) {\n Logger.getLogger(mapDevAppState_2.class.getName()).log(Level.SEVERE, \"File write error\");\n }\n }",
"public void updatePathAndFile(String path, String file){\r\n\t\tthis.path = path;\r\n\t\tthis.file = file;\r\n\t}",
"public void handleOpenFile (File inFile) {\n openFile (inFile);\n }",
"void setNewFile(File file);",
"public void setResourcefile (File file)\n {\n _resourcefile = file;\n }",
"@NotNull\n public File repositoryFileFromVirtualFile(VirtualFile file)\n {\n String pathRelativeToRepository = file.getPath().substring(this.root().getPath().length());\n\n return new File(pathRelativeToRepository, file.getName());\n }",
"private void updateIndexMap(String file) {\n\t\ttry (Scanner s = new Scanner(new File(file))) {\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tString word = TextParserUtil.cleanWord(s.next());\n\t\t\t\tString partition = word.substring(0, 1);\n\t\t\t\tif (indexedDir.get(partition) == null) {\n\t\t\t\t\tinsertPartitionEntry(file, word, partition);\n\t\t\t\t} else if (indexedDir.get(partition).get(word) == null) {\n\t\t\t\t\tinsertWordEntry(file, word, partition);\n\t\t\t\t} else if (indexedDir.get(partition).get(word) != null) {\n\t\t\t\t\tupdateFileList(file, word, partition);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}",
"public static Mapping newMapping(RulesDirectory rd, IRSession session, String filename){\n Mapping mapping = new Mapping(session);\n \ttry {\n\t\t\tInputStream s = session.getRulesDirectory().getFileSource().openStreamSearch(\n\t\t\t FileType.MAP, session.getRuleSet(), filename);\n session.getState().traceTagBegin(\"loadMapping\", \"file\",filename);\n\t\t\tmapping.loadMap(s);\n\t\t\tsession.getState().traceTagEnd(); \n\t\t} catch (FileNotFoundException e) {\n \t\t\tthrow new RuntimeException(e);\n\t\t} catch (Exception e) {\n \t\t\tthrow new RuntimeException(\"Error accessing '\"+filename+\"'\\r\\n\"+e);\n\t\t}\n\t\treturn mapping;\n }",
"private void openFile(File file)\n {\n String imagePath = file.toURI().toString();\n Image image = new Image(imagePath);\n if ( image == null || image.isError())\n {\n showInvalidFileFormatError();\n } else\n {\n bufferImage = image;\n changeAvatarCircle.setFill(new ImagePattern(image));\n imagePathLabel.setText(imagePath);\n }\n }",
"public abstract String getPath();",
"public abstract String getPath();",
"@Override\r\n\tpublic int update_file(Map<String, Object> map) throws Exception {\n\t\treturn sql.update(\"cms_board.update_file\", map);\r\n\t}",
"public WordMap generateWordMap(String filePath) {\n\n WordMap wm = new WordMap();\n Scanner sc;\n\n try {\n sc = new Scanner(new File(filePath));\n\n while (sc.hasNextLine()) {\n\n String line = sc.nextLine();\n String[] lineData = line.split(\" \");\n\n //Gets a string of the word we are currently parsing\n String word = lineData[colWord].split(\"=\")[1];\n\n wm.put(word, getWordFromLine(line));\n }\n\n } catch (Exception e) {\n System.err.println(\"Error in generateWordMap\");\n System.err.println(e.getMessage());\n e.printStackTrace();\n return null;\n }\n\n sc.close();\n return wm;\n }",
"String getPath();",
"String getPath();",
"String getPath();"
] |
[
"0.641765",
"0.57344604",
"0.56916606",
"0.56642205",
"0.554232",
"0.5431219",
"0.54152286",
"0.5375993",
"0.5341977",
"0.52837276",
"0.5234846",
"0.5224733",
"0.52064663",
"0.51494205",
"0.5085321",
"0.5084075",
"0.50812",
"0.5057424",
"0.50478244",
"0.5041755",
"0.50408673",
"0.5025753",
"0.50248575",
"0.5009022",
"0.5007881",
"0.4994426",
"0.4994426",
"0.4981628",
"0.497696",
"0.49756932",
"0.4973236",
"0.49691835",
"0.4964843",
"0.4961487",
"0.4961156",
"0.49436134",
"0.49422133",
"0.48743656",
"0.48735607",
"0.48676282",
"0.48614624",
"0.48528597",
"0.4847148",
"0.48332134",
"0.48254803",
"0.48071757",
"0.48056316",
"0.48014775",
"0.47797403",
"0.4779567",
"0.47714147",
"0.47704217",
"0.47697255",
"0.47631305",
"0.4760694",
"0.47557244",
"0.47553203",
"0.4744338",
"0.4739477",
"0.47285044",
"0.47266406",
"0.4724731",
"0.4719677",
"0.4708854",
"0.4698266",
"0.4698266",
"0.4698266",
"0.46978346",
"0.46978346",
"0.46905342",
"0.46881887",
"0.46842104",
"0.46817905",
"0.46792424",
"0.46760604",
"0.46755964",
"0.46697697",
"0.46678814",
"0.46614087",
"0.4660031",
"0.46586168",
"0.46531615",
"0.46509853",
"0.4643923",
"0.46426943",
"0.46387032",
"0.46321896",
"0.46312803",
"0.4630241",
"0.46295044",
"0.4622163",
"0.4617423",
"0.46157286",
"0.46148297",
"0.46148297",
"0.46134448",
"0.4608312",
"0.4607969",
"0.4607969",
"0.4607969"
] |
0.4819725
|
45
|
Map the given file to a path in the current workspace.
|
public static IFile convertFileToIFile(File file) {
IPath path = new Path(file.getAbsolutePath());
IPath wsPath = convertToWorkspacePath(path, true);
if (wsPath != null)
return ResourcesPlugin.getWorkspace().getRoot().getFile(wsPath);
return null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String getMappingFilePath();",
"public static void openFile(File map) throws IOException {\n\t\ttry {\n\t\t\tinput = new ObjectInputStream(new FileInputStream(map));\n\t\t\t\n\t\t} catch(IOException e) {\n\t\t\tSystem.err.println(\"Error: Unable to open map file.\");\n\t\t\tthrow e;\n\t\t}\n\t}",
"public static IResource convertFileToExistingResource(File file) {\r\n IPath path = new Path(file.getAbsolutePath());\r\n \r\n IPath wsPath = convertToWorkspacePath(path, true);\r\n if (wsPath != null)\r\n \t return ResourcesPlugin.getWorkspace().getRoot().findMember(wsPath);\r\n \r\n return null;\r\n }",
"protected String getMapFile() {\n return mapFile;\n }",
"public String resolvePath();",
"Map<File, File> getOutputFileMap();",
"public String getLocationPath();",
"public void open() {\r\n\t\tFile f = getOpenFile(\"Map Files\", \"tilemap\");\r\n\t\tif (f == null) return;\r\n\t\tfile = f;\r\n\t\tframe.setTitle(\"Tile Mapper - \"+file.getName());\r\n\t\tSystem.out.println(\"Opening \"+file.getAbsolutePath());\r\n\r\n\t\ttry {\r\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\r\n\t\t\tInputStream is = this.getClass().getClassLoader().getResourceAsStream(\"tilemapper/Map.xsd\");\r\n\t\t\tfactory.setSchema(SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(new StreamSource(is)));\r\n\r\n\t\t\tDocument dom = factory.newDocumentBuilder().parse(file);\r\n\r\n\t\t\t// we have a valid document\r\n\t\t\t//printNode(dom, \"\");\r\n\t\t\tNode mapNode = null;\r\n\t\t\tNodeList nodes = dom.getChildNodes();\r\n\t\t\tfor (int i=0; i<nodes.getLength(); i++) {\r\n\t\t\t\tNode node = nodes.item(i);\r\n\t\t\t\tif (node.getNodeName() == \"Map\") mapNode = node;\r\n\t\t\t}\r\n\t\t\tif (mapNode == null) return;\r\n\t\t\tmapPanel.parseDOM((Element)mapNode);\r\n\r\n\t\t} catch (ParserConfigurationException e) {\r\n\t\t\tSystem.out.println(\"The underlying parser does not support the requested features.\");\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (FactoryConfigurationError e) {\r\n\t\t\tSystem.out.println(\"Error occurred obtaining Document Builder Factory.\");\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"java.lang.String getFileLoc();",
"Path getFilePath();",
"public abstract String getFileLocation();",
"Path getContent(String filename);",
"public void setJobFilePath(File file) {\n Preferences prefs = Preferences.userNodeForPackage(MainApp.class);\n if (file != null) {\n prefs.put(powerdropshipDir, file.getPath());\n\n primaryStage.setTitle(\"PowerDropship - \" + file.getName());\n } else {\n prefs.remove(powerdropshipDir);\n\n primaryStage.setTitle(\"PowerDropship\");\n }\n }",
"java.lang.String getFilePath();",
"private void createMap(File inFile)\r\n\t\tthrows Exception\r\n\t{\n\t\tBufferedReader in = new BufferedReader(new FileReader(inFile));\r\n\r\n\t\t// Chromosomes\r\n\t\tString[] chrms = in.readLine().split(\",\");\r\n\t\t// Marker positions\r\n\t\tString[] mrkrs = in.readLine().split(\",\");\r\n\t\tin.close();\r\n\r\n\r\n\t\t// Now rewrite it in Flapjack map format\r\n\t\tBufferedWriter out = new BufferedWriter(new FileWriter(new File(wrkDir, \"map\")));\r\n\t\tout.write(\"# fjFile = MAP\");\r\n\t\tout.newLine();\r\n\r\n\t\tfor (int i = 0; i < chrms.length; i++)\r\n\t\t{\r\n\t\t\tMarker m = new Marker(i, chrms[i], mrkrs[i]);\r\n\t\t\tmarkers.add(m);\r\n\r\n\t\t\tout.write(m.name + \"\\t\" + m.chr + \"\\t\" + m.pos);\r\n\t\t\tout.newLine();\r\n\t\t}\r\n\t\tout.close();\r\n\r\n\t\tmarkers.stream().forEach(marker -> {\r\n\r\n\t\t\tSystem.out.println(marker.name);\r\n\r\n\t\t});\r\n\t}",
"public boolean saveMapAs(File newFile)\n {\n this.file = newFile;\n \n return saveMap();\n }",
"protected String cacheKeyForFile(File file) {\n \treturn file.getAbsolutePath();\n }",
"private String retrieveWorkSpaceFileLoc(String fileName) {\n ArrayList<String> regResourceProjects = loadRegistryResourceProjects();\n boolean fileExists = false;\n IWorkspace workspace = ResourcesPlugin.getWorkspace();\n String folder = workspace.getRoot().getLocation().toFile().getPath().toString();\n String resourceFilePath = null;\n for (String regResourceProject : regResourceProjects) {\n resourceFilePath = folder + File.separator + regResourceProject + File.separator +\n fileName;\n File resourceFile = new File(resourceFilePath);\n if (resourceFile.exists()) {\n fileExists = true;\n break;\n }\n }\n if (!fileExists) {\n displayUserError(RESGISTRY_RESOURCE_RETRIVING_ERROR, NO_SUCH_RESOURCE_EXISTS);\n }\n return resourceFilePath;\n }",
"public void mo210a(File file) {\n }",
"TiledMap loadMap(String path);",
"public void writeFile(String filePath, Map input) {\n }",
"@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }",
"File getTilePathBase();",
"Path getLocation();",
"void path(String path);",
"void path(String path);",
"public FileService(@Value(\"${armory.filelocation}\") String saveLocation) {\n mapLines = Collections.synchronizedSortedMap(new TreeMap<>());\n this.saveLocation = saveLocation;\n checkIfLocationExists();\n }",
"String getFilePath();",
"private static String[][] getMap(String inputFile, String[][] Map) {\n\t\tFile text = new File(inputFile);\t\r\n\t\tint j = 0;\r\n\r\n\t\ttry {\r\n\t\t\tScanner s = new Scanner(text);\r\n\t\t\tString nex = s.nextLine();\r\n\t\t\t\r\n\t\t\twhile(s.hasNextLine())\r\n\t\t\t{\r\n\t\t\tnex = s.nextLine();\r\n\t\t\tfor (int i = 0; i < nex.length(); i++)\r\n\t\t\t{\r\n\t\t\t\tchar c = nex.charAt(i);\r\n\t\t\t\tString d = Character.toString(c);\r\n\t\t\t\tMap[j][i] = d;\t\r\n\t\t\t}\r\n\t\t\tj++;\r\n\t\t\t}\t\r\n\t\t\ts.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t\treturn Map;\r\n}",
"public void source(String path) throws Exception;",
"public FileWithFaultLocations getFile(final String file);",
"SourceFilePath getFilePath();",
"private String mainAccessToFile(String fileName, DataLocation loc, AccessMode am, String destDir) {\n FileAccessParams fap = new FileAccessParams(am, loc);\n DataLocation targetLocation = ap.mainAccessToFile(loc, fap, destDir);\n\n // Checks on target\n String path = (targetLocation == null) ? fileName : targetLocation.getPath();\n DataLocation finalLocation = (targetLocation == null) ? loc : targetLocation;\n if (finalLocation == null) {\n ErrorManager.fatal(ERROR_FILE_NAME);\n return null;\n }\n\n // Return the final target path\n String finalPath;\n MultiURI u = finalLocation.getURIInHost(Comm.getAppHost());\n if (u != null) {\n finalPath = u.getPath();\n } else {\n finalPath = path;\n }\n\n return finalPath;\n }",
"public static void saveFilePath(File file) {\n Preferences prefs = Preferences.userNodeForPackage(Main.class);\n if (file != null) {\n prefs.put(\"filePath\", file.getPath());\n } else {\n prefs.remove(\"filePath\");\n }\n }",
"protected abstract void processProjectFile(Path path);",
"void requestMapChange(String path);",
"public static FileSource fromPath(String filename) {\n return fromPath(filename, new SmarterMap());\n }",
"void changeFilePath(String newFilePath);",
"public MapProcessor(String mapFile) throws IOException\n {\n validateReflexMapFile(mapFile);\n\n if (reflexValidated)\n {\n //Set the map file parameter\n this.mapFile = mapFile;\n\n //Initialize the map scanner\n mapScanner = new Scanner(new File(mapFile));\n\n //Tell the user everything is honky dory for the scanner\n System.out.println(\"\\nLoaded your file: \" + mapFile);\n\n //The name of the file with the modification in the name\n String partialFileName = mapFile.substring(0, mapFile.length() - 4);\n\n //Initialize the file writer\n mapWriter = new FileWriter(partialFileName + \"_BrushShifted.map\");\n\n //Tell the user everything is honky dory for the writer\n System.out.println(\"Initialized empty map file for writing: \" + partialFileName + \"_BrushShifted.map\");\n\n lines = new String[lineCount()];\n System.out.println(\"Created array of lines with size \" + lines.length + \"\\n\");\n }\n }",
"public static void put(File file) throws IOException {\n while (LogicManager.isUpdating()) {} // wait until current update has finished\n\n LogicManager.setPaused(true);\n\n // open output stream\n ObjectOutputStream out = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(file)));\n\n // write viewport data\n out.writeObject(Window.getCurrentInstance()\n .getGameDisplay()\n .getViewport());\n out.writeObject(new Integer(Window.getCurrentInstance()\n .getGameDisplay()\n .getScaling()));\n\n // write map data\n Point[] data = GridManager.dumpScene();\n out.writeObject(data);\n out.flush();\n out.close();\n }",
"public MapMessage processFile(File file) {\r\n\t\ttry {\r\n\r\n\t\t\tScanner input = new Scanner(file);\r\n\r\n\t\t\twhile (input.hasNext()) {\r\n\t\t\t\tString line = input.nextLine();\r\n\t\t\t\tif (!line.isEmpty()) {\r\n\t\t\t\t\tfileContent.append(line).append(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tinput.close();\r\n\r\n\t\t} catch (FileNotFoundException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\tMapMessage mapMessage = validateMap(fileContent.toString());\r\n\t\treturn mapMessage;\r\n\t}",
"public void setMap()\n {\n gameManager.setMap( savedFilesFrame.getCurrent_index() );\n }",
"private void init(File file) throws VlException\n {\n // under windows: will return windows path\n String path = file.getAbsolutePath();\n\n //\n // Forward Flip backslashes !\n // Do this ONLY for the local filesystem !\n //\n\n if (File.separatorChar != VRL.SEP_CHAR)\n path = VRL.uripath(path, true, File.separatorChar);\n\n // under widows: will convert windows path to URI path !\n setLocation(new VRL(VRS.FILE_SCHEME, null, path));\n this.path = getPath(); // use URI path !\n\n _file = file;\n }",
"private static void navigate(Project project, VirtualFile file, int line, int column) {\n final OpenFileDescriptor openFileDescriptor = new OpenFileDescriptor(project, file, line, column);\n if (openFileDescriptor.canNavigate()) {\n log.info(\"Trying to navigate to \" + file.getPath() + \":\" + line);\n openFileDescriptor.navigate(true);\n Window parentWindow = WindowManager.getInstance().suggestParentWindow(project);\n if (parentWindow != null) {\n parentWindow.toFront();\n }\n } else {\n log.warn(\"Cannot navigate\");\n }\n }",
"public static IFile convertFileToIFile(IContainer container, File file) {\r\n IPath path = new Path(file.getAbsolutePath());\r\n IPath rootPath = container.getLocation();\r\n \r\n int match = matchingFirstSegments(path, rootPath);\r\n Check.checkState(match >= rootPath.segmentCount()); \r\n \r\n path = path.removeFirstSegments(match);\r\n IFile wsFile = container.getFile(path);\r\n return wsFile;\r\n }",
"public static MobilityMap parseMap( String filename ) throws FileNotFoundException\r\n {\r\n File f = new File( filename );\r\n return parseMap( f );\r\n }",
"private void getMap(String sqlFile) throws IOException {\r\n\r\n\t\tLOG.info(\"getMap\");\r\n\r\n\t\tString fileContent = loadFile(sqlFile);\r\n\t\tString[] querys = getStringArray(fileContent, END_QUERY_PATTERN);\r\n\t\tfillMap(querys);\r\n\r\n\t\tLOG.info(\"END getMap\");\r\n\t\t\r\n\t}",
"private File getIOFile() {\n \t\tIPath location = resource.getLocation();\n \t\tif(location!=null) {\n \t\t\treturn location.toFile();\n \t\t}\n \t\treturn null;\n \t}",
"public void get(String file) {\n\n }",
"public void map(String line, ImoocContext context);",
"public File fileRelativeToSource(File f) {\n if (f.isAbsolute()) {\n return f;\n } else {\n return new File(_basedir, f.getPath());\n }\n }",
"public static void solveMaze(String inputFile, String outputFile) \r\n\t{\t\r\n\t\t\r\n\t\tif(new File(inputFile).isFile() == false)\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tthrow new FileNotFoundException();\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Gets the dimensions to assign to the 2d String array size\r\n\t\tString[][] Dimensions = getDimensions(inputFile);\r\n\t\t\r\n\t\t//Gets each row and column character of the maze file and adds it the 2d String array\r\n\t\tString[][] Map = getMap(inputFile, Dimensions);\r\n\t\t\r\n\t\tint startRow = 0;\r\n\t\tint startColumn = 0;\t\t\r\n\t\t\r\n\t\t\r\n\t\t//This finds the Starting values, startRow and startColumn\r\n\t\tfor(int i = 0; i < Map.length; i++)\r\n\t\t{\r\n\t\t\tfor(int j = 0; j < Map[0].length; j++)\r\n\t\t\t{\r\n\t\t\t\tString check = Map[i][j];\r\n\t\t\t\tif (check.compareTo(\"S\") == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tstartRow = i;\r\n\t\t\t\t\tstartColumn = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//This sends the startRow, startColumn, 2d String array named Map (which contains all the coordinates), \r\n\t\t//and the output and input file names to getPath. \r\n\t\tSystem.out.println(getPath(startRow, startColumn, Map, outputFile, inputFile));\t\t\r\n\t}",
"File getWorkfile();",
"private static void copyFile(File scrFile, File file) {\n\t\r\n}",
"private static File resolveMetaFile(String path) {\n return new File(StringUtils.substringBefore(path, DEF_LOC_ARTIFACT) + DEF_REL_META + File.separator + \"project.tms.json\");\n }",
"private static String getSourceFile() {\n\t\tFileChooser fileChooser = new FileChooser(System.getProperty(\"user.home\"),\n\t\t\t\t\"Chose json file containing satellite data!\", \"json\");\n\t\tFile file = fileChooser.getFile();\n\t\tif (file == null) {\n\t\t\tSystem.exit(-42);\n\t\t}\n\t\treturn file.getAbsolutePath();\n\t}",
"@Override\n public void open(File file)\n {\n MazeInfoModel mim = Main.getPrimaryFrameInstance().getMazeInfoModel();\n if (!mim.addMaze(file))\n JOptionPane.showMessageDialog(this, \"<html>Unable to load \" +\n \"<br />\" +\n file.getAbsolutePath() +\n \"</html\", \"Maze Open Error\", JOptionPane.ERROR_MESSAGE);\n\n }",
"String getFilepath();",
"File getLoadLocation();",
"public String getPath() {\n\t\treturn file.getPath();\n\t}",
"static File localFile(String path, String name) {\n\t\tFile f = new File(path, name.replace('*', 'X'));\n\t\treturn new File(f.getAbsolutePath()); /* make EVM use user.dir */\n\t}",
"public void setMapFile(String mapName) {\n map = Map.loadFromJSON(mapName);\n }",
"public Node getFileLocation(String filename)\n\t{\n\t\treturn nodeManager.getNodeList().getFileLocation(filename);\n\t}",
"public MapData(String mapName) {\n this.mapName = mapName;\n readFile();\n}",
"FileObject getFile();",
"FileObject getFile();",
"public String getPath();",
"public String getPath();",
"public String getPath();",
"ResourceLocation resolve(String path);",
"protected synchronized Hashtable getMappingsFromFile() throws Exception {\n\n \t\n\t\tInputStream path = null;\n\n\t\tpath = getClass().getResourceAsStream(\"../../../config/mappings.txt\");\n\n\t\tSystem.out.println(\"Path is - \" + path);\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(path));\n/*\t\tStringBuilder sb = new StringBuilder();\n\t\tString line1 = null;\n\t\twhile ((line1 = reader.readLine()) != null) {\n\t\t\tsb.append(line1 + \"\\n\");\n\t\t}\n*/\t\t//System.out.println(\"String is - \" + sb.toString());\n\t\t\n/* \tFile f = new File(\"src/edu/ucsd/crbs/incf/components/services/emage/mappings.txt\");\n System.out.println(\"Mapping - \" + f.getAbsolutePath());\n\n*/ /*if(sb.toString().trim().equals(\"\") || sb.toString() == null ) {\n System.err.println(\"bisel.ReadMappings cannot find mapping file\");\n System.exit(1);\n }*/\n\n Hashtable mappings = new Hashtable(17, new Float(1.25).floatValue());\n\n\n //BufferedReader br = new BufferedReader(new FileReader(f));\n String line = reader.readLine();\n while(line != null) { \n StringTokenizer st = new StringTokenizer(line, \"*\");\n String aba = st.nextToken();\n String emap = st.nextToken();\n mappings.put(aba, emap);\n line = reader.readLine();\n }\n\n reader.close();\n return mappings;\n }",
"public FileLocation(File file) {\n this(file, -1, -1);\n }",
"public void setMarkersReferenceFromTRC(String filename) {\n opensimMocoJNI.MocoTrack_setMarkersReferenceFromTRC__SWIG_1(swigCPtr, this, filename);\n }",
"public void mapUserFileToUserFileEntity(UserFile userFile, UserFileEntity userFileEntity) {\n\t\tif(userFile == null) {\n\t\t\treturn;\n\t\t}\n\n\t\t//--- Generic mapping \n\t\tmap(userFile, userFileEntity);\n\n\t}",
"public String searchFromGridFile(File file) {\n String result = \"\";\n\n // TODO: read file and generate path using AStar algorithm\n\n return result;\n }",
"public static void save(File file, Workspace workspace) {\r\n if (file != null) {\r\n // System.out.println(\"Workspace Save -->\" + file);\r\n try {\r\n FileOutputStream ostream = new FileOutputStream(file);\r\n try {\r\n WorkspaceSerializer serializer = new WorkspaceSerializer(\r\n workspace);\r\n serializer.serialize(ostream);\r\n workspace.setWorkspaceChanged(false);\r\n } finally {\r\n ostream.close();\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }",
"private InputSource filesystemLookup(ResourceLocation matchingEntry) {\n\n String uri = matchingEntry.getLocation();\n // the following line seems to be necessary on Windows under JDK 1.2\n uri = uri.replace(File.separatorChar, '/');\n URL baseURL;\n\n //\n // The ResourceLocation may specify a relative path for its\n // location attribute. This is resolved using the appropriate\n // base.\n //\n if (matchingEntry.getBase() != null) {\n baseURL = matchingEntry.getBase();\n } else {\n try {\n baseURL = FILE_UTILS.getFileURL(getProject().getBaseDir());\n } catch (MalformedURLException ex) {\n throw new BuildException(\"Project basedir cannot be converted to a URL\");\n }\n }\n\n URL url = null;\n try {\n url = new URL(baseURL, uri);\n } catch (MalformedURLException ex) {\n // this processing is useful under Windows when the location of the DTD\n // has been given as an absolute path\n // see Bugzilla Report 23913\n File testFile = new File(uri);\n if (testFile.exists() && testFile.canRead()) {\n log(\"uri : '\"\n + uri + \"' matches a readable file\", Project.MSG_DEBUG);\n try {\n url = FILE_UTILS.getFileURL(testFile);\n } catch (MalformedURLException ex1) {\n throw new BuildException(\n \"could not find an URL for :\" + testFile.getAbsolutePath());\n }\n } else {\n log(\"uri : '\"\n + uri + \"' does not match a readable file\", Project.MSG_DEBUG);\n\n }\n }\n\n InputSource source = null;\n if (url != null && \"file\".equals(url.getProtocol())) {\n String fileName = FILE_UTILS.fromURI(url.toString());\n if (fileName != null) {\n log(\"fileName \" + fileName, Project.MSG_DEBUG);\n File resFile = new File(fileName);\n if (resFile.exists() && resFile.canRead()) {\n try {\n source = new InputSource(Files.newInputStream(resFile.toPath()));\n String sysid = JAXPUtils.getSystemId(resFile);\n source.setSystemId(sysid);\n log(\"catalog entry matched a readable file: '\"\n + sysid + \"'\", Project.MSG_DEBUG);\n } catch (IOException ex) {\n // ignore\n }\n }\n }\n }\n return source;\n }",
"public void setWorldFile(File newFile) {\n File configDirectory = new File(newFile,CONFIG_DIRECTORY);\n configDirectory.mkdir();\n\n String configName = generalConfigFile.getPath();\n String generalConfigDirectoryName = generalConfigFile.getParentFile().getPath();\n String detailName = configName.substring(generalConfigDirectoryName.length()+1);\n //logger.info(\"Filename \"+detailName);\n File localConfigFile = new File(configDirectory,detailName);\n setWorldConfigFile(localConfigFile);\n }",
"public static File getResourceAsFile(String fileEntry) {\n\t\tFile file = null;\n \ttry {\n \t\tURL url \t= Activator.getDefault().getBundle().getEntry(fileEntry);\n \t\tURL fileURL = FileLocator.toFileURL(url);\n \t\tURL resolve = FileLocator.resolve(fileURL);\n \t\tfile \t\t= new File(resolve.getFile());\n \t} catch(Exception e){\n Activator.getDefault().log(e.getMessage(), e);\n \t}\n \treturn file;\n\t\t\n\t}",
"public static File loadFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(Main.class);\n String filePath = prefs.get(\"filePath\", null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }",
"public UserFile mapUserFileEntityToUserFile(UserFileEntity userFileEntity) {\n\t\tif(userFileEntity == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\t//--- Generic mapping \n\t\tUserFile userFile = map(userFileEntity, UserFile.class);\n\n\t\treturn userFile;\n\t}",
"void openFilePath(String newFilePath) throws IllegalValueException;",
"private static String getEntryName(File source, File file) throws IOException {\n\t\tint index = source.getAbsolutePath().length() + 1;\n\t\tString path = file.getCanonicalPath();\n\n\t\treturn path.substring(index);\n\t}",
"private static boolean getPath(int startRow, int startColumn, String[][] Map, String outputFile, String inputFile) {\n\t\tQueue<Node> q = new LinkedList<Node>();\t\t\t\t\r\n\t\t\r\n\t\t//Sets the Start Node Row and Column values.\r\n\t\tNode Start = new Node(startRow + \" \" + startColumn);\r\n\t\tStart.column = startColumn;\r\n\t\tStart.row = startRow;\r\n\t\t\r\n\t\t//This is the up, left, right, and down coordinates for searching neighboring items.\r\n\t\tint[]dx = {0, 0, -1, 1};\r\n\t\tint[]dy = {-1, 1, 0, 0};\r\n\t\t\r\n\r\n\t\t//Adds the Start Node to the Queue.\r\n\t\tq.add(Start);\r\n\t\twhile(q.size() > 0)\r\n\t\t{\r\n\t\t\t//This takes the first item in the Queue for comparing and looking at its neighbors.\r\n\t\t\tNode x = q.poll();\r\n\t\t\t\r\n\t\t\tif(x.visited != 1)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t//If the current node is the Goal, then it retraces it's steps (cameFrom) and prints out the path onto the 2d array named Map.\r\n\t\t\tif (Map[x.row][x.column].compareTo(\"G\") == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\twhile (x.cameFrom != null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (Map[x.row][x.column].compareTo(\"G\") != 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tMap[x.row][x.column] = \".\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tx = x.cameFrom;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t//Here is where it writes the solution and maze to a text file.\r\n\t\t\t\t\t\tFile file = new File(outputFile);\r\n\r\n\t\t\t\t\t\tif (!file.exists()) {\r\n\t\t\t\t\t\t\tfile.createNewFile();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile());\r\n\t\t\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tFile text = new File(inputFile);\r\n\t\t\t\t\t\tScanner rowColumn;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\trowColumn = new Scanner(text);\r\n\t\t\t\t\t\t\tString row = rowColumn.next();\r\n\t\t\t\t\t\t\tString row2 = rowColumn.next();\r\n\t\t\t\t\t\t\tbw.write(row + \" \" + row2 + \"\\n\");\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor(int i = 0; i < Map.length; i++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfor(int j = 0; j < Map[0].length; j++)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tbw.write(Map[i][j]);\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbw.write(\"\\n\");\r\n\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t\tbw.close();\r\n\r\n\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\t//This checks the up, left, right, and down values of the current Node.\r\n\t\t\tfor(int i = 0; i < 4; i++)\r\n\t\t\t{\r\n\t\t\t\tint yy = x.row + dx[i];\r\n\t\t\t\tint xx = x.column + dy[i];\r\n\t\t\t\r\n\t\t\t\tif(xx >= 1 && yy >= 1)\r\n\t\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t\tif(Map[yy][xx].compareTo(\" \") == 0 && Map[yy][xx].compareTo(\"X\") != 0 && (x.visited != 1) || Map[yy][xx].compareTo(\"G\") == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tboolean on = true;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//This checks the Queue and makes sure the current item isn't in there. \r\n\t\t\t\t\t\t//If it is, then it turns off the switch. \r\n\t\t\t\t\t\tfor(Node I: q)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tif (I.column == xx && I.row == yy)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\ton = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (on == true)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t//If a node hasn't been looked at yet, it creates a node for it and adds it to the Queue. \r\n\t\t\t\t\t\tNode Neighbor = new Node(yy + \" \" + xx);\r\n\t\t\t\t\t\tNeighbor.column = xx;\r\n\t\t\t\t\t\tNeighbor.row = yy;\r\n\t\t\t\t\t\tNeighbor.cameFrom = x;\r\n\t\t\t\t\t\tq.add(Neighbor);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//Turns the switch back on after the ForEach loop\r\n\t\t\t\t\t\ton = true;\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t\t//Here is where I'm trying to check if all the Nodes in the Queue have been visited,\r\n\t\t\t//If so, then it will return false because there is no path. Not currently working though. \r\n\t\t\tx.visited = 1;\r\n\t\t\tint counter = 0;\r\n\t\t\tfor(Node temp: q)\r\n\t\t\t{\r\n\t\t\t\tif (temp.visited == 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tcounter++;\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\tif (q.size() == counter)\r\n\t\t\t\t\t{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t}\t\t\r\n\t\treturn false;\r\n\t}",
"public void saveMap() {\n this.scanMap();\n String userHome = System.getProperty(\"user.home\");\n BinaryExporter export = BinaryExporter.getInstance();\n File file = new File(userHome + \"world.j3o\");\n try {\n export.save(this.testNode, file); \n } catch (IOException ex) {\n Logger.getLogger(mapDevAppState_2.class.getName()).log(Level.SEVERE, \"File write error\");\n }\n }",
"public void updatePathAndFile(String path, String file){\r\n\t\tthis.path = path;\r\n\t\tthis.file = file;\r\n\t}",
"public void handleOpenFile (File inFile) {\n openFile (inFile);\n }",
"void setNewFile(File file);",
"public void setResourcefile (File file)\n {\n _resourcefile = file;\n }",
"@NotNull\n public File repositoryFileFromVirtualFile(VirtualFile file)\n {\n String pathRelativeToRepository = file.getPath().substring(this.root().getPath().length());\n\n return new File(pathRelativeToRepository, file.getName());\n }",
"private void updateIndexMap(String file) {\n\t\ttry (Scanner s = new Scanner(new File(file))) {\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tString word = TextParserUtil.cleanWord(s.next());\n\t\t\t\tString partition = word.substring(0, 1);\n\t\t\t\tif (indexedDir.get(partition) == null) {\n\t\t\t\t\tinsertPartitionEntry(file, word, partition);\n\t\t\t\t} else if (indexedDir.get(partition).get(word) == null) {\n\t\t\t\t\tinsertWordEntry(file, word, partition);\n\t\t\t\t} else if (indexedDir.get(partition).get(word) != null) {\n\t\t\t\t\tupdateFileList(file, word, partition);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}",
"public static Mapping newMapping(RulesDirectory rd, IRSession session, String filename){\n Mapping mapping = new Mapping(session);\n \ttry {\n\t\t\tInputStream s = session.getRulesDirectory().getFileSource().openStreamSearch(\n\t\t\t FileType.MAP, session.getRuleSet(), filename);\n session.getState().traceTagBegin(\"loadMapping\", \"file\",filename);\n\t\t\tmapping.loadMap(s);\n\t\t\tsession.getState().traceTagEnd(); \n\t\t} catch (FileNotFoundException e) {\n \t\t\tthrow new RuntimeException(e);\n\t\t} catch (Exception e) {\n \t\t\tthrow new RuntimeException(\"Error accessing '\"+filename+\"'\\r\\n\"+e);\n\t\t}\n\t\treturn mapping;\n }",
"private void openFile(File file)\n {\n String imagePath = file.toURI().toString();\n Image image = new Image(imagePath);\n if ( image == null || image.isError())\n {\n showInvalidFileFormatError();\n } else\n {\n bufferImage = image;\n changeAvatarCircle.setFill(new ImagePattern(image));\n imagePathLabel.setText(imagePath);\n }\n }",
"public abstract String getPath();",
"public abstract String getPath();",
"@Override\r\n\tpublic int update_file(Map<String, Object> map) throws Exception {\n\t\treturn sql.update(\"cms_board.update_file\", map);\r\n\t}",
"public FileLocation findFile(int k) {\n RemoteMapper rm = findMapper(k);\n FileLocation fl = null;\n try {\n return rm.lookup(k);\n } catch (RemoteException ex) {\n System.err.println(\"Mapper.findFile remote Exception\");\n }\n\n return fl;\n }",
"String getPath();",
"String getPath();",
"String getPath();"
] |
[
"0.64195627",
"0.57360375",
"0.56633717",
"0.55430746",
"0.5432205",
"0.5418685",
"0.537601",
"0.53421533",
"0.52852887",
"0.52373844",
"0.52271634",
"0.5208407",
"0.5149971",
"0.50878185",
"0.5085971",
"0.5082255",
"0.5058626",
"0.50452125",
"0.50432605",
"0.50412244",
"0.5027466",
"0.5026286",
"0.5009619",
"0.50078624",
"0.49955332",
"0.49955332",
"0.4982391",
"0.4979229",
"0.4976297",
"0.49750322",
"0.49697813",
"0.49673787",
"0.49624676",
"0.49622217",
"0.49445152",
"0.4943446",
"0.4875859",
"0.48756236",
"0.48681745",
"0.48608324",
"0.48532727",
"0.48475358",
"0.4834771",
"0.48253736",
"0.48199204",
"0.48075038",
"0.48060232",
"0.48020476",
"0.47815272",
"0.47799158",
"0.4774131",
"0.47707626",
"0.4770279",
"0.47659603",
"0.47624725",
"0.47562057",
"0.4755625",
"0.4746004",
"0.47406268",
"0.47291985",
"0.47268432",
"0.47258008",
"0.47197434",
"0.47093448",
"0.470032",
"0.470032",
"0.46992296",
"0.46992296",
"0.46992296",
"0.4690724",
"0.46894932",
"0.46855584",
"0.46833584",
"0.46813762",
"0.46761736",
"0.46736717",
"0.467061",
"0.46700132",
"0.46620628",
"0.46604103",
"0.4660366",
"0.4653981",
"0.46523413",
"0.4644035",
"0.46430132",
"0.4640179",
"0.46347398",
"0.46341598",
"0.4631209",
"0.4630292",
"0.46217155",
"0.46186695",
"0.461741",
"0.46166044",
"0.46166044",
"0.46153498",
"0.4609294",
"0.46090686",
"0.46090686",
"0.46090686"
] |
0.56908756
|
2
|
Map the given file to a resource in the current workspace. This only handles files that map to known workspace resources.
|
public static IResource convertFileToExistingResource(File file) {
IPath path = new Path(file.getAbsolutePath());
IPath wsPath = convertToWorkspacePath(path, true);
if (wsPath != null)
return ResourcesPlugin.getWorkspace().getRoot().findMember(wsPath);
return null;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setResourcefile (File file)\n {\n _resourcefile = file;\n }",
"public Resource load(IFile f);",
"public static IFile convertFileToIFile(File file) {\r\n IPath path = new Path(file.getAbsolutePath());\r\n \r\n IPath wsPath = convertToWorkspacePath(path, true);\r\n if (wsPath != null)\r\n \treturn ResourcesPlugin.getWorkspace().getRoot().getFile(wsPath);\r\n \r\n return null;\r\n }",
"public static void openFile(File map) throws IOException {\n\t\ttry {\n\t\t\tinput = new ObjectInputStream(new FileInputStream(map));\n\t\t\t\n\t\t} catch(IOException e) {\n\t\t\tSystem.err.println(\"Error: Unable to open map file.\");\n\t\t\tthrow e;\n\t\t}\n\t}",
"private void updateFileResource(Long fileId) {\n editResourceService.getVMFile(fileId, new AsyncCallback<VMFile>() {\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(VMFile result) {\n FileTreeNode targetNode = (FileTreeNode) fileTreeNodeFactory.findTreeNode(tree, fileId);\n targetNode.setResource(result);\n }\n });\n }",
"static JsonResource forFile( File file ) {\n return new JsonResource() {\n @Override\n public <T> T readFrom( ReadMethod<T> consumer ) throws IOException {\n try ( FileInputStream stream = new FileInputStream(file) ) {\n return consumer.read(stream);\n }\n }\n };\n }",
"public void setResourceFile(File fileName) {\n resourceFile = fileName;\n }",
"ResourceLocation resolve(String path);",
"public void open() {\r\n\t\tFile f = getOpenFile(\"Map Files\", \"tilemap\");\r\n\t\tif (f == null) return;\r\n\t\tfile = f;\r\n\t\tframe.setTitle(\"Tile Mapper - \"+file.getName());\r\n\t\tSystem.out.println(\"Opening \"+file.getAbsolutePath());\r\n\r\n\t\ttry {\r\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\r\n\t\t\tInputStream is = this.getClass().getClassLoader().getResourceAsStream(\"tilemapper/Map.xsd\");\r\n\t\t\tfactory.setSchema(SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(new StreamSource(is)));\r\n\r\n\t\t\tDocument dom = factory.newDocumentBuilder().parse(file);\r\n\r\n\t\t\t// we have a valid document\r\n\t\t\t//printNode(dom, \"\");\r\n\t\t\tNode mapNode = null;\r\n\t\t\tNodeList nodes = dom.getChildNodes();\r\n\t\t\tfor (int i=0; i<nodes.getLength(); i++) {\r\n\t\t\t\tNode node = nodes.item(i);\r\n\t\t\t\tif (node.getNodeName() == \"Map\") mapNode = node;\r\n\t\t\t}\r\n\t\t\tif (mapNode == null) return;\r\n\t\t\tmapPanel.parseDOM((Element)mapNode);\r\n\r\n\t\t} catch (ParserConfigurationException e) {\r\n\t\t\tSystem.out.println(\"The underlying parser does not support the requested features.\");\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (FactoryConfigurationError e) {\r\n\t\t\tSystem.out.println(\"Error occurred obtaining Document Builder Factory.\");\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public String getMappingFilePath();",
"private Resource createResource(final File file) throws IOException {\n\n // TODO: see this gist to prevent re-reading the same resource file if it's already registered\n // https://gist.github.com/3998818\n\n Registry<String, String> properties = ResourceUtil.readConfiguration(file);\n String resourceName = properties.getEntryValue(ResourceConstants.RESOURCE_NAME);\n\n String rootNode = properties.getEntryValue(ResourceConstants.RESOURCE_ROOT_NODE);\n\n String objectClassKey = properties.getEntryValue(ResourceConstants.RESOURCE_OBJECT);\n Class objectClass = classRegistry.getEntryValue(objectClassKey);\n\n String algorithmKey = properties.getEntryValue(ResourceConstants.RESOURCE_ALGORITHM_CLASS);\n Algorithm algorithm = algorithmFactory.createImplementation(algorithmKey);\n\n String resolverKey = properties.getEntryValue(ResourceConstants.RESOURCE_URI_RESOLVER_CLASS);\n Resolver resolver = resolverFactory.createImplementation(resolverKey);\n\n Resource resource = new ObjectResource(resourceName, rootNode, objectClass, algorithm, resolver);\n\n Object uniqueField = properties.getEntryValue(ResourceConstants.RESOURCE_UNIQUE_FIELD);\n List<String> uniqueFields = new ArrayList<String>();\n if (uniqueField != null)\n uniqueFields = Arrays.asList(StringUtil.split(uniqueField.toString(), \",\"));\n\n List<String> ignoredField = ResourceConstants.NON_SEARCHABLE_FIELDS;\n Map<String, String> entries = properties.getEntries();\n for (String fieldName : entries.keySet()) {\n if (!ignoredField.contains(fieldName)) {\n Boolean unique = Boolean.FALSE;\n if (uniqueFields.contains(fieldName))\n unique = Boolean.TRUE;\n resource.addFieldDefinition(fieldName, entries.get(fieldName), unique);\n }\n }\n\n return resource;\n }",
"private InputSource filesystemLookup(ResourceLocation matchingEntry) {\n\n String uri = matchingEntry.getLocation();\n // the following line seems to be necessary on Windows under JDK 1.2\n uri = uri.replace(File.separatorChar, '/');\n URL baseURL;\n\n //\n // The ResourceLocation may specify a relative path for its\n // location attribute. This is resolved using the appropriate\n // base.\n //\n if (matchingEntry.getBase() != null) {\n baseURL = matchingEntry.getBase();\n } else {\n try {\n baseURL = FILE_UTILS.getFileURL(getProject().getBaseDir());\n } catch (MalformedURLException ex) {\n throw new BuildException(\"Project basedir cannot be converted to a URL\");\n }\n }\n\n URL url = null;\n try {\n url = new URL(baseURL, uri);\n } catch (MalformedURLException ex) {\n // this processing is useful under Windows when the location of the DTD\n // has been given as an absolute path\n // see Bugzilla Report 23913\n File testFile = new File(uri);\n if (testFile.exists() && testFile.canRead()) {\n log(\"uri : '\"\n + uri + \"' matches a readable file\", Project.MSG_DEBUG);\n try {\n url = FILE_UTILS.getFileURL(testFile);\n } catch (MalformedURLException ex1) {\n throw new BuildException(\n \"could not find an URL for :\" + testFile.getAbsolutePath());\n }\n } else {\n log(\"uri : '\"\n + uri + \"' does not match a readable file\", Project.MSG_DEBUG);\n\n }\n }\n\n InputSource source = null;\n if (url != null && \"file\".equals(url.getProtocol())) {\n String fileName = FILE_UTILS.fromURI(url.toString());\n if (fileName != null) {\n log(\"fileName \" + fileName, Project.MSG_DEBUG);\n File resFile = new File(fileName);\n if (resFile.exists() && resFile.canRead()) {\n try {\n source = new InputSource(Files.newInputStream(resFile.toPath()));\n String sysid = JAXPUtils.getSystemId(resFile);\n source.setSystemId(sysid);\n log(\"catalog entry matched a readable file: '\"\n + sysid + \"'\", Project.MSG_DEBUG);\n } catch (IOException ex) {\n // ignore\n }\n }\n }\n }\n return source;\n }",
"private String retrieveWorkSpaceFileLoc(String fileName) {\n ArrayList<String> regResourceProjects = loadRegistryResourceProjects();\n boolean fileExists = false;\n IWorkspace workspace = ResourcesPlugin.getWorkspace();\n String folder = workspace.getRoot().getLocation().toFile().getPath().toString();\n String resourceFilePath = null;\n for (String regResourceProject : regResourceProjects) {\n resourceFilePath = folder + File.separator + regResourceProject + File.separator +\n fileName;\n File resourceFile = new File(resourceFilePath);\n if (resourceFile.exists()) {\n fileExists = true;\n break;\n }\n }\n if (!fileExists) {\n displayUserError(RESGISTRY_RESOURCE_RETRIVING_ERROR, NO_SUCH_RESOURCE_EXISTS);\n }\n return resourceFilePath;\n }",
"@Override\n public InputStream findResource(String filename)\n {\n InputStream resource = null;\n try\n {\n Path scriptRootPath = Files.createDirectories(getScriptRootPath(side));\n Path scriptPath = scriptRootPath.resolve(filename).toAbsolutePath();\n resource = Files.newInputStream(scriptPath, StandardOpenOption.READ);\n } catch (IOException e)\n {\n resource = super.findResource(filename);\n }\n return resource;\n }",
"public void registerResources(final File file) throws IOException {\n FileFilter fileFilter = new ResourceFileFilter();\n if (!file.isDirectory() && fileFilter.accept(file)) {\n registerResource(createResource(file));\n } else {\n File[] files = file.listFiles(fileFilter);\n if (files != null) {\n for (File resourceFile : files)\n registerResources(resourceFile);\n }\n }\n }",
"public Resource load(String filename) throws MalformedURLException;",
"public Resource loadFileAsResource(String fileName) {\n try {\n Path filePath = this.fileStorageLocation.resolve(fileName).normalize();\n Resource resource = new UrlResource(filePath.toUri());\n if(resource.exists()) {\n return resource;\n } else {\n throw new HubFileNotFoundException(\"File not found \" + fileName);\n }\n } catch (MalformedURLException ex) {\n throw new HubFileNotFoundException(\"File not found \" + fileName, ex);\n }\n }",
"public ResourceInputStream(File file) throws IOException {\n\t\t\tthis(new FileInputStream(file), file.lastModified());\n\t\t}",
"public static File getResourceAsFile(String fileEntry) {\n\t\tFile file = null;\n \ttry {\n \t\tURL url \t= Activator.getDefault().getBundle().getEntry(fileEntry);\n \t\tURL fileURL = FileLocator.toFileURL(url);\n \t\tURL resolve = FileLocator.resolve(fileURL);\n \t\tfile \t\t= new File(resolve.getFile());\n \t} catch(Exception e){\n Activator.getDefault().log(e.getMessage(), e);\n \t}\n \treturn file;\n\t\t\n\t}",
"public static Resource loadFromFile() {\n File file = new File(saveFilePath);\n // create a new file if it doesn't exist\n if (!file.exists()) {\n // save an empty resource object\n Resource resource = new Resource();\n resource.saveToFile();\n }\n\n Resource resource = null;\n try {\n resource = (Resource) loadObjFromFile(saveFilePath);\n } catch (InvalidClassException e) {\n // if resource file is outdated or corrupted reset file\n resource = new Resource();\n resource.saveToFile();\n staticLog(\"resource file was corrupted, cleared with new one\");\n// e.printStackTrace();\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n resource.activeUsers = new HashMap<>();\n resource.activeProjects = new HashMap<>();\n return resource;\n }",
"void openResource(String resourcePath);",
"public void mapResourceNameToCodeBaseEntry(String resourceName, ICodeBaseEntry codeBaseEntry);",
"void resourceChanged(IPath workspacePath);",
"TiledMap loadMap(String path);",
"public static synchronized void putResourceManager(final Path file, final ResourceManager<?, ?> resourceManager) {\n Databases.RESOURCE_MANAGERS.computeIfAbsent(file, path -> new HashSet<>()).add(resourceManager);\n LOGGER.debug(\"Added resource manager: \" + file);\n }",
"private ResourceWrapper getWrappedResourceContent(String runtimeName, Resource resource, Map<Requirement, Resource> mapping) {\n IllegalArgumentAssertion.assertNotNull(runtimeName, \"runtimeName\");\n IllegalArgumentAssertion.assertNotNull(resource, \"resource\");\n\n // Do nothing if there is no mapping\n if (mapping == null || mapping.isEmpty()) {\n InputStream content = getFirstRelevantResourceContent(resource).getContent();\n return new ResourceWrapper(runtimeName, runtimeName, content);\n }\n\n // Create content archive\n InputStream content = getFirstRelevantResourceContent(resource).getContent();\n ConfigurationBuilder config = new ConfigurationBuilder().classLoaders(Collections.singleton(ShrinkWrap.class.getClassLoader()));\n JavaArchive archive = ShrinkWrap.createDomain(config).getArchiveFactory().create(JavaArchive.class, runtimeName);\n archive.as(ZipImporter.class).importFrom(content);\n\n boolean wrapAsSubdeployment = runtimeName.endsWith(\".war\");\n\n // Create wrapper archive\n JavaArchive wrapper;\n Asset structureAsset;\n if (wrapAsSubdeployment) {\n wrapper = ShrinkWrap.createDomain(config).getArchiveFactory().create(JavaArchive.class, \"wrapped-\" + runtimeName + \".ear\");\n structureAsset = new StringAsset(generateSubdeploymentDeploymentStructure(resource, runtimeName, mapping));\n } else {\n wrapper = ShrinkWrap.createDomain(config).getArchiveFactory().create(JavaArchive.class, \"wrapped-\" + runtimeName);\n structureAsset = new StringAsset(generateDeploymentStructure(resource, runtimeName, mapping));\n }\n wrapper.addAsManifestResource(structureAsset, \"jboss-deployment-structure.xml\");\n wrapper.add(archive, \"/\", ZipExporter.class);\n\n content = wrapper.as(ZipExporter.class).exportAsInputStream();\n return new ResourceWrapper(wrapper.getName(), runtimeName, content);\n }",
"public TiledMap load(String id, String file) throws RuntimeException, SAXException, IOException, ParserConfigurationException {\r\n Document doc = UtilXML.loadDocument(file);\r\n\r\n if (!isTmxMap(doc))\r\n throw new RuntimeException(\"XML file isn't formatted as a TMX map!\");\r\n\r\n TiledMap map = createMap(id, doc);\r\n\r\n readTilesets(map, doc, file);\r\n readMapTileLayers(map, doc, file);\r\n readMapObjects(map, doc, file);\r\n return map;\r\n\r\n }",
"public FileWithFaultLocations getFile(final String file);",
"private File getIOFile() {\n \t\tIPath location = resource.getLocation();\n \t\tif(location!=null) {\n \t\t\treturn location.toFile();\n \t\t}\n \t\treturn null;\n \t}",
"public static Reference create(IFile file) {\n return new Reference(file.getProject(), getMapKey(file));\n }",
"private JPPFResourceWrapper loadResourceData(Map<String, Object> map, boolean asResource) throws ClassNotFoundException\n\t{\n\t\tJPPFResourceWrapper resource = null;\n\t\ttry\n\t\t{\n\t\t\tif (debugEnabled) log.debug(\"loading remote definition for resource [\" + map.get(\"name\") + \"]\");\n\t\t\tresource = loadResourceData0(map, asResource);\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tif (debugEnabled) log.debug(\"connection with class server ended, re-initializing\");\n\t\t\tinit();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tresource = loadResourceData0(map, asResource);\n\t\t\t}\n\t\t\tcatch(ClassNotFoundException ex)\n\t\t\t{\n\t\t\t\tthrow ex;\n\t\t\t}\n\t\t\tcatch(Exception ex)\n\t\t\t{\n\t\t\t\tif (debugEnabled) log.debug(e.getMessage(), e);\n\t\t\t}\n\t\t}\n\t\tcatch(ClassNotFoundException e)\n\t\t{\n\t\t\tthrow e;\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tif (debugEnabled) log.debug(e.getMessage(), e);\n\t\t}\n\t\treturn resource;\n\t}",
"public SourceInterestMapResource() {\n }",
"public abstract ResourceInputStream getResource(String resName, HttpServletRequest request);",
"public MapMessage processFile(File file) {\r\n\t\ttry {\r\n\r\n\t\t\tScanner input = new Scanner(file);\r\n\r\n\t\t\twhile (input.hasNext()) {\r\n\t\t\t\tString line = input.nextLine();\r\n\t\t\t\tif (!line.isEmpty()) {\r\n\t\t\t\t\tfileContent.append(line).append(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tinput.close();\r\n\r\n\t\t} catch (FileNotFoundException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\tMapMessage mapMessage = validateMap(fileContent.toString());\r\n\t\treturn mapMessage;\r\n\t}",
"private Map<String, String> internalGetResIdsForFile(IProject project, String xmlFileWsPath) {\n\n TreeMap<String, String> ids = new TreeMap<String, String>();\n\n // Access the project that contains the resource that contains the compilation unit\n IResource resource = project.getFile(xmlFileWsPath);\n\n if (resource != null && resource.exists() && resource.getType() == IResource.FILE) {\n IStructuredModel smodel = null;\n\n try {\n IFile file = (IFile) resource;\n IModelManager modelMan = StructuredModelManager.getModelManager();\n smodel = modelMan.getExistingModelForRead(file);\n if (smodel == null) {\n smodel = modelMan.getModelForRead(file);\n }\n\n if (smodel instanceof IDOMModel) {\n IDOMDocument doc = ((IDOMModel) smodel).getDocument();\n\n // We want all the IDs in an XML structure like this:\n // <resources>\n // <string name=\"ID\">something</string>\n // </resources>\n\n Node root = findChild(doc, null, SdkConstants.TAG_RESOURCES);\n if (root != null) {\n for (Node strNode = findChild(root, null,\n SdkConstants.TAG_STRING);\n strNode != null;\n strNode = findChild(null, strNode,\n SdkConstants.TAG_STRING)) {\n NamedNodeMap attrs = strNode.getAttributes();\n Node nameAttr = attrs.getNamedItem(SdkConstants.ATTR_NAME);\n if (nameAttr != null) {\n String id = nameAttr.getNodeValue();\n\n // Find the TEXT node right after the element.\n // Whitespace matters so we don't try to normalize it.\n String text = \"\"; //$NON-NLS-1$\n for (Node txtNode = strNode.getFirstChild();\n txtNode != null && txtNode.getNodeType() == Node.TEXT_NODE;\n txtNode = txtNode.getNextSibling()) {\n text += txtNode.getNodeValue();\n }\n\n ids.put(id, text);\n }\n }\n }\n }\n\n } catch (Throwable e) {\n AdtPlugin.log(e, \"GetResIds failed in %1$s\", xmlFileWsPath); //$NON-NLS-1$\n } finally {\n if (smodel != null) {\n smodel.releaseFromRead();\n }\n }\n }\n\n return ids;\n }",
"public MapResourcePack(MapResourcePack baseResourcePack, String resourcePackPath) {\n this(baseResourcePack, resourcePackPath, \"\");\n }",
"public MapProcessor(String mapFile) throws IOException\n {\n validateReflexMapFile(mapFile);\n\n if (reflexValidated)\n {\n //Set the map file parameter\n this.mapFile = mapFile;\n\n //Initialize the map scanner\n mapScanner = new Scanner(new File(mapFile));\n\n //Tell the user everything is honky dory for the scanner\n System.out.println(\"\\nLoaded your file: \" + mapFile);\n\n //The name of the file with the modification in the name\n String partialFileName = mapFile.substring(0, mapFile.length() - 4);\n\n //Initialize the file writer\n mapWriter = new FileWriter(partialFileName + \"_BrushShifted.map\");\n\n //Tell the user everything is honky dory for the writer\n System.out.println(\"Initialized empty map file for writing: \" + partialFileName + \"_BrushShifted.map\");\n\n lines = new String[lineCount()];\n System.out.println(\"Created array of lines with size \" + lines.length + \"\\n\");\n }\n }",
"public Resource getTargetResource();",
"public File addResource(String id, File f) {\n\t\trks.add(id);\n\t\trvs.add(f);\n\t\treturn f;\n\t}",
"Resource getResource();",
"public ICodeBaseEntry lookupResource(String resourceName) throws ResourceNotFoundException;",
"public static void save(File file, Workspace workspace) {\r\n if (file != null) {\r\n // System.out.println(\"Workspace Save -->\" + file);\r\n try {\r\n FileOutputStream ostream = new FileOutputStream(file);\r\n try {\r\n WorkspaceSerializer serializer = new WorkspaceSerializer(\r\n workspace);\r\n serializer.serialize(ostream);\r\n workspace.setWorkspaceChanged(false);\r\n } finally {\r\n ostream.close();\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }",
"private JPPFResourceWrapper loadResourceData0(Map<String, Object> map, boolean asResource) throws Exception\n\t{\n\t\tif (debugEnabled) log.debug(\"loading remote definition for resource [\" + map.get(\"name\") + \"], requestUuid = \" + requestUuid);\n\t\tJPPFResourceWrapper resource = loadRemoteData(map, false);\n\t\tif (debugEnabled) log.debug(\"remote definition for resource [\" + map.get(\"name\") + \"] \"+ (resource.getDefinition()==null ? \"not \" : \"\") + \"found\");\n\t\treturn resource;\n\t}",
"public INIPreferences(Path fileName) throws IOException {\n this.fileName = Objects.requireNonNull(fileName);\n\n map = new HashMap<>();\n\n if(Files.exists(fileName)) {\n load(fileName);\n }\n }",
"public MappingType loadMappingType(String path) throws IOException {\t\t\n\t\tResource resource = resourceSet.createResource(URI.createFileURI(path));\n\t\tresource.load(Collections.EMPTY_MAP);\n\t\tDocumentRootImpl root = (DocumentRootImpl)resource.getContents().get(0);\n\t\tMappingType mapping = root.getMapping();\t\t\n\t\treturn mapping;\n\t}",
"public static Mapping newMapping(RulesDirectory rd, IRSession session, String filename){\n Mapping mapping = new Mapping(session);\n \ttry {\n\t\t\tInputStream s = session.getRulesDirectory().getFileSource().openStreamSearch(\n\t\t\t FileType.MAP, session.getRuleSet(), filename);\n session.getState().traceTagBegin(\"loadMapping\", \"file\",filename);\n\t\t\tmapping.loadMap(s);\n\t\t\tsession.getState().traceTagEnd(); \n\t\t} catch (FileNotFoundException e) {\n \t\t\tthrow new RuntimeException(e);\n\t\t} catch (Exception e) {\n \t\t\tthrow new RuntimeException(\"Error accessing '\"+filename+\"'\\r\\n\"+e);\n\t\t}\n\t\treturn mapping;\n }",
"private FileInputStream loadFile(String file)\n\t{\n\t\tlogger.info(\"Fetching File : \"+System.getProperty(\"user.dir\")+\"\\\\src\\\\main\\\\resources\\\\\"+file);\n\t\ttry \n\t\t{\n\t\t\treturn(new FileInputStream(System.getProperty(\"user.dir\")+\"\\\\src\\\\main\\\\resources\\\\\"+file));\n\t\t} catch (FileNotFoundException e) {\t\t\t\t\n\t\t\tAssert.assertTrue(file+\" file is missing\", false);\n\t\t\treturn null;\n\t\t}\n\t}",
"private InputStream getFileFromResourceAsStream(String fileName) {\n ClassLoader classLoader = getClass().getClassLoader();\n InputStream inputStream = classLoader.getResourceAsStream(fileName);\n\n // the stream holding the file content\n if (inputStream == null) {\n throw new IllegalArgumentException(\"file not found! \" + fileName);\n } else {\n return inputStream;\n }\n }",
"Map<File, File> getOutputFileMap();",
"public void load (IFile file) throws Exception;",
"void loadFromFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile source = new File(directory, FILE_NAME);\n\t\t\tMap<String, Scoreboard> scoreboards = new HashMap<String, Scoreboard>();\n\t\t\tif (source.exists()) {\n\t\t\t\tJsonReader reader = new JsonReader(new FileReader(source));\n\t\t\t\treader.beginArray();\n\t\t\t\twhile (reader.hasNext()) {\n\t\t\t\t\tScoreboard scoreboard = readScoreboard(reader);\n\t\t\t\t\tscoreboards.put(scoreboard.getName(), scoreboard);\n\t\t\t\t}\n\t\t\t\treader.endArray();\n\t\t\t\treader.close();\n\t\t\t} else {\n\t\t\t\tsource.createNewFile();\n\t\t\t}\n\t\t\tthis.scoreboards = scoreboards;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public SourceMapResourceHandler(ResourceHandler wrapped) {\n\t\tsuper(wrapped);\n\t\tsourceMapPattern = getInitParameterOrDefault(PARAM_NAME_SOURCE_MAP_PATTERN, DEFAULT_SOURCE_MAP_PATTERN);\n\t}",
"public Map getMap(){\n\t image = ImageIO.read(getClass().getResource(\"/images/maps/\" + mapName + \".png\"));\n\t\t\n\t\t\n\t\treturn null;\t\t\n\t}",
"private void createTexture(String file) {\n TextureRegion region = new TextureRegion(get(file, Texture.class));\n region.getTexture().setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);\n region.getTexture().setWrap(Texture.TextureWrap.Repeat, Texture.TextureWrap.Repeat);\n processedTextureMap.put(file, region);\n }",
"FileReference getFile(String fileName);",
"@Override\n public Wereld laad(String resource) {\n\n Scanner in = new Scanner(this.getClass().getResourceAsStream(resource));\n mapReader = new ArrayList<>();\n ArrayList<String> mapText = new ArrayList<>();\n ArrayList<String> cityText = new ArrayList<>();\n ArrayList<String> marketText = new ArrayList<>();\n\n mapReader.add(mapText);\n mapReader.add(cityText);\n mapReader.add(marketText);\n\n int index = 0;\n\n while (in.hasNextLine()) {\n String line = in.nextLine();\n line = line.replaceAll(\"\\\\s\", \"\");\n if (line.matches(\"\\\\d+\")) {\n index++;\n } else {\n mapReader.get(index).add(line);\n }\n }\n\n loadMap();\n loadCities();\n loadMarkets();\n\n return new Wereld(map, cities, market);\n }",
"public void load(File source);",
"public void setMapFile(String mapName) {\n map = Map.loadFromJSON(mapName);\n }",
"private static InputStream getResourceAsStream(final String filename) throws IOException {\n\t\t// Try to load resource from jar\n\t\tInputStream stream = TextureLoader.class.getResourceAsStream(filename);\n\t\t// If not found in jar, then load from disk\n\t\tif (stream == null) {\n\t\t\treturn new BufferedInputStream( new FileInputStream(filename) );\n\t\t} else {\n\t\t\treturn stream;\n\t\t}\n\t}",
"public File getRessourceFile() {\r\n\t\treturn local;\r\n\t}",
"public URL getResourceLocation( String name );",
"private InputStream getFileFromResourceAsStream(String fileName) {\n\n // The class loader that loaded the class\n ClassLoader classLoader = getClass().getClassLoader();\n InputStream inputStream = classLoader.getResourceAsStream(fileName);\n\n // the stream holding the file content\n if (inputStream == null) {\n throw new IllegalArgumentException(\"file not found! \" + fileName);\n } else {\n return inputStream;\n }\n\n }",
"protected String getMapFile() {\n return mapFile;\n }",
"protected abstract JPPFResourceWrapper loadRemoteData(Map<String, Object> map, boolean asResource) throws Exception;",
"private void enqueue(File file) throws IOException\n {\n // This occurs when a bare directory is part of the classpath.\n\n if (file == null)\n return;\n\n if (file.getName().endsWith(\".jar\"))\n {\n enqueueJar(file);\n return;\n }\n\n String path = file.getPath().replace('\\\\', '/');\n\n Resource r = new FileResource(path);\n\n enqueue(r);\n }",
"private void selectResource() {\n IWorkspace workspace = ResourcesPlugin.getWorkspace();\n IWorkspaceRoot root = workspace.getRoot();\n FilteredResourcesSelectionDialog dialog = new FilteredResourcesSelectionDialog(getShell(),\n false, root, IResource.FILE);\n dialog.setTitle(\"Select a resource to launch\");\n dialog.setInitialPattern(\"*.app\", FilteredItemsSelectionDialog.FULL_SELECTION);\n IPath path = new Path(getResourcePath());\n if (workspace.validatePath(path.toString(), IResource.FILE).isOK()) {\n IFile file = root.getFile(path);\n if (file != null && file.exists()) {\n dialog.setInitialSelections(new Object[] {path});\n }\n }\n dialog.open();\n Object[] results = dialog.getResult();\n if ((results != null) && (results.length > 0) && (results[0] instanceof IFile)) {\n setResourcePath(((IFile) results[0]).getFullPath());\n }\n }",
"protected InputStream loadMessageMappingRulesContainerFile() throws BackendRuntimeException\r\n\t{\r\n\t\tfinal InputStream is = this.getClass().getClassLoader().getResourceAsStream(\"sapmessagemapping/messages.xml\");\r\n\t\tif (is != null)\r\n\t\t{\r\n\t\t\treturn is;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthrow new BackendRuntimeException(\"File \\\"\" + RFC_MESSAGES + \"\\\" can not be opened\");\r\n\t\t}\r\n\t}",
"ValueResourceParser2(@NonNull File file) {\n mFile = file;\n }",
"public interface MapResource {\n\n\t/**\n\t * @return true if the resource is valid\n\t */\n\tpublic boolean isValid();\n\t\n\t/**\n\t * @return null or a short string summary of the resource's state (suitable for an etag)\n\t */\n\tpublic String getIdentityTag();\n\t\n\t/**\n\t * Create a new map or return a recycled one\n\t * @return map\n\t */\n\tpublic abstract mapnik.Map createMap(Object recycleTag);\n\n\t/**\n\t * Recycle a map instance\n\t * @param m\n\t */\n\tpublic abstract void recycleMap(Object recycleTag, mapnik.Map m);\n\n}",
"private void getResourceMap(VMResource parent) {\n editResourceService.getResources(parent.getId(), new AsyncCallback<List<VMResource>>() {\n\n @Override\n public void onSuccess(List<VMResource> result) {\n copyResource(parent, result);\n for (VMResource child : result) {\n getResourceMap(child);\n }\n }\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n });\n }",
"public void mo210a(File file) {\n }",
"public void loadFile(File p_file) throws IOException;",
"public IResource getResource();",
"Map<String, Resource> getInlineFiles();",
"FileReference createFile(String fileName, String toolId);",
"protected synchronized Hashtable getMappingsFromFile() throws Exception {\n\n \t\n\t\tInputStream path = null;\n\n\t\tpath = getClass().getResourceAsStream(\"../../../config/mappings.txt\");\n\n\t\tSystem.out.println(\"Path is - \" + path);\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(path));\n/*\t\tStringBuilder sb = new StringBuilder();\n\t\tString line1 = null;\n\t\twhile ((line1 = reader.readLine()) != null) {\n\t\t\tsb.append(line1 + \"\\n\");\n\t\t}\n*/\t\t//System.out.println(\"String is - \" + sb.toString());\n\t\t\n/* \tFile f = new File(\"src/edu/ucsd/crbs/incf/components/services/emage/mappings.txt\");\n System.out.println(\"Mapping - \" + f.getAbsolutePath());\n\n*/ /*if(sb.toString().trim().equals(\"\") || sb.toString() == null ) {\n System.err.println(\"bisel.ReadMappings cannot find mapping file\");\n System.exit(1);\n }*/\n\n Hashtable mappings = new Hashtable(17, new Float(1.25).floatValue());\n\n\n //BufferedReader br = new BufferedReader(new FileReader(f));\n String line = reader.readLine();\n while(line != null) { \n StringTokenizer st = new StringTokenizer(line, \"*\");\n String aba = st.nextToken();\n String emap = st.nextToken();\n mappings.put(aba, emap);\n line = reader.readLine();\n }\n\n reader.close();\n return mappings;\n }",
"private void createMap(File inFile)\r\n\t\tthrows Exception\r\n\t{\n\t\tBufferedReader in = new BufferedReader(new FileReader(inFile));\r\n\r\n\t\t// Chromosomes\r\n\t\tString[] chrms = in.readLine().split(\",\");\r\n\t\t// Marker positions\r\n\t\tString[] mrkrs = in.readLine().split(\",\");\r\n\t\tin.close();\r\n\r\n\r\n\t\t// Now rewrite it in Flapjack map format\r\n\t\tBufferedWriter out = new BufferedWriter(new FileWriter(new File(wrkDir, \"map\")));\r\n\t\tout.write(\"# fjFile = MAP\");\r\n\t\tout.newLine();\r\n\r\n\t\tfor (int i = 0; i < chrms.length; i++)\r\n\t\t{\r\n\t\t\tMarker m = new Marker(i, chrms[i], mrkrs[i]);\r\n\t\t\tmarkers.add(m);\r\n\r\n\t\t\tout.write(m.name + \"\\t\" + m.chr + \"\\t\" + m.pos);\r\n\t\t\tout.newLine();\r\n\t\t}\r\n\t\tout.close();\r\n\r\n\t\tmarkers.stream().forEach(marker -> {\r\n\r\n\t\t\tSystem.out.println(marker.name);\r\n\r\n\t\t});\r\n\t}",
"private static ImageIcon load(String resourceFile) {\n logger.warn(\"Loading resource \" + resourceFile);\n ImageIcon icon = new ImageIcon(ImageResources.class.getResource(resourceFile));\n icon.setImageObserver(new ImageObserver() {\n @Override\n public boolean imageUpdate(Image image, int infoFlags, int x, int y, int width, int height) {\n logger.warn(\"Image observer \");\n return false;\n }\n });\n return icon;\n }",
"private String readAndProcessSourceFile(String fileName, HashMap<String, String> substitutions) {\r\n try {\r\n // Read the source file packaged as a resource\r\n BufferedReader br = new BufferedReader(new InputStreamReader(\r\n getClass().getClassLoader().getResourceAsStream(fileName)));\r\n StringBuffer sb = new StringBuffer();\r\n try {\r\n String line = null;\r\n while (true) {\r\n line = br.readLine();\r\n if (line == null) {\r\n break;\r\n }\r\n sb.append(line + \"\\n\");\r\n }\r\n }\r\n finally {\r\n br.close();\r\n }\r\n String text = sb.toString();\r\n\r\n // Handle substitutions as key-value pairs where key is a regular expression and value is the substitution\r\n if (substitutions != null) {\r\n for (Entry<String, String> s : substitutions.entrySet()) {\r\n Pattern p = Pattern.compile(s.getKey());\r\n Matcher m = p.matcher(text);\r\n sb = new StringBuffer();\r\n while (m.find()) {\r\n m.appendReplacement(sb, m.group(1) + s.getValue());\r\n }\r\n m.appendTail(sb);\r\n text = sb.toString();\r\n }\r\n }\r\n\r\n return text;\r\n }\r\n catch (IOException e) {\r\n throw new RuntimeException(e);\r\n }\r\n }",
"private static URL toFileURL(URL resource) throws IOException {\n\t\t// Don't bother copying file urls\n\t\t//\n\t\tif (resource.getProtocol()\n\t\t\t.equalsIgnoreCase(\"file\"))\n\t\t\treturn resource;\n\n\t\t//\n\t\t// Need to make a copy to a temp file\n\t\t//\n\n\t\tFile f = File.createTempFile(\"resource\", \".jar\");\n\t\tFiles.createDirectories(f.getParentFile()\n\t\t\t.toPath());\n\t\ttry (InputStream in = resource.openStream(); OutputStream out = Files.newOutputStream(f.toPath())) {\n\t\t\tbyte[] buffer = new byte[BUFFER_SIZE];\n\t\t\tfor (int size; (size = in.read(buffer, 0, buffer.length)) > 0;) {\n\t\t\t\tout.write(buffer, 0, size);\n\t\t\t}\n\t\t}\n\t\tf.deleteOnExit();\n\t\treturn f.toURI()\n\t\t\t.toURL();\n\t}",
"public void process(org.reuseware.air.language.abstractsyntax.resource.as.mopp.AsResource resource);",
"protected MapResourcePack() {\n this.baseResourcePack = null;\n this.archive = null;\n }",
"protected void execute(IFile file, IAction action) {\n\t\tif (!MessageDialog.openQuestion(Display.getCurrent().getActiveShell(),\n\t\t\t\t\t\t\t\t\t\t\"Resolve Conflict\",\n\t\t\t\t\t\t\t\t\t\t\"You are about to resolve the conflict using the local\" +\n\t\t\t\t\t\t\t\t\t\t\" copy of the resource '\" +\n\t\t\t\t\t\t\t\t\t\tfile.getName() +\n\t\t\t\t\t\t\t\t\t\t\"'. Any server side changes will be lost. \"+\n\t\t\t\t\t\t\t\t\t\t\"Do you wish to continue?\")){\n\t\t\treturn;\n\t\t}\n\t\tString conflictResourceLocalCopy = RegistryCheckInClientUtils.getConflictResourceLocalCopy(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfile.getLocation().toOSString());\n\t\tIFile conflictFile = file.getWorkspace().getRoot().getFileForLocation(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew Path(conflictResourceLocalCopy));\n\t\ttry {\n\t\t\tfile.delete(true, new NullProgressMonitor());\n\t\t\tconflictFile.copy(file.getFullPath(), true,new NullProgressMonitor());\n\t\t\tconflictFile.delete(true, new NullProgressMonitor());\n\t\t\tString conflictResourceServerCopy = RegistryCheckInClientUtils.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetConflictResourceServerCopy(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfile.getLocation().toOSString());\n\t\t\tconflictFile = file.getWorkspace().getRoot().getFileForLocation(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew Path(conflictResourceServerCopy));\n\t\t\tconflictFile.delete(true, new NullProgressMonitor());\n\t\t\tRegistryResourceDecorator.refreshProjectResource(file.getProject());\n\t\t} catch (Exception e) {\n\t\t\tlog.error(e);\n\t\t}\n\t}",
"String getResource();",
"abstract File getResourceDirectory();",
"public void process(final IFile file) {\n try { \n \t\n \tIRunnableWithProgress runnable = new IRunnableWithProgress(){\n \t\tpublic void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {\n \t\t\ttry {\n \t\t\t\tSubMonitor progress = SubMonitor.convert(monitor, 100);\n \t\t\t\tResource csResource = getResource(file);\n \n \t\t\t\tMarkerHelper.unmark(csResource);\n \t\t\t\tif (containsProblems(csResource)) {\n \t\t\t\t\tMarkerHelper.mark(csResource);\n \t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t \n \t\t\t\tfinal ConcreteSyntax concreteSyntax = (ConcreteSyntax) csResource.getContents().get(0);\n \t\t\t\tfinal String csPackageName = getPackageName(concreteSyntax);\n \t\t\t\tfinal String projectName = csPackageName;\n \t\t\t \n \t\t\t\tif (projectName == null) { \n \t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t//create a project\n \t\t\t\tIProject project = createProject(progress, projectName);\n \t\t\t \n \t\t\t\t//generate the resource class, parser, and printer\n \t\t\t\tResourcePackage pck = new ResourcePackage(concreteSyntax, csPackageName, getSrcFolder(project), copyMapFromPreferenceStore());\n \t\t\t\tResourcePackageGenerator.generate(pck, progress.newChild(TICKS_GENERATE_RESOURCE));\n \t\t\t \n \t\t\t\t//errors from parser generator?\n \t\t\t\tif (containsProblems(csResource)) {\n \t\t\t\t\tMarkerHelper.mark(csResource);\n \t\t\t\t}\n \t\t\t \n \t\t\t boolean overridePluginConfig = EMFTextEditUIPlugin.getDefault().getPreferenceStore().getBoolean(EMFTextEditUIPlugin.OVERRIDE_PLUGIN_CONFIG_NAME);\n \t\t\t \n \t\t\t\tcreateMetaFolder(progress, project);\n \t\t\t\tcreateManifest(progress, concreteSyntax, projectName, overridePluginConfig, project);\n \t\t\t\tcreatePluginXML(progress, concreteSyntax, projectName, overridePluginConfig, project, file);\n \t\t\t\t\n \t\t\t\tmarkErrors(concreteSyntax);\n \t\t\t\t\n \t\t\t\tcreateMetaModelCode(progress, concreteSyntax);\n \t\t\t\t\n \t\t\t\tproject.refreshLocal(IProject.DEPTH_INFINITE, progress.newChild(TICKS_REFRESH_PROJECT));\n \t\t\t}\n \t\t\t catch (CoreException e) {\n \t\t\t \tthrow new InvocationTargetException(e);\n \t\t\t }\n \t\t}\n \n \t\t\t\tprivate String getPackageName(final ConcreteSyntax cSyntax) {\n \t\t\t\t\treturn (cSyntax.getPackage().getBasePackage() == null ? \"\" : cSyntax.getPackage().getBasePackage() + \".\") + cSyntax.getPackage().getEcorePackage().getName() + \".resource.\" + cSyntax.getName();\n \t\t\t\t}\n \n \t};\n \t\n \tPlatformUI.getWorkbench().getProgressService().busyCursorWhile(runnable);\n }\n catch (InvocationTargetException e){\n \te.getTargetException().printStackTrace();\n }\n catch (InterruptedException e){\n \te.printStackTrace();\n }\n }",
"private File getFile(String filename) throws Exception {\n\t\tFile file = new File(filename);\n\t\tif (file.exists()) {\n\t\t\treturn file;\n\t\t} else if (!file.isAbsolute()) {\n\t\t\tfinal Resource r = context.getThisInstance().eResource();\n\t\t\tfinal Path p = new Path(r.getURI().segment(1) + File.separator + filename);\n\t\t\tfinal IFile f = ResourcesPlugin.getWorkspace().getRoot().getFile(p);\n\t\t\tif (f.exists()) {\n\t\t\t\treturn f.getRawLocation().makeAbsolute().toFile();\n\t\t\t}\n\t\t}\n\n\t\tthrow new Exception(\"Filename \" + filename + \" not found\");\n\n\t}",
"public List<Resource> getFileLocations() throws IOException;",
"public URL getResourceFile(String path){\n\n ClassLoader classLoader = getClass().getClassLoader();\n return classLoader.getResource(path);\n }",
"public static PsiFile findLayoutResource(PsiFile file, Project project, String fileName) {\n String name = String.format(\"%s.xml\", fileName);\n // restricting the search to the module of layout that includes the layout we are seaching for\n return resolveLayoutResourceFile(file, project, name);\n }",
"FileObject getFile();",
"FileObject getFile();",
"private File getFile(String fileName) {\n\t\tClassLoader classLoader = getClass().getClassLoader();\n\t\tFile file = new File(classLoader.getResource(fileName).getFile());\n\t\treturn file;\n\t}",
"private static File getAspectWorkspace() {\n try {\n URL url = Platform.getBundle(Activator.PLUGIN_ID).getEntry(\"resources\");\n URL resolved = FileLocator.resolve(url);\n return new File(resolved.getPath());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"private static InputStream getResourceAsStream(String resource)\r\n {\r\n return KuBatschTheme.class.getResourceAsStream(String.format(\"%s/%s\",\r\n RESOURCES_DIR, resource));\r\n }",
"public void loadMap(String filepath) {\n\n\t\ttry {\n\n\t\t\tInputStream in = getClass().getResourceAsStream(filepath);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(in));\n\n\t\t\tnumCols = Integer.parseInt(br.readLine());\n\t\t\tnumRows = Integer.parseInt(br.readLine());\n\t\t\tmap = new int[numRows][numCols];\n\t\t\twidth = numCols * tileSize;\n\t\t\theight = numRows * tileSize;\n\n\t\t\tString delims = \"\\\\s+\";\n\t\t\tfor (int row = 0; row < numRows; row++) {\n\t\t\t\tString line = br.readLine();\n\t\t\t\tString[] tokens = line.split(delims);\n\t\t\t\tfor (int col = 0; col < numCols; col++) {\n\t\t\t\t\tmap[row][col] = Integer.parseInt(tokens[col]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"void load(File file);",
"public void get(String file) {\n\n }",
"public abstract IResource getResource();",
"private StreamSource getFileSource(final File requestedFile) {\n StreamSource fileSource = new StreamSource() {\n private static final long serialVersionUID = 3275933556191707490L;\n public InputStream getStream() {\n try {\n return new org.xtreemfs.portlet.util.BufferedFileInputStream(requestedFile);\n } catch (IOException e) {\n showNotification(\"Error\", e.getMessage(), Notification.TYPE_ERROR_MESSAGE, e);\n }\n return null;\n }\n };\n return fileSource;\n }"
] |
[
"0.6162885",
"0.59324896",
"0.58113",
"0.57037973",
"0.5551599",
"0.5532826",
"0.55217457",
"0.53606516",
"0.5342557",
"0.5335956",
"0.52953583",
"0.52750933",
"0.52716327",
"0.5231782",
"0.52225745",
"0.5209178",
"0.5204876",
"0.5152059",
"0.5128028",
"0.5104074",
"0.50671244",
"0.5035304",
"0.5029598",
"0.49804944",
"0.49793398",
"0.4952122",
"0.49503496",
"0.4944878",
"0.49370292",
"0.49341893",
"0.49300352",
"0.4911043",
"0.4908527",
"0.4885445",
"0.4884215",
"0.48691",
"0.48590213",
"0.48583412",
"0.48520982",
"0.48520562",
"0.48505825",
"0.48347336",
"0.4831974",
"0.4827565",
"0.48198038",
"0.48197263",
"0.48190817",
"0.48132986",
"0.48125553",
"0.47992107",
"0.47907066",
"0.47752848",
"0.47726363",
"0.4763983",
"0.47610712",
"0.476069",
"0.47505105",
"0.47475454",
"0.4746923",
"0.47458488",
"0.47396737",
"0.4737476",
"0.4734147",
"0.47268105",
"0.4723852",
"0.47054204",
"0.4703371",
"0.4693223",
"0.4689269",
"0.46810722",
"0.46716008",
"0.46660408",
"0.46655902",
"0.4664216",
"0.46631005",
"0.46630937",
"0.46562752",
"0.46478352",
"0.46399447",
"0.4627554",
"0.4623324",
"0.46152633",
"0.46152055",
"0.46115175",
"0.46099877",
"0.46041533",
"0.4595314",
"0.4591678",
"0.4586883",
"0.45853767",
"0.45828494",
"0.45828494",
"0.4576002",
"0.45728257",
"0.45688534",
"0.45666632",
"0.455759",
"0.4553849",
"0.45527482",
"0.4547004"
] |
0.7099855
|
0
|
Return the project for the given workspacerelative path.
|
public static IProject projectForPath(IPath path) {
IProject result = null;
if (path != null) {
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
result = root.getProject(path.segment(0));
}
return result;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static Project getProject() {\n if (ProjectList.size() == 0) {\n System.out.print(\"No Projects were found.\");\n return null;\n }\n\n System.out.print(\"\\nPlease enter the project number: \");\n int projNum = input.nextInt();\n input.nextLine();\n\n for (Project proj : ProjectList) {\n if (proj.projNum == projNum) {\n return proj;\n }\n }\n\n System.out.print(\"\\nProject was not found. Please try again.\");\n return getProject();\n }",
"public FlexoProject getProject() {\n \t\treturn findCurrentProject();\n \t}",
"public IProject getProject();",
"private static File getProjectsPath() {\n File projectsPath = loadFilePath();\n if (projectsPath == null) {\n JFileChooser fc = createFileChooser();\n if (fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {\n return fc.getSelectedFile();\n }\n }\n return projectsPath;\n }",
"Project getProject();",
"ProjectRepresentation getWorkingProject();",
"public static IProject getSelectedProject() {\n\t\tIProject activeProject = null;\n\t\tIWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();\n\t\tISelectionService selectionService = window.getSelectionService();\n\t\tISelection selection = selectionService.getSelection(IPageLayout.ID_PROJECT_EXPLORER);\n\t\tif (selection instanceof StructuredSelection) {\n\t\t\tIResource resource = (IResource) ((StructuredSelection) selection).getFirstElement();\n\t\t\tactiveProject = resource.getProject();\n\t\t}\n\t\t\n\t\treturn activeProject;\n\t}",
"public Project getProjectByName(String name);",
"public ProjectModel getCurrentProject() {\n if (projects.size() > 0) {\n return projects.get(0);\n }\n else return null;\n }",
"HibProject getProject(InternalActionContext ac);",
"public static IProject getSelectedProject() {\n\t\tIWorkbench workbench = PlatformUI.getWorkbench();\n\t\tIWorkbenchWindow window = workbench.getActiveWorkbenchWindow();\n\t\tISelectionService service = window.getSelectionService();\n\t\tISelection selection = service.getSelection();\n\t\tObject element = null;\n\t\tIResource resource;\n\t\tIProject selProject = null;\n\t\tif (selection instanceof IStructuredSelection) {\n\t\t\tIStructuredSelection structuredSel =\n\t\t\t\t\t(IStructuredSelection) selection;\n\t\t\telement = structuredSel.getFirstElement();\n\t\t}\n\t\tif (element instanceof IResource) {\n\t\t\tresource = (IResource) element;\n\t\t\tselProject = resource.getProject();\n\t\t} else {\n\t\t\tIWorkbenchPage page = window.getActivePage();\n\t\t\tIFile file = (IFile) page.getActiveEditor().\n\t\t\t\t\tgetEditorInput().getAdapter(IFile.class);\n\t\t\tselProject = file.getProject();\n\t\t}\n\t\treturn selProject;\n\t}",
"public static Object getActiveGISProject() {\r\n Project project = ProjectPlugin.getPlugin().getProjectRegistry().getCurrentProject();\r\n \r\n if (project != null)\r\n return project;\r\n \r\n return ProjectPlugin.getPlugin().getProjectRegistry().getDefaultProject();\r\n }",
"private ProjectResolutionResult resolveProject(TaskSelector.SelectionContext context, Path path, BuildState targetBuild) {\n if (!path.isAbsolute() && path.segmentCount() == 1) {\n return new ProjectResolutionResult(targetBuild, targetBuild.getMutableModel().getDefaultProject().getOwner(), true, path.getName());\n }\n\n // <path>:name -> resolve <path> to a project + select task with matching name in that project\n // when <path> is absolute -> resolve <path> relative to root project\n // when <path> is relative -> resolve <path> relative to default project\n\n Path projectPath = path.getParent();\n ProjectState matchingProject;\n if (projectPath.isAbsolute()) {\n matchingProject = buildRegistry.getRootBuild().getProjects().getRootProject();\n } else {\n matchingProject = targetBuild.getMutableModel().getDefaultProject().getOwner();\n }\n while (projectPath.segmentCount() > 0) {\n String next = projectPath.segment(0);\n matchingProject = selectProject(context, matchingProject, next);\n if (projectPath.segmentCount() == 1) {\n projectPath = Path.ROOT;\n } else {\n projectPath = projectPath.removeFirstSegments(1);\n }\n }\n LOGGER.info(\"Task path '{}' matched project '{}'\", context.getOriginalPath(), matchingProject.getIdentityPath());\n return new ProjectResolutionResult(matchingProject.getOwner(), matchingProject, false, path.getName());\n }",
"com.appscode.api.auth.v1beta1.Project getProject();",
"public static final String getProject() { return project; }",
"public static final String getProject() { return project; }",
"Project findProjectById(String projectId);",
"public Project getProject(Long projectId);",
"public jkt.hrms.masters.business.MstrProject getProject () {\n\t\treturn project;\n\t}",
"public Project getProject(String name){\n\t\tfor ( Project p : m_Projects){\n\t\t\tif(p.getName().equals(name)) return p;\n\t\t}\n\t\treturn null;\n\t}",
"public String getProjectPath() {\n return projectPath;\n }",
"ProjectIdentity toProjectIdentity(String projectPath);",
"public static String getProjectPath() {\n\t\tif (!projectPath.isEmpty()) {\n\t\t\treturn projectPath;\n\t\t} else {\n\t\t\treturn \"No file yet\";\n\t\t}\n\t}",
"Project getById(Long id);",
"public Project getProject()\n {\n \treturn project;\n }",
"public static IProject getCurrentProject() {\n\t\tIProject activeProject = null;\n\t\tIWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();\n\t\tIEditorPart editorPart = window.getActivePage().getActiveEditor();\n\t\tif (editorPart != null) {\n\t\t\tIEditorInput input = editorPart.getEditorInput();\n\t\t\tif (input instanceof IFileEditorInput) {\n\t\t\t\tIFile file = ((IFileEditorInput) input).getFile();\n\t\t\t\tactiveProject = file.getProject();\n\t\t\t}\n\t\t}\n\t\treturn activeProject;\n\t}",
"public Project getProject() {\r\n return project;\r\n }",
"public Project getProject() {\n return project;\n }",
"public Project getProject() {\n return project;\n }",
"public Project getProject()\n {\n return project;\n }",
"Project findProjectById(Long projectId);",
"private static Project findProject(String name) {\r\n \t\tfor (Project project : ProjectPlugin.getPlugin().getProjectRegistry().getProjects()) {\r\n \t\t\tif (project.getName().equals(name)) {\r\n \t\t\t\treturn project;\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}",
"protected IScriptProject getScriptProject() {\n \t\treturn fMainTab.getProject();\n \t}",
"private Project getProject(ActivityDTO dto) {\n\t\treturn projectDAO.findById(dto.getProjectId()).get();\n//\t\treturn projectDAO.getOne(dto.getProjectId());\n\t}",
"public String getPath() {\n return this.projectPath;\r\n }",
"public ProjectFile getProject()\r\n {\r\n return m_project;\r\n }",
"@Override\n\tpublic IProject getProject() {\n\t\treturn fProject;\n\t}",
"protected Project getProject() {\n return getConfiguration().getProject();\n }",
"public Project getProject() {\n\t\treturn project;\n\t}",
"private Project getProject(ModelInfo<Project> info) {\n return data.get(info);\n }",
"public org.eclipse.core.resources.IProject getProject() {\n \t\treturn project;\n \t}",
"private ProjectMgr getPmNameTrueLoadActualProject() {\n ProjectMgr pm = null;\n try {\n pm = new ProjectMgr(\"Example\", true);\n\n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (SAXException e) {\n e.printStackTrace();\n }\n\n IOException e;\n return pm;\n }",
"Project getByPrjNumber(Integer num);",
"public Project getProject()\n\t{\n\t\treturn this.project;\n\t}",
"public IProject getProject() {\n return mProject;\n }",
"@GetMapping(\"/byName\")\r\n\tpublic List<Project> getProject(Principal principal) {\r\n\t\treturn persistenceService.getProject(AppBuilderUtil.getLoggedInUserId());\r\n\t}",
"public MavenProject getCurrentProject()\n {\n return currentProject;\n }",
"java.lang.String getProjectId();",
"@Editable(order=200, name=\"Project\", description=\"Specify project to retrieve artifacts from\")\n\t@ChoiceProvider(\"getProjectChoices\")\n\t@NotEmpty\n\tpublic String getProjectPath() {\n\t\treturn projectPath;\n\t}",
"public Project getProject() {\n\t\treturn bnd.getProject();\n\t}",
"public String getProjectName(TimeRecord timeRecord) throws IOException, SQLException, ClassNotFoundException {\n String projectName = null;\n ProjectDAO projectDAO = new ProjectDAO();\n try {\n Project project = projectDAO.getProject(timeRecord.getProjectId());\n if (project != null) {\n projectName = project.getProjectName();\n }\n } catch (IOException | SQLException | ClassNotFoundException e) {\n throw e;\n }\n return projectName;\n }",
"public IProject getProject() {\n\treturn this.project;\n }",
"public Project getProject(){\n\t\treturn this.project;\n\t}",
"public Project getProjectDetail(String idOrKey) throws IOException {\n\t\tif (client == null)\n\t\t\tthrow new IllegalStateException(\"HTTP Client not Initailized\");\n\t\t\n\t\tclient.setResourceName(Constants.JIRA_RESOURCE_PROJECT + \"/\" + idOrKey);\n\t\tClientResponse response = client.get();\n\t\t\t\t\t\n\t\tString content = response.getEntity(String.class);\t\n\t\t\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tmapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, true);\n\t\t\n\t\tTypeReference<Project> ref = new TypeReference<Project>(){};\n\t\tProject prj = mapper.readValue(content, ref);\n\t\t\n\t\treturn prj;\n\t}",
"public Project createProjectFromPRJ() {\n\n\t\tSystem.out.println(\"Trying to load prj file with : \" + data_path + \" \" + projectName + \" \" + conceptName + \" \");\n\n\t\tProject project = null;\n\n\t\ttry {\n\n\t\t\tproject = new Project(data_path + projectName);\n\n\t\t\t// Sehr wichtig hier das Warten einzubauen, sonst gibts leere\n\t\t\t// Retrieval Results, weil die Faelle noch nicht geladen sind wenn\n\t\t\t// das\n\t\t\t// Erste Retrieval laueft\n\t\t\twhile (project.isImporting()) {\n\t\t\t\tThread.sleep(1000);\n\t\t\t\tSystem.out.print(\".\");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\"); // console pretty print\n\t\t} catch (Exception ex) {\n\n\t\t\tSystem.out.println(\"Error when loading the project\");\n\t\t}\n\t\treturn project;\n\t}",
"public String getProjectFilePath() {\n\t\tif (projectFileIO != null) {\n\t\t\treturn projectFileIO.getFilePath();\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n\tpublic Project getProjectByName(String name) {\n\t\treturn projectDao.getProjectByName(name);\n\t}",
"public static String GetLastOpenedProject() {\n\t\tString lastOpenedProjectPath = \"\";\n\t\tif (applicationSettingsFile != null) {\n\t\t\t// Get all \"files\"\n\t\t\tNodeList lastProject = applicationSettingsFile.getDocumentElement().getElementsByTagName(\"lastProject\");\n\t\t\t// Handle result\n\t\t\tif (lastProject.getLength() > 0) {\n\t\t\t\tlastOpenedProjectPath = Utilities.getXmlNodeAttribute(lastProject.item(0), \"value\");\n\t\t\t}\n\t\t}\n\t\treturn lastOpenedProjectPath;\n\t}",
"Project createProject();",
"Project createProject();",
"Project createProject();",
"private String getProjectName(String configFilePath) {\r\n\t\t// get the project name i.e the first directory name relative to the projects root\r\n\t\tFile projectsRoot = new File(RuntimeVariables.getProjectsRoot());\r\n\t\tString relativePath = configFilePath.substring(projectsRoot.getAbsolutePath().length());\r\n\t\treturn new StringTokenizer(relativePath, File.separator).nextToken();\t\t\r\n\t}",
"public VariableDeclaration getProject() {\n return project;\n }",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/projects/{name}\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Project> readProject(\n @Path(\"name\") String name);",
"java.lang.String getProjectName();",
"public static String retrieveProjectId(String filepath) {\n TmsMeta meta = retrieveMeta(filepath);\n String projectId = meta.getProjectId();\n if (StringUtils.isEmpty(projectId)) {\n System.err.println(\"Project id not detected inside project TMS meta file\");\n System.exit(-1);\n }\n return meta.getProjectId();\n }",
"public Project getProjectById(String id) {\n\t\tSQLiteQueryBuilder q = new SQLiteQueryBuilder();\n\t\tq.setTables(Constants.TABLE_PROJECTS);\n\n\t\tCursor cursor = q.query(database, null, Constants.COLUMN_ID + \" = ?\", new String[] { id }, null, null, null);\n\t\tcursor.moveToFirst();\n\n\t\tif (cursor.getCount() > 0)\n\t\t\treturn new Project(cursor);\n\t\telse\n\t\t\treturn null;\n\t}",
"@Transactional(readOnly = true) \n public TaskProject findOne(Long id) {\n log.debug(\"Request to get TaskProject : {}\", id);\n TaskProject taskProject = taskProjectRepository.findOne(id);\n return taskProject;\n }",
"public String getSelectedProjectName(){\n\t\treturn DataManager.getProjectFolderName();\n\t}",
"@Test\n public void getTemplateProgrammerProjectTest() throws ApiException {\n String name = null;\n CollectionProjectDTO response = api.getTemplateProgrammerProject(name);\n\n // TODO: test validations\n }",
"public Subproject drawProject() {\n\t\tSubproject result=projectsAvailable.get(0);\n\t\tprojectsAvailable.remove(result);\n\t\tprojectsActive.add(result);\n\t\treturn result;\n\t}",
"public Project build() {\n return new Project(descriptor.build());\n }",
"public String getProjectName() {\n\t\treturn project;\n\t}",
"@Override\r\n public String getProjectPath() {\r\n \treturn String.format(\":%s\", getArtifactId());\r\n }",
"private Project compileProject() {\n\t\t\tProject p = null;\n\t\t\t\n\t\t\tif(pType.equals(\"o\")) {\n\t\t\t\ttry {\n\t\t\t\t\tp = new OngoingProject(pCode.getText(), pName.getText(), dateFormat.parse(pSDate.getText()),pClient.getText(), dateFormat.parse(pDeadline.getText()), Double.parseDouble(pBudget.getText()), Integer.parseInt(pCompletion.getText()));\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} else if(pType.equals(\"f\")) {\n\t\t\t\ttry {\n\t\t\t\t\tp = new FinishedProject(pCode.getText(), pName.getText(), dateFormat.parse(pSDate.getText()),pClient.getText(), dateFormat.parse(pEndDate.getText()), Double.parseDouble(pTotalCost.getText()));\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\n\t\t\treturn p;\n\t\t}",
"public String getProjectName(){\n return projectModel.getProjectName();\n }",
"public Project getProject(int projectId) throws EmployeeManagementException;",
"public IJavaProject getJavaProject() {\r\n\t\t//IPackageFragmentRoot root= getPackageFragmentRoot();\r\n\t\tif (pkgroot != null) {\r\n\t\t\treturn pkgroot.getJavaProject();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public abstract ProjectBean getSystemProject();",
"String getProjectName();",
"public abstract KenaiProject getKenaiProjectForRepository(String repositoryUrl) throws IOException;",
"public Project findProjectById(String projectId) {\n\t\tProject project = null;\r\n\t\tString query = \"SELECT FROM TA_PROJECTS WHERE PROJECT_ID='\" + projectId + \"'\";\r\n\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(query);\r\n\t\twhile(srs.next()){\r\n\t\t\tproject = new Project();\r\n\t\t\tproject.setProjectID(srs.getString(1));\r\n\t\t\tproject.setProjectName(srs.getString(2));\r\n\t\t\tproject.setManagerID(srs.getString(3));\r\n\t\t}\r\n\t\treturn project;\r\n\t}",
"@Override\n\tpublic Project getProjectById(int id) {\n\t\treturn projectDao.getProjectById(id);\n\t}",
"public static Project exampleProject() throws ParseException {\n Person willem = new Person(\"Contractor\", \"Willem du Plessis\", \"074 856 4561\", \"[email protected]\",\n \"452 Tugela Avenue\");\n Person rene = new Person(\"Architect\", \"Rene Malan\", \"074 856 4561\", \"rene@malan\", \"452 Tugela Avenue\");\n Person tish = new Person(\"Client\", \"Tish du Plessis\", \"074 856 4561\", \"[email protected]\", \"452 Tugela Avenue\");\n Date deadline = dateformat.parse(\"30/03/2021\");\n Project housePlessis = new Project(789, \"House Plessis\", \"House\", \"102 Jasper Avenue\", \"1025\", 20000, 5000,\n deadline, willem, rene, tish);\n ProjectList.add(housePlessis);\n\n return housePlessis;\n }",
"public Project findByPrimaryKey(int id) throws ProjectDaoException {\n\t\tProject ret[] = findByDynamicSelect(SQL_SELECT + \" WHERE ID = ?\", new Object[] { new Integer(id) });\n\t\treturn ret.length == 0 ? null : ret[0];\n\t}",
"public DeploymentModel locate( String path )\n {\n return m_model.getModel( path );\n }",
"Project selectByPrimaryKey(Long id);",
"public File getExecutableWorkProjectDir(CommonjWork work) {\r\n\t\tlogger.debug(\"IN\");\r\n\t\tFile worksDir = new File(rootDir, work.getWorkName());\r\n\t\tlogger.debug(\"OUT\");\r\n\t\treturn worksDir;\r\n\t}",
"public Project findById(Integer id) {\n Session session = SessionManager.getSessionFactory().openSession();\n //The find method returns the object with the provided id\n Project project = session.find(Project.class, id);\n session.close();\n return project;\n }",
"@Override\n\tpublic List<ProjectInfo> findProject(ProjectInfo project) {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findProject\",project);\n\t}",
"@Override\r\n\tpublic List<Project> findProject() {\n\t\treturn iSearchSaleRecordDao.findProject();\r\n\t}",
"@GetMapping(\"/showme/{name}\")\n\t@ResponseBody\n\tpublic Optional<Project> retrieveProjectsByName(@PathVariable(\"name\") String name){\n\t\tOptional<Project> t = projectrepository.findProjectByName(name);\n\t\treturn t;\n\t}",
"SolutionRef getCurrentSolution();",
"ProjectConfiguration getProjectConfiguration();",
"public String getProjectName() { return DBCurrent.getInstance().projectName(); }",
"public String getProjectName() { return DBCurrent.getInstance().projectName(); }",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/projects/{name}\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Project> readProject(\n @Path(\"name\") String name, \n @QueryMap ReadProject queryParameters);",
"public String getProjcontactor() {\n return projcontactor;\n }",
"public Project getTasks(String projectId) {\n try {\n\n String selectProject = \"select * from PROJECTS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectProject);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n String startdate = rs.getString(\"STARTDATE\");\n String invoicesent = rs.getString(\"INVOICESENT\");\n String hours = rs.getString(\"HOURS\");\n String client = \"\";\n String duedate = rs.getString(\"DUEDATE\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(client, description, projectId,\n duedate, startdate, hours, duedate, duedate,\n invoicesent, invoicesent);\n rs.close();\n ps.close();\n return p;\n } else {\n return null;\n }\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }",
"@Override\n public Project getProject() {\n return super.getProject();\n }"
] |
[
"0.6788107",
"0.6656197",
"0.6547835",
"0.64875823",
"0.6476967",
"0.6422693",
"0.64150554",
"0.64092505",
"0.6398714",
"0.6324174",
"0.62939656",
"0.6283334",
"0.6186936",
"0.6131988",
"0.6120147",
"0.6120147",
"0.6072629",
"0.6064474",
"0.6051419",
"0.59773827",
"0.59670615",
"0.5962614",
"0.5954577",
"0.58979374",
"0.58892334",
"0.588857",
"0.58759576",
"0.5874668",
"0.5874668",
"0.5867392",
"0.586229",
"0.58557206",
"0.5849917",
"0.58296394",
"0.579869",
"0.57863027",
"0.576994",
"0.5760417",
"0.57578737",
"0.5741838",
"0.57364583",
"0.57186854",
"0.570874",
"0.5696169",
"0.5675068",
"0.56513786",
"0.56362677",
"0.5633644",
"0.5632183",
"0.56198376",
"0.55943024",
"0.55671036",
"0.55577266",
"0.5510063",
"0.54960245",
"0.5479342",
"0.5471594",
"0.5463569",
"0.54594177",
"0.54594177",
"0.54594177",
"0.54547185",
"0.54395753",
"0.5437084",
"0.5436872",
"0.54149395",
"0.5397275",
"0.5395257",
"0.53912354",
"0.5373588",
"0.537174",
"0.53502184",
"0.5349937",
"0.533023",
"0.53292376",
"0.5312339",
"0.5312296",
"0.5308074",
"0.5302332",
"0.5281527",
"0.5281163",
"0.5277399",
"0.52521896",
"0.52453697",
"0.52446467",
"0.5244501",
"0.5234055",
"0.5232339",
"0.5227629",
"0.522644",
"0.5222988",
"0.5202196",
"0.5189361",
"0.51844287",
"0.51825535",
"0.51825535",
"0.5178224",
"0.5168526",
"0.5166751",
"0.51619196"
] |
0.7797397
|
0
|
Read contents of a file into an array
|
public static char[] readFileContents(File file, String encoding) throws CoreException {
Check.checkArg(file);
FileInputStream fis;
try {
fis = new FileInputStream(file);
return readInputStreamContents(fis, encoding);
} catch (IOException e) {
throw new CoreException(createErrorStatus(e));
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String[] read()\n {\n ArrayList<String> input = new ArrayList<String>();\n try\n {\n dir = new File(contextRef.getFilesDir(), filename);\n if (dir.exists())\n {\n Scanner contacts = new Scanner(dir);\n while (contacts.hasNextLine())\n {\n input.add(contacts.nextLine());\n }\n contacts.close();\n }\n }catch (Exception ex)\n {\n //debug(\"read file contents failure\");\n debug = \"test read failure\";\n }\n return input.toArray(new String[1]);\n }",
"String[] readFile(File file) {\n ArrayList<String> list = new ArrayList<>();\n String[] output = null;\n Scanner reader = null;\n try {\n if (file.isFile()) {\n reader = new Scanner(file);\n while (reader.hasNextLine()) {\n list.add(reader.nextLine());\n }\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found exception\");\n }\n output = new String[list.size()];\n for (int i = 0; i < list.size(); i++) output[i] = list.get(i);\n reader.close();\n return output;\n }",
"String[] readFile(String path) {\n ArrayList<String> list = new ArrayList<>();\n String[] output = null;\n Scanner reader;\n File file;\n\n try {\n file = new File(path);\n reader = new Scanner(file);\n while (reader.hasNextLine()) {\n list.add(reader.nextLine());\n }\n output = new String[list.size()];\n for (int i = 0; i < list.size(); i++) output[i] = list.get(i);\n reader.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found exception\");\n }\n return output;\n }",
"public String[] getFile() throws IOException {\n\t\n\t\n\ttry {\n\tFileReader reader = new FileReader(path);\n\tBufferedReader textReader = new BufferedReader(reader); // creates buffered file reader again\n\t\n\tint numberOfLines = getLines(); // calls the method above to know how many lines there are\n\tString[ ] textData = new String[numberOfLines]; //creates an array the size of the amount of lines the file has\n\t\n\tfor (int i=0; i < numberOfLines; i++) {\n\t\ttextData[ i ] = textReader.readLine(); // go through file and read each line into its own array space\n\t\t}\n\t\n\ttextReader.close( ); //reader is done\n\treturn textData; // return array\n\t} catch (IOException e) {\n\t\tString[] exceptionString = new String[1];\n\t\texceptionString[0] = \"nothing\";\n\t\treturn exceptionString;\n\t}\n}",
"private static String[] readFile(String file){\n\t\ttry{\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(file));\n\t\t\tString line;\n\t\t\tString data = \"\";\n\t\t\twhile((line = in.readLine()) != null){\n\t\t\t\tdata = data + '\\n' + line;\t\t\t}\n\t\t\tin.close();\n\t\t\tString[] data_array = data.split(\"\\\\n\");\n\t\t\treturn data_array;\n\t\t}\n\t\tcatch(IOException e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\tString[] shouldNeverReturn = new String[1];\n\t\treturn shouldNeverReturn;\n\t}",
"protected String[] readInFile(String filename) {\n Vector<String> fileContents = new Vector<String>();\n try {\n InputStream gtestResultStream1 = getClass().getResourceAsStream(File.separator +\n TEST_TYPE_DIR + File.separator + filename);\n BufferedReader reader = new BufferedReader(new InputStreamReader(gtestResultStream1));\n String line = null;\n while ((line = reader.readLine()) != null) {\n fileContents.add(line);\n }\n }\n catch (NullPointerException e) {\n CLog.e(\"Gest output file does not exist: \" + filename);\n }\n catch (IOException e) {\n CLog.e(\"Unable to read contents of gtest output file: \" + filename);\n }\n return fileContents.toArray(new String[fileContents.size()]);\n }",
"private String[] readFile(BufferedReader reader) throws IOException {\r\n // Read each line in the file, add it to the ArrayList lines\r\n ArrayList<String> lines = new ArrayList<String>();\r\n String line;\r\n while ((line = reader.readLine()) != null) {\r\n lines.add(line);\r\n }\r\n reader.close();\r\n // Convert the list to an array of type String and return\r\n String[] ret = new String[1];\r\n return (lines.toArray(ret));\r\n }",
"private static String[] readLines(InputStream f) throws IOException {\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(f, \"US-ASCII\"));\n\t\tArrayList<String> lines = new ArrayList<String>();\n\t\tString line;\n\t\twhile ((line = r.readLine()) != null)\n\t\t\tlines.add(line);\n\t\treturn lines.toArray(new String[0]);\n\t}",
"private static int[] readData(int size, String filename) throws FileNotFoundException {\n\t\tint[] input = new int[size];\t\n\t\tScanner scanner = new Scanner(new File(filename));\n \n int i = 0;\n while (scanner.hasNext() && i < size)\n {\n \tinput[i] = Integer.parseInt(scanner.next());\n \ti++;\n }\n scanner.close();\n\t return input;\n\t}",
"private Object[] fetchTextFile(String filePathString){\n try (Stream<String> stream = Files.lines(Paths.get(filePathString))) {\n return stream.toArray();\n }\n catch (IOException ioe){\n System.out.println(\"Could not find file at \" + filePathString);\n return null;\n }\n\n }",
"public String[] readLines() {\n\t\tVector linesVector = new Vector(); ;\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader b = new BufferedReader(fr);\n\t\t\tboolean eof = false;\n\t\t\twhile (!eof) {\n\t\t\t\tString line = b.readLine();\n\t\t\t\tif (line == null) {\n\t\t\t\t\teof = true;\n\t\t\t\t} else {\n\t\t\t\t\tlinesVector.add(line);\n\t\t\t\t}\n\t\t\t}\n\t\t\tb.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"File \" + file.getName() +\n\t\t\t\t\" is unreadable : \" + e.toString());\n\t\t}\n\t\tString[] lines = new String[linesVector.size()];\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tlines[i] = (String) (linesVector.get(i));\n\t\t}\n\t\treturn lines;\n\t}",
"public List<String> readFileContents(String filePath) throws APIException;",
"List readFile(String pathToFile);",
"public String[] openFile() throws IOException\n\t{\n\t\t//Creates a FileReader and BufferedReader to read from the file that you pass it\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textReader = new BufferedReader(fr);\n\t\t\n\t\t//Set the variable to the number of lines in the text file through the function in this class that is defined below\n\t\tnumberOfLines = readLines();\n\t\t//Creates an array of strings with size of how many lines of data there are in the file\n\t\tString[] textData = new String[numberOfLines];\n\t\t\n\t\t//Loop to read the lines from the text file for the song data\n\t\tfor (int i = 0; i < numberOfLines; i++)\n\t\t{\n\t\t\t//Read data from song file and into the string list\n\t\t\ttextData[i] = textReader.readLine();\n\t\t}\n\t\t\n\t\t//Close the BufferedReader that was opened\n\t\ttextReader.close();\n\t\t\n\t\t//Return the read data from the text file in the form of a string array\n\t\treturn textData;\n\t}",
"static byte[] readContents(File file) {\n if (!file.isFile()) {\n throw new IllegalArgumentException(\"must be a normal file\");\n }\n try {\n return Files.readAllBytes(file.toPath());\n } catch (IOException excp) {\n throw new IllegalArgumentException(excp.getMessage());\n }\n }",
"public static String[] readFile(String fn) {\n\n try {\n\n FileReader fr = new FileReader(fn); // read the file\n // store contents in a buffer\n BufferedReader bfr = new BufferedReader(fr);\n // an string array list for storing each line of content\n ArrayList<String> content = new ArrayList<String>();\n String p = null; // temper string for passing each line of contents\n while ((p = bfr.readLine()) != null) {\n content.add(p);\n }\n\n // String array for storing content\n String[] context = new String[content.size()];\n\n for (int i = 0; i < content.size(); i++) {\n context[i] = content.get(i);\n }\n\n bfr.close(); // close the buffer\n return context;\n\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found: \" + e.getMessage());\n System.exit(0);\n } catch (IOException e) {\n // TODO Auto-generated catch block\n System.out.println(\"I/O Ooops: \" + e.getMessage());\n System.exit(0);\n }\n\n // If an exception occurred we will get to here as the return statement\n // above was not executed\n // so setup a paragraphs array to return which contains the empty string\n String[] context = new String[1];\n context[0] = \"\";\n return context;\n\n }",
"@SuppressWarnings(\"resource\")\n \tpublic String[] readTextFileOutputLinesArray(String path, String fileName) throws IOException{\n \t BufferedReader in = new BufferedReader(new FileReader(path + File.separator + fileName));\n \t String str=null;\n \t ArrayList<String> lines = new ArrayList<String>();\n \t while ((str = in.readLine()) != null) {\n \t if (!str.contains(\"helper\") && (str.length() != 0)) { lines.add(str); }\n \t }\n \t String[] linesArray = lines.toArray(new String[lines.size()]);\n \t return linesArray;\n \t}",
"private void readFileToArray(FileInputStream fis, Warship[] wsArr) throws Exception {\n\t\tScanner scanner = null;\n\t\ttry {\n\t\t\tscanner = new Scanner(fis);\n\t\t\tint i = 0;\n\t\t\twhile (scanner.hasNextLine()) {\n\t\t\t\twsArr[i] = this.getWarship(scanner.nextLine());\n\t\t\t\ti++;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t} finally {\n\t\t\tif (scanner != null) {\n\t\t\t\tscanner.close();\n\t\t\t}\n\t\t}\n\t}",
"public static String[] getLines(String filename)\n throws IOException {\n\n\n try (\n FileInputStream inStream = new FileInputStream(filename);\n InputStreamReader reader = new InputStreamReader(inStream);\n BufferedReader buffer = new BufferedReader(reader)\n ) {\n List<String> lines = new LinkedList<>();\n for (String line = buffer.readLine();\n line != null;\n line = buffer.readLine()) {\n line = line.trim();\n if (!line.isEmpty()) {\n lines.add(line);\n }\n }\n return lines.toArray(new String[0]);\n }\n }",
"public static String[] readFile() throws FileNotFoundException {\r\n\t\tScanner scan = new Scanner(new File(\"H:/My Documents/Eclipse/wordlist.txt\"));\r\n\t\tArrayList<String> a = new ArrayList<String>();\r\n\t\twhile (scan.hasNextLine()) {\r\n\t\t\ta.add(scan.nextLine());\r\n\t\t}\r\n\t\tString[] w = new String[a.size()];\r\n\t\tfor (int i = 0; i < a.size(); i++) {\r\n\t\t\tw[i] = a.get(i);\r\n\t\t}\r\n\t\tscan.close();\r\n\t\treturn w;\r\n\t}",
"private static void readFileIntoArray (String inputFileName) {\n Path path = Paths.get(inputFileName);\n array = new int[countLines(inputFileName)];\n try {\n Scanner sc = new Scanner(path);\n int i = 0;\n while (sc.hasNextLine()) {\n array[i] = Integer.parseInt(sc.nextLine());\n i++;\n }\n sc.close();\n //sort the array\n MergeSort.mergeSort(array);\n }\n catch(FileNotFoundException e) {\n System.out.println(\"File Error\");\n e.printStackTrace();\n }\n catch(IOException e) {\n System.out.println(\"File Error\");\n e.printStackTrace();\n }\n }",
"static int [] readFile() throws IOException {\n\n // Scanner used to get name of file from user\n Scanner in = new Scanner(System.in);\n System.out.println(\"Please enter the name of your file: \");\n String name = in.nextLine();\n\n File file = new File(name); \n \n // Scanner used to read file\n Scanner inputFile = new Scanner(file); \n // reads first line of file for length of array\n int x = inputFile.nextInt();\n\n //Creates array \n int [] scores = new int[x]; \n\n for (int i=0; i<x; i++) {\n int value = inputFile.nextInt();\n scores[i] = value;\n }\n inputFile.close();\n in.close();\n return scores; \n }",
"private static String[] readFile(final String pathToFile) {\n try (BufferedReader reader = new BufferedReader(new FileReader(pathToFile))) {\n final List<String> lines = new ArrayList<>();\n String line;\n while ((line = reader.readLine()) != null) {\n line = line.trim();\n if (!line.startsWith(\"#\")) {\n lines.add(line);\n }\n }\n return lines.toArray(new String[lines.size()]);\n } catch (final IOException e) {\n throw new OpenGammaRuntimeException(\"Couldn't read properties file - \" + pathToFile, e);\n }\n }",
"private String[] readFile(InputStream stream) throws StorageException {\r\n try {\r\n return readFile(new BufferedReader(new InputStreamReader(stream)));\r\n } catch (Exception exception) {\r\n throw new StorageException(\"Cannot read file \");\r\n }\r\n }",
"@Override\n public ArrayList parseFile(String pathToFile) {\n\n Scanner scanner = null;\n try {\n scanner = new Scanner(new File(pathToFile));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n ArrayList<String> data = new ArrayList<>();\n while (scanner.hasNext()) {\n data.add(scanner.next());\n }\n scanner.close();\n\n return data;\n }",
"public ArrayList<String> readFile() {\n data = new ArrayList<>();\n String line = \"\";\n boolean EOF = false;\n\n try {\n do {\n line = input.readLine();\n if(line == null) {\n EOF = true;\n } else {\n data.add(line);\n }\n } while(!EOF);\n } catch(IOException io) {\n System.out.println(\"Error encountered.\");\n }\n return data;\n }",
"public ArrayList<String> fileRead(String fileName) {\n String line = null;\n ArrayList<String> list = new ArrayList<>();\n try {\n // FileReader reads text files in the default encoding.\n FileReader fileReader = new FileReader(fileName);\n\n // Always wrap FileReader in BufferedReader.\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n while ((line = bufferedReader.readLine()) != null) {\n list.add(line);\n }\n\n // Always close files.\n bufferedReader.close();\n } catch (FileNotFoundException ex) {\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n\n } catch (IOException ex) {\n System.out.println(\"Error reading file '\" + fileName + \"'\");\n }\n return list;\n }",
"static List<String> fileReader(String fileName){\n \n \n //Read a file and store the content in a string array.\n File f = new File(fileName);\n BufferedReader reader = null;\n String tempString = null;\n List<String> fileContent = new ArrayList<String>();\n //String[] fileContent = null;\n //int i = 0;\n \n try {\n reader = new BufferedReader(new FileReader(f));\n while ((tempString = reader.readLine()) != null){\n //while ((fileContent[i] = reader.readLine()) != null){\n fileContent.add(tempString);\n //i++;\n }\n reader.close();\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n finally{\n if (reader != null){\n try{\n reader.close();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }\n }\n \n return fileContent;\n \n }",
"public static byte[] readAll(String filename) {\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(filename);\n\t\t\treturn readAll(fis);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new WrappedException(e);\n\t\t}\n\t}",
"public String[] readFile() {\n\t\t\n\t\tFile file = null;\n\t\tString[] contenu = new String[2];\n\t\tMonFileChooser ouvrir = new MonFileChooser();\n\t\tint resultat = ouvrir.showOpenDialog(null);\n\t\tif (resultat == MonFileChooser.APPROVE_OPTION) {\n\t\t\tfile = ouvrir.getSelectedFile();\n\t\t\tcontenu[0]=file.getName();\n\t\t\n\t\t\n\t\t\ttry {\n\t\t\t\tString fileContent = null;\n\t\t\t\tcontenu[1] = \"\";\n\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(file)); \n\t\t\t\twhile((fileContent = br.readLine()) != null) {\n\t\t\t\t\tif (fileContent != null)\n\t\t\t\t\tcontenu[1] += fileContent+\"\\n\";\n\t\t\t}\n\t\t\t br.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\topenFiles.add(file);\n\t\t}\n\t\treturn contenu;\t\n\t}",
"private String[] readFile(String path) throws StorageException {\r\n try {\r\n return readFile(new BufferedReader(new FileReader(new File(path))));\r\n } catch (Exception exception) {\r\n throw new StorageException(\"Cannot read file \" + path + \":\" + exception.getMessage());\r\n }\r\n }",
"public byte[] getContents() throws VlException\n {\n long len = getLength();\n // 2 GB files cannot be read into memory !\n\n // zero size optimization ! \n\n if (len==0) \n {\n return new byte[0]; // empty buffer ! \n }\n\n if (len > ((long) VRS.MAX_CONTENTS_READ_SIZE))\n throw (new ResourceToBigException(\n \"Cannot read complete contents of a file greater then:\"\n + VRS.MAX_CONTENTS_READ_SIZE));\n\n int intLen = (int) len;\n return getContents(intLen);\n\n }",
"public ArrayList<String> parseFile(String fileName) throws IOException {\n\t\tthis.parrsedArray = new ArrayList<String>();\n\t\tFileInputStream inFile = null;\n\n\t\tinFile = new FileInputStream(mngr.getPath() + fileName);\n\t\tDataInputStream in = new DataInputStream(inFile);\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n\t\tString strLine;\n\n\t\twhile ((strLine = reader.readLine()) != null && strLine.length() > 0) {\n\t\t\t// Print the content on the console\n\t\t\tparrsedArray.add(strLine);\n\t\t}\n\n\t\tinFile.close();\n\n\t\treturn parrsedArray;\n\n\t}",
"public static int[] readMysteriousNumbers(String filename) throws Exception {\n File file = new File(filename);\n Scanner counter = new Scanner(file);\n int numLines = 0;\n while(counter.hasNextLine()){\n counter.nextLine();\n numLines++;\n }\n int[] arr = new int[numLines];\n\n\n\n Scanner reader = new Scanner(file);\n int index = 0;\n while(reader.hasNextLine()){\n arr[index] = Integer.parseInt(reader.nextLine());\n index++;\n }\n\n\n\n\n return arr;\n /*\n List<Integer> nums = new ArrayList<>();\n while (scanner.hasNextInt()) {\n nums.add(scanner.nextInt());\n }\n int[] ret = new int[nums.size()];\n for(int i = 0;i < ret.length;i++) {\n ret[i] = nums.get(i);\n }\n return ret*/\n }",
"public List<String> readFile() {\n \n try {\n ensureFileExists();\n return Files.readAllLines(filePath);\n } catch (FileNotFoundException ex) {\n return new ArrayList<>();\n } catch (IOException ex) {\n ex.printStackTrace();\n return new ArrayList<>();\n }\n }",
"private String[] readFile(String location) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(location));\n\t\t\tArrayList<String> document = new ArrayList<String>();\n\t\t\tString currLine;\n\n\t\t\t// continue to append until the end of file has been reached\n\t\t\twhile ((currLine = reader.readLine()) != null) {\n\t\t\t\t// avoiding empty strings\n\t\t\t\tif (!currLine.isEmpty())\n\t\t\t\t\tdocument.add(currLine);\n\t\t\t}\n\t\t\treader.close();\n\t\t\treturn document.toArray(new String[1]);\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// sadly neccessary default return case\n\t\treturn new String[0];\n\t}",
"public ArrayList<Integer> readFile(File file) {\n\t\tArrayList<Integer> fileData = new ArrayList<Integer>();\n\t\t// read the file\n\t\ttry {\n\t\t\tScanner sc = new Scanner(file);\n\t\t\twhile (sc.hasNextInt()) {\n\t\t\t\tfileData.add(sc.nextInt());\n\t\t\t}\n\t\t\tsc.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"An error occurred.\");\n\t\t e.printStackTrace();\n\t\t}\n\t\treturn fileData;\n\t}",
"public static String[] readAllLines() {\n ArrayList<String> lines = new ArrayList<String>();\n while (hasNextLine()) {\n lines.add(readLine());\n }\n return lines.toArray(new String[lines.size()]);\n }",
"public static List<String> readFile(String filepath) {\n BufferedReader reader = null;\n List<String> fileLines = new ArrayList<String>();\n try {\n File file = new File(filepath);\n String encoding = \"UTF8\";\n reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), encoding));\n \n String line = reader.readLine();\n while (line != null) {\n fileLines.add(line);\n line = reader.readLine();\n }\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n reader.close();\n } catch (IOException e) {\n // Ignore exception because reader was not initialized\n }\n }\n return fileLines;\n }",
"public static List<String> readFile(String fileName){\r\n \r\n List<String> lines = Collections.emptyList();\r\n\r\n try{\r\n lines = Files.readAllLines(Paths.get(fileName));\r\n }\r\n\r\n catch(IOException err){\r\n err.printStackTrace();\r\n }\r\n\r\n return lines;\r\n }",
"private List<String> readFile(String path) throws IOException {\n return Files.readAllLines (Paths.get (path), StandardCharsets.UTF_8);\n }",
"public int[] getData(String filename) throws IOException\n {\n\tScanner scanner = new Scanner(new File(filename)) ;\n\ttry {\n\t readData(scanner) ;\n\t return data ;\n\t}\n\tfinally {\n\t System.out.println(\"Finally closing the scanner.\") ;\n\t scanner.close() ;\n\t}\n }",
"private static byte[] m136428a(File file) throws IOException {\n FileInputStream fileInputStream = new FileInputStream(file);\n byte[] bArr = new byte[((int) file.length())];\n int i = 0;\n while (i < bArr.length) {\n int read = fileInputStream.read(bArr, i, bArr.length - i);\n if (read < 0) {\n break;\n }\n i += read;\n }\n if (i >= bArr.length) {\n fileInputStream.close();\n return bArr;\n }\n StringBuilder sb = new StringBuilder(\"Could not completely read file \");\n sb.append(file.getName());\n throw new IOException(sb.toString());\n }",
"public ArrayList<String> readFile(File file) {\n\t\tArrayList<String> al = new ArrayList<String>();\n\t\ttry {\n\t\t\tif (file.exists()) {\n\t\t\t\tFileReader fr = new FileReader(file);\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\t\tString line;\n\t\t\t\tbr.readLine();\n\t\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\t\tal.add(line);\n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t}\n\t\t\t\tbr.close();\n\t\t\t}\n\t\t} catch (IOException e) {\t\n\t\t\t}\n\t\treturn al;\n\t\t}",
"public static List read(String fileName) throws IOException {\n\tList data = new ArrayList() ;\n Scanner scanner = new Scanner(new FileInputStream(fileName));\n try {\n while (scanner.hasNextLine()){\n data.add(scanner.nextLine());\n }\n }\n finally{\n scanner.close();\n }\n return data;\n }",
"public List<String> readFileIntoList(String sourceFilepath) throws IOException {\n List<String> lines = new ArrayList<>();\n URL url = new URL(sourceFilepath);\n BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));\n String line = null;\n while ((line = reader.readLine()) != null) {\n lines.add(line);\n }\n reader.close();\n return lines;\n }",
"public int[] readBasicInfo() throws IOException\n\t{\n\t\t//Creates a FileReader and BufferedReader to read from the file that you pass it\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textReader = new BufferedReader(fr);\n\t\t\n\t\t//Creates a new array to read the first line of data to (is an array because need to convert to int list)\n\t\tString textData;\n\t\t\n\t\t//Reads the first line of the text file into the array\n\t\ttextData = textReader.readLine();\n\t\t\n\t\tint[] data = new int[5];\n\t\t//Create a holding variable that will help to convert the String list over to an int list\n\t\tString[] tempList = new String[6];\n\t\t//List of deliminations that will be parsed out of the read strings in the string list that the function is passed\n\t\tString delims = \"[,()]+\";\n\t\t//Splits the strings from the file by the parenthesis and the commas\n\t\ttempList = textData.split(delims);\n\t\tfor (int i = 1; i < tempList.length; i++)\n\t\t\tdata[i-1] = Integer.parseInt(tempList[i]);\n\t\t\n\t\t//Returns the array containing the first line of the text file\n\t\treturn data;\n\t}",
"static String[] copy(Scanner file, int lines){\t\t\n\t\tString[] array = new String[lines];\n\t\tfor(int i = 0; file.hasNextLine(); i++){\n\t\t array[i] = file.nextLine();\n\t\t}\n\t\treturn array;\n\t}",
"public static List<String> readIn(String filename) throws Exception {\r\n Path filePath = new File(filename).toPath();\r\n Charset charset = Charset.defaultCharset(); \r\n List<String> stringList = Files.readAllLines(filePath, charset);\r\n\r\n return stringList;\r\n }",
"private ArrayList<Integer> fileReader() {\n ArrayList<Integer> data = new ArrayList<>();\n try {\n Scanner scanner = new Scanner(new File(\"andmed.txt\"));\n while (scanner.hasNextLine()) {\n data.add(Integer.valueOf(scanner.nextLine()));\n }\n scanner.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return data;\n }",
"@SuppressWarnings(\"resource\")\n \tpublic String[] readTextFileOutputLinesArray(String fileName) throws IOException{\n \t BufferedReader in = new BufferedReader(new FileReader(Common.testOutputFileDir + fileName));\n \t String str=null;\n \t ArrayList<String> lines = new ArrayList<String>();\n \t while ((str = in.readLine()) != null) {\n \t if (!str.contains(\"helper\") && (str.length() != 0)) { lines.add(str); }\n \t }\n \t String[] linesArray = lines.toArray(new String[lines.size()]);\n \t return linesArray;\n \t}",
"public static PVector[] readFromFile(String filename) {\n ArrayList<PVector> ledPositionsList= new ArrayList<PVector> ();\n //try to read data from file\n try {\n File file = new File(filename);\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()) {\n String line = scanner.nextLine();\n String[] pieces = line.split(\"\\t\");\n if (pieces.length>3) {\n ledPositionsList.add(new PVector( (Float.parseFloat(pieces[1])/4.0f), Float.parseFloat(pieces[2])/4.0f, Float.parseFloat(pieces[3])/4.0f)); //initialize Leds x,y,z,r,g,b\n }\n }\n scanner.close();\n } \n catch (FileNotFoundException ex) {\n ex.printStackTrace();\n }\n //convert to vanilla Java Array\n PVector[] ledPositions= new PVector[ledPositionsList.size()];\n for (int i=0; i<ledPositionsList.size(); i++) {\n ledPositions[i]=ledPositionsList.get(i);\n }\n return ledPositions;\n }",
"public void readFile(String filePath) {\n\n\t\tFile file = new File(filePath);\n\t\t\n\t\ttry {\n\t\t\tScanner sc = new Scanner(file);\n \t while(sc.hasNextLine() ) {\t\t \t \n\t\t \t String line = sc.nextLine();\t\t \t \n\t\t \t linesArray.add( line.split(\",\") );\t\n\t\t \t \n\t\t\t}\n\t\t \t\t \n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\t\n\t\n\t}",
"private static List<String> readFile(File file) throws IOException {\n return Files.readAllLines(file.toPath());\n }",
"private static List<String> readFile(File file) throws IOException {\n return Files.readAllLines(file.toPath());\n }",
"private static ArrayList<String> readFile() throws ApplicationException {\r\n\r\n ArrayList<String> bookList = new ArrayList<>();\r\n\r\n File sourceFile = new File(FILE_TO_READ);\r\n try (BufferedReader input = new BufferedReader(new FileReader(sourceFile))) {\r\n\r\n if (sourceFile.exists()) {\r\n LOG.debug(\"Reading book data\");\r\n String oneLine = input.readLine();\r\n\r\n while ((oneLine = input.readLine()) != null) {\r\n\r\n bookList.add(oneLine);\r\n\r\n }\r\n input.close();\r\n } else {\r\n throw new ApplicationException(\"File \" + FILE_TO_READ + \" does not exsit\");\r\n }\r\n } catch (IOException e) {\r\n LOG.error(e.getStackTrace());\r\n }\r\n\r\n return bookList;\r\n\r\n }",
"public static char[] getFileContents(File file) {\n // char array to store the file contents in\n char[] contents = null;\n try {\n BufferedReader br = new BufferedReader(new FileReader(file));\n StringBuffer sb = new StringBuffer();\n String line = \"\";\n while ((line = br.readLine()) != null) {\n // append the content and the lost new line.\n sb.append(line + \"\\n\");\n }\n contents = new char[sb.length()];\n sb.getChars(0, sb.length() - 1, contents, 0);\n\n assert (contents.length > 0);\n } catch (IOException e) {\n System.out.println(e.getMessage());\n }\n\n return contents;\n }",
"public static ArrayList<String> Readfile(String fileName) {\n\t\t\t\t\t// This will reference one line at a time\n\t\t\t\t\tArrayList<String> doc = new ArrayList<String>();\n\t\t\t\t\tString line = null;\n\t\t\t\t\tString fileNamehere = fileName;\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// FileReader reads text files in the default encoding.\n\t\t\t\t\t\tFileReader fileReader = new FileReader(fileName);\n\n\t\t\t\t\t\t// Always wrap FileReader in BufferedReader.\n\t\t\t\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\n\t\t\t\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\t\t\t\tdoc.add(line);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Always close files.\n\t\t\t\t\t\tbufferedReader.close();\n\t\t\t\t\t} catch (FileNotFoundException ex) {\n\t\t\t\t\t\tSystem.out.println(\"file not found '\" + fileName + \"'\");\n\t\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\t\tex.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\treturn doc;\n\t}",
"public static ArrayList<String> parseSequenceFile(String filePath) {\n\t\tArrayList<String> sequence = new ArrayList<String>();\n\t\tFile file = new File(filePath);\n\t\tScanner scanner;\n\n\t\ttry {\n\t\t\tscanner = new Scanner(file);\n\n\t\t\twhile (scanner.hasNextLine()) {\n\t\t\t\tsequence.add(scanner.nextLine());\n\t\t\t}\n\n\t\t\tscanner.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found. Program aborted.\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\n\t\treturn sequence;\n\t}",
"public ClickerCounterModel[] readObjectFromFile() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\ttry {\n\t\t\tFileInputStream inputStream = openFileInput(filename);\n\t\t\tInputStreamReader isr = new InputStreamReader(inputStream);\n\t\t\tBufferedReader bufferedReader = new BufferedReader(isr);\n\t\t\tString line;\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\tsb.append(line);\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// use Gson to convert it into and object\n\t\tString json = sb.toString();\n\t\tGson gson = new Gson();\n\t\tClickerCounterModel[] object = gson.fromJson(json,\n\t\t\t\tClickerCounterModel[].class);\n\t\treturn object;\n\t}",
"public byte[] readByteArrayFromFile(String fileName)\r\n\tthrows FileNotFoundException, IOException {\r\n\t\tFileInputStream theSourceInputStream = new FileInputStream(fileName);\r\n\t\tByteArrayOutputStream theSourceOutputStream = new ByteArrayOutputStream(\r\n\t\t\t\tBUFFER_SIZE);\r\n\t\tcopyStreamContent(theSourceInputStream, theSourceOutputStream);\r\n\t\tbyte[] theResult = theSourceOutputStream.toByteArray();\r\n\t\ttheSourceInputStream.close();\r\n\t\ttheSourceOutputStream.close();\r\n\t\treturn theResult;\r\n\t}",
"public String[] ReadAllFileLines(String sFilePath) throws Exception {\n File f = null;\n FileInputStream fstream = null;\n DataInputStream in = null;\n BufferedReader br = null;\n String strLine = \"\";\n String[] stemp = null;\n StringBuffer strbuff = new StringBuffer();\n try {\n //getting file oject\n f = new File(sFilePath);\n if (f.exists()) {\n //get object for fileinputstream\n fstream = new FileInputStream(f);\n // Get the object of DataInputStream\n in = new DataInputStream(fstream);\n //get object for bufferreader\n br = new BufferedReader(new InputStreamReader(in, \"UTF-8\"));\n //Read File Line By Line\n while ((strLine = br.readLine()) != null) {\n strbuff.append(strLine + \"##NL##\");\n }\n\n stemp = strbuff.toString().split(\"##NL##\");\n } else {\n throw new Exception(\"File Not Found!!\");\n }\n\n return stemp;\n } catch (Exception e) {\n throw new Exception(\"ReadAllFileLines : \" + e.toString());\n } finally {\n //Close the input stream\n try {\n br.close();\n } catch (Exception e) {\n }\n try {\n fstream.close();\n } catch (Exception e) {\n }\n try {\n in.close();\n } catch (Exception e) {\n }\n }\n }",
"public static List<String> readFileAsList(String filePath) {\n\n\t\tBufferedReader readFile = null;\n\t\tString line = null;\n\t\tList<String> fileContents = new ArrayList<String>();\n\t\ttry {\n\t\t\treadFile = new BufferedReader((new FileReader(filePath)));\n\t\t\twhile ((line = readFile.readLine()) != null)\n\t\t\t\tfileContents.add(line);\n\t\t\treadFile.close();\n\t\t\treturn fileContents;\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Unable to find file: \" + filePath);\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Unable to read file: \" + filePath);\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn fileContents;\n\t}",
"private static String[] readFile(String path) throws FileNotFoundException{\n\t\tjava.io.File file = new java.io.File(path);\n\t\tjava.util.Scanner sc = new java.util.Scanner(file); \n\t\tStringBuilder content = new StringBuilder();\n\t\twhile (sc.hasNextLine()) {\n\t\t String line = sc.nextLine();\n\t\t if (!line.startsWith(\"!--\")){\n\t\t \tline = line.trim();\n\t\t \tString[] lineContent = line.split(\"/\");\n\t\t \tfor (String entry : lineContent){\n\t\t \t\tcontent.append(entry);\n\t\t \t\tcontent.append(\"/\");\n\t\t \t}\n\t\t \tcontent.append(\"!\");\n\t\t }\n\t\t}\n\t\tsc.close();\n\t\treturn content.toString().split(\"!\");\n\t}",
"private String[] loadFile(String filename) {\n\t\treturn loadFile(filename, new String[0], System.lineSeparator());\n\t}",
"public static byte[] readBytesFromFile(File f) {\r\n byte[] bytes = null;\r\n try {\r\n int filesize = (int) f.length();\r\n bytes = new byte[filesize];\r\n DataInputStream in = new DataInputStream(new FileInputStream(f));\r\n in.readFully(bytes);\r\n in.close();\r\n } catch (Exception e) {\r\n System.out.println(\"Error reading byte[] from file: \"\r\n + e.getMessage());\r\n return null;\r\n }\r\n return bytes;\r\n }",
"private List<String> readFile(String fileName)\n {\n try\n {\n String file = new String(Files.readAllBytes(Paths.get(fileName)), Charset.forName(\"ISO-8859-1\"));\n file = file\n .toLowerCase()\n .replaceAll(\"[^\\\\w]+\", \" \")\n .replaceAll(\"[0-9]\", \"\");\n Tokenizer tokenizer = SimpleTokenizer.INSTANCE;\n String[] tokens = tokenizer.tokenize(file);\n return Arrays.asList(tokens);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return new ArrayList<>();\n }",
"public static String[] DataCollection(String a) throws FileNotFoundException {\n\tFile file = new File(a); \n \tScanner sc = new Scanner(file); \n \n // Counter variable to count the number of entries in text file\n\tint counter = 0;\n\n\t\n \n\tString[] data = new String[2976];\n // While loop to take in data from text file \n\twhile(sc.hasNextLine())\n\t{\n\t\n\tsc.useDelimiter(\"\\\\Z\"); \n\t\n\t// Inserting data in each line to array\n\tdata[counter] = sc.nextLine();\n\tcounter = counter + 1;\n\t\n\t}\n\treturn data;\n \t}",
"public static ArrayList<String> readFile(String fileName) {\n\t\tArrayList<String> al = new ArrayList<String>();\n\t\ttry {\n\t\t\tFile myObj = new File(fileName);\n\t\t\tScanner myReader = new Scanner(myObj);\n\t\t\twhile (myReader.hasNextLine()) {\n\t\t\t\tString data = myReader.nextLine();\n\t\t\t\tal.add(data);\n\t\t\t}\n\t\t\tmyReader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tif (e.toString().contains(\"No such file or directory\")) {\n\t\t\t\tal.add(\"no file found\");\n\t\t\t\treturn al;\n\t\t\t}\n\t\t}\n\t\treturn al;\n\t}",
"public Vector<String> read(String path) throws FileNotFoundException, IOException {\n file = new File(path);\n fread = new FileReader(file);\n buf = new BufferedReader(fread);\n\n String temp;\n Vector<String> working = new Vector<String>();\n\n while (true) {\n temp = buf.readLine();\n\n if (temp == null) {\n break;\n } else {\n working.add(temp);\n }\n }\n\n return working;\n }",
"public byte[] readFile(RAFFileEntry fileEntry) throws IOException {\n\t\tarchiveFile.setPosition(fileEntry.getDataOffset());\n\t\tif (fileEntry.getDataSize() > 0xFFFFFFFFL) throw new IOException(\"File too big.\");\n\t\tbyte[] data = archiveFile.readBytes((int) fileEntry.getDataSize());\n\t\treturn data;\n\t}",
"public static void readArray(String fileName, int[] newArray) throws Exception{\n\n // Create DataInputStream object to read from binary file.\n // Use fileName from demo file and read into newArray in demo file.\n DataInputStream input = new DataInputStream(new FileInputStream(fileName));\n\n // Create boolean variable to determine End Of File\n boolean EOF = false;\n\n // While it's not the End Of File\n while(!EOF){\n\n // Try Catch Statement\n try{\n\n // for Loop to go through each integer in the binary file\n for(int i = 0; i < newArray.length; i++){\n\n // read the number and place it in the newArray\n newArray[i] = input.readInt();\n }\n }catch(EOFException e){ // Catch clause to find end of file\n // Change EOF to True\n EOF = true;\n }\n\n }\n // Close the file\n input.close();\n }",
"public String readFileContents(String filename) {\n return null;\n\n }",
"public ArrayList<String> readFromFile(String fileName) throws IOException {\n\t\tBufferedReader reader = new BufferedReader(new FileReader(fileName));\n\t ArrayList<String> retour = new ArrayList<String>();\n\t String line = null;\n\t while((line = reader.readLine()) != null) \n\t \tretour.add(line);\n\t \n\t reader.close();\n\t return retour; \n\t}",
"private byte[] readSampleData(String filePath) {\n File sampleFile = new File(filePath);\n byte[] buffer = new byte[(int) sampleFile.length()];\n FileInputStream fis = null;\n try {\n fis = new FileInputStream(sampleFile);\n readFill(fis, buffer);\n } catch (IOException e) {\n throw new RuntimeException(e);\n } finally {\n try {\n fis.close();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return buffer;\n }",
"public String[] readAllLines(){\n\t\tArrayList<String> lines=new ArrayList<>();\n\t\twhile (hasNestLine())\n\t\t\tlines.add(readLine());\n\t\treturn lines.toArray(new String[lines.size()]);\n\t}",
"public ArrayList<Integer> readNumbersFromFile() throws FileNotFoundException {\r\n ArrayList<Integer> arrayList = new ArrayList<>();\r\n File file = new File(readFilename);\r\n Scanner scanner = new Scanner(file);\r\n while(scanner.hasNextInt())\r\n {\r\n arrayList.add(scanner.nextInt());\r\n }\r\n return arrayList;\r\n }",
"private List<String> readFile() throws FileNotFoundException {\t\n\t\tList<String> itemsLines = new ArrayList<>();\n\t\tFile inputFile = new File(filePath);\t\n\t\ttry (Scanner newScanner = new Scanner(inputFile)) {\n\t\t\twhile(newScanner.hasNextLine()) {\n\t\t\t\titemsLines.add(newScanner.nextLine());\n\t\t\t}\t\n\t\t}\n\t\treturn itemsLines;\n\t}",
"public ArrayList<BigInteger> read(String fileName) {\n String line = null; // current line from text file\n String[] numbers = null;\n try {\n BufferedReader lineReader = new BufferedReader\n ( (fileName == null || fileName.length() <= 0 || fileName.equals(\"-\"))\n ? new InputStreamReader(System.in)\n : new FileReader(fileName)\n );\n while ((line = lineReader.readLine()) != null) { // read and process lines\n if (! line.matches(\"\\\\s*#.*\") && ! line.matches(\"\\\\s*\")) { // no comment line, no empty line\n numbers = line.trim().split(\"\\\\s+\");\n int last = numbers.length - 1;\n /*\n try {\n int index = Integer.parseInt(numbers[0]);\n } catch (Exception exc) {\n }\n */\n sequence.add(new BigInteger(numbers[last]));\n } else {\n // ignore comment line\n }\n } // while ! eof\n lineReader.close();\n } catch (Exception exc) {\n log.error(exc.getMessage(), exc);\n } // try\n return sequence;\n }",
"public static String[] getLines (final String pFilename) throws FileNotFoundException {\n\t\tFile file = new File (pFilename); \n\t\tScanner scanner = new Scanner (file); \n\t\t\n\t\tArrayList<String> lines = new ArrayList<String> (); \n\t\twhile (scanner.hasNextLine()) {\n\t\t\tString line = scanner.nextLine(); \n\t\t\tif (!line.isEmpty())\n\t\t\t\tlines.add(line); \n\t\t}\n\t\tscanner.close(); \n\t\t\n\t\treturn lines.toArray(new String [0]); \n\t}",
"public static byte[] getBytesFromFile(File file) throws IOException {\r\n\r\n InputStream is = new FileInputStream(file);\r\n\r\n // Get the size of the file\r\n long length = file.length();\r\n\r\n /*\r\n * You cannot create an array using a long type. It needs to be an int\r\n * type. Before converting to an int type, check to ensure that file is\r\n * not loarger than Integer.MAX_VALUE;\r\n */\r\n if (length > Integer.MAX_VALUE) {\r\n System.out.println(\"File is too large to process\");\r\n return null;\r\n }\r\n\r\n // Create the byte array to hold the data\r\n byte[] bytes = new byte[(int) length];\r\n\r\n // Read in the bytes\r\n int offset = 0;\r\n int numRead = 0;\r\n while ((offset < bytes.length) &&\r\n ((numRead = is.read(bytes, offset, bytes.length - offset)) >= 0)) {\r\n\r\n offset += numRead;\r\n\r\n }\r\n\r\n // Ensure all the bytes have been read in\r\n if (offset < bytes.length) {\r\n throw new IOException(\"Could not completely read file \" + file.getName());\r\n }\r\n\r\n is.close();\r\n return bytes;\r\n\r\n }",
"public List<String> readFileIntoList(String filepath) throws IOException;",
"public String[] readFromFile(Path destination) throws IOException {\n\t\ttry (BufferedReader buffer = Files.newBufferedReader(destination)) {\n\t\t\treturn (buffer.lines().collect(Collectors.joining(\"\\n\"))).split(\",\");\n\t\t}\n\t}",
"private ArrayList loadfile(String file_path) throws Exception{\n\t\tFileInputStream fis = null;\n\t\tBufferedReader br = null;\n\t\tArrayList filedata = new ArrayList();\n\t\ttry {\n\t\t\tFile file = new File(file_path);\n\t\t\tfis = new FileInputStream(file);\n\t\t\tbr = new BufferedReader(new InputStreamReader(fis, charset));\n\t\t\tint i = 0;\n\t\t\twhile (br.ready()) {\n\t\t\t\tString line_data = br.readLine();\n\t\t\t\tif (line_data == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tnode_line_data nd = new node_line_data(line_data, i++);\n\t\t\t\tfiledata.add(nd);\n\t\t\t}\n\t\t\treturn filedata;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (br != null)\n\t\t\t\t\tbr.close();\n\t\t\t\tif (fis != null)\n\t\t\t\t\tfis.close();\n\t\t\t}\n\t\t\tcatch (IOException ex) {\n\t\t\t}\n\t\t}\n\t}",
"private ArrayList<String> readReturnFileContents(String fileName){\n String startingDir = System.getProperty(\"user.dir\");\n BufferedReader reader = null;\n String line = \"\";\n ArrayList<String> wholeFile = new ArrayList<String>();\n try {\n reader = new BufferedReader(new FileReader(startingDir + \"/\" + fileName));\n while ((line = reader.readLine()) != null) {\n wholeFile.add(line);\n }\n } catch (FileNotFoundException fnfe) {\n System.out.println(fnfe.getMessage());\n System.exit(1);\n } catch (NullPointerException npe) {\n System.out.println(npe.getMessage());\n System.exit(1);\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n System.exit(1);\n }\n return wholeFile;\n }",
"public Student[] constructArray(String fileName)throws IOException{\n \n Student[] ans = new Student[10];\n Scanner Sc = new Scanner(new File(fileName));\n Sc.useDelimiter(\"\\t|\\n\");\n this.amount = 0;\n while(Sc.hasNext()){\n if(this.amount == ans.length){\n ans = doubler(ans);\n }\n String ID = Sc.next();\n String SName = Sc.next();\n String Email = Sc.next();\n String SClass = Sc.next();\n String major = Sc.next();\n ans[this.amount] = new Student(ID, SName, Email, SClass, major);\n amount++;\n }\n return ans;\n }",
"public static Integer[] readInputArrayFromFile(Integer[] array, String fileName) {\n\n\t\tList<Integer> ints = readInputArrayFromFile(fileName);\n\n\t\tarray = new Integer[ints.size()];\n\t\tfor (int i = 0; i < ints.size(); i++) {\n\t\t\tarray[i] = ints.get(i);\n\t\t}\n\t\treturn array;\n\t}",
"public static ArrayList<String> readLines(String fileName){\n\t\treturn read(fileName, false);\n\t}",
"private Point[] readTestFile(String filename) {\n In in = new In(filename);\n int N = in.readInt();\n Point[] points = new Point[N];\n for (int i = 0; i < N; i++) {\n int x = in.readInt();\n int y = in.readInt();\n points[i] = new Point(x, y);\n }\n return points;\n }",
"public static byte[] getBytesFromFile(File file) throws IOException {\n\t\tlong length = file.length();\r\n\r\n\t\t// You cannot create an array using a long type.\r\n\t\t// It needs to be an int type.\r\n\t\t// Before converting to an int type, check\r\n\t\t// to ensure that file is not larger than Integer.MAX_VALUE.\r\n\t\tif (length > Integer.MAX_VALUE) {\r\n\t\t\t// File is too large\r\n\t\t\tthrow new IOException(\"File is too large!\");\r\n\t\t}\r\n\r\n\t\t// Create the byte array to hold the data\r\n\t\tbyte[] bytes = new byte[(int)length];\r\n\r\n\t\t// Read in the bytes\r\n\t\tint offset = 0;\r\n\t\tint numRead = 0;\r\n\r\n\t\tInputStream is = new FileInputStream(file);\r\n\t\ttry {\r\n\t\t\twhile (offset < bytes.length\r\n\t\t\t\t\t&& (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {\r\n\t\t\t\toffset += numRead;\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tis.close();\r\n\t\t}\r\n\r\n\t\t// Ensure all the bytes have been read in\r\n\t\tif (offset < bytes.length) {\r\n\t\t\tthrow new IOException(\"Could not completely read file \"+file.getName());\r\n\t\t}\r\n\t\treturn bytes;\r\n\t}",
"TraceList read(File file) throws IOException;",
"public static int[][] read(String fileName) throws FileNotFoundException {\r\n int i = -1;\r\n int j;\r\n\r\n int row = 1;\r\n int col = 0;\r\n\r\n Scanner read = new Scanner(new File(\".\\\\data\\\\mountain.paths\\\\\" + fileName));\r\n StringTokenizer st = new StringTokenizer(read.nextLine());\r\n\r\n while (st.hasMoreTokens()) {\r\n st.nextToken();\r\n col++;\r\n }\r\n\r\n while (read.hasNextLine()) {\r\n read.nextLine();\r\n row++;\r\n }\r\n\r\n read = new Scanner(new File(\".\\\\data\\\\mountain.paths\\\\\" + fileName));\r\n int[][] data = new int[row][col];\r\n\r\n while (read.hasNextLine()) {\r\n j = -1;\r\n i++;\r\n st = new StringTokenizer(read.nextLine());\r\n while (st.hasMoreTokens()) {\r\n j++;\r\n data[i][j] = Integer.parseInt(st.nextToken());\r\n }\r\n }\r\n return data;\r\n }",
"public static byte[] readFileAsByteArray(String path) throws IOException {\n return internalReadFileAsByteArray(path).array();\n }",
"public void readIn(String file) {\r\n\r\n\t\ttry {\r\n\r\n\t\t\t/** Initialise loop variable **/\r\n\r\n\t\t\tusedSize = 0;\r\n\r\n\t\t\t/** Set up file for reading **/\r\n\r\n\t\t\tFileReader reader = new FileReader(file);\r\n\r\n\t\t\tScanner in = new Scanner(reader);\r\n\r\n\t\t\t/** Loop round reading in data while array not full **/\r\n\r\n\t\t\twhile (in.hasNextInt() && (usedSize < size)) {\r\n\r\n\t\t\t\tA[usedSize] = in.nextInt();\r\n\r\n\t\t\t\tusedSize++;\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\tSystem.out.println(\"Error processing file \" + file);\r\n\r\n\t\t}\r\n\r\n\t}",
"private static List<String[]> readInput(String filePath) {\n List<String[]> result = new ArrayList<>();\n int numOfObject = 0;\n\n try {\n Scanner sc = new Scanner(new File(filePath));\n sc.useDelimiter(\"\");\n if (sc.hasNext()) {\n numOfObject = Integer.parseInt(sc.nextLine());\n }\n for (int i=0;i<numOfObject;i++) {\n if (sc.hasNext()) {\n String s = sc.nextLine();\n if (s.trim().isEmpty()) {\n continue;\n }\n result.add(s.split(\" \"));\n }\n }\n sc.close();\n }\n catch (FileNotFoundException e) {\n System.out.println(\"FileNotFoundException\");\n }\n return result;\n }",
"public static byte[] readBytes(String file) throws IOException\n {\n try(InputStream in = getInputStream(file))\n {\n byte[] buffer = new byte[512];\n int size = 0;\n int read;\n while((read = in.read(buffer, size, buffer.length - size)) > 0)\n {\n size += read;\n if(size == buffer.length)\n buffer = Arrays.copyOf(buffer, size * 2);\n }\n\n if(size < buffer.length)\n buffer = Arrays.copyOf(buffer, size);\n\n return buffer;\n }\n }",
"private ArrayList<String> readEntriesFromFile(String nameOfFile){\n\t\tArrayList<String> foundEntries = new ArrayList<String>();\n\t\t\n\t\ttry{\n\t\t\tFile file = new File(nameOfFile); \n\t\t\tScanner fileIn = new Scanner(file);\n\t\t\twhile (fileIn.hasNext()){\n\t\t\t\tString currentLine = fileIn.nextLine();\n\t\t\t\tfoundEntries.add(currentLine);\n\t\t\t} \n\t\t\tfileIn.close();\n\t\t}catch (IOException e){\n\t\t}\n\t\t\n\t\tif(foundEntries.size()==0){\n\t\t return null;\n\t\t}else{\n\t\t\treturn foundEntries;\n\t\t}\n\t}",
"public static int[] buildArray() throws IOException {\r\n\r\n //Variable initializations\r\n int[] intArray = {};\r\n int sumOfElements = 0;\r\n int index = 0;\r\n \r\n //Initialization of File and Scanner objects\r\n \r\n File sumOfIntegers = new File(fileInput);\r\n Scanner elementScanner = new Scanner(sumOfIntegers);\r\n\r\n //Loop that increases the num of array elements by 1 every time\r\n //it acknowledges an integer value within the file and subtracts\r\n //1 from the array elements when the sentinel value is reached.\r\n while (elementScanner.hasNextInt()) {\r\n sumOfElements++;\r\n \r\n \r\n //Assign next int scanner method to x variable\r\n //Used to process if boolean condition\r\n int x = elementScanner.nextInt();\r\n\r\n //When -999 sentinel value is reached reduce num of array elements\r\n //by 1 since we do not want it included\r\n if (x == -999) {\r\n sumOfElements = sumOfElements - 1;\r\n intArray = new int[sumOfElements];\r\n }\r\n //Assign sumOfElements as num of array elements\r\n intArray = new int[sumOfElements]; \r\n\r\n }\r\n\r\n //new scanner to reset abstract cursor of file\r\n elementScanner = new Scanner(sumOfIntegers);\r\n for (index = 0; index < sumOfElements; index++) {\r\n int x = elementScanner.nextInt();\r\n\r\n if (x != -999) {\r\n intArray[index] = x;\r\n }\r\n\r\n }\r\n\r\n //Closes the file/scanner\r\n elementScanner.close();\r\n\r\n return intArray;\r\n }",
"public static byte[] convertir(File file) {\n\t\tbyte[] a = new byte[(int) file.length()];\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(file);\n\t\t\tfis.read(a);\n\t\t\tfis.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn a;\n\t}",
"private List<String[]> extract(String file) {\n List<String[]> readIn = null;\n try {\n // instantiate file reader object\n FileReader fr = new FileReader(file);\n\n // instantiate csv reader object\n CSVReader csvReader = new CSVReaderBuilder(fr).build();\n readIn = csvReader.readAll();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return readIn;\n }"
] |
[
"0.74047863",
"0.7369295",
"0.72883135",
"0.70018905",
"0.69533265",
"0.69512033",
"0.69347936",
"0.68420434",
"0.6802301",
"0.6759347",
"0.6720819",
"0.6711178",
"0.67026526",
"0.66596144",
"0.66292953",
"0.65451634",
"0.6534951",
"0.65045553",
"0.6494749",
"0.6493054",
"0.6458796",
"0.6456255",
"0.644357",
"0.6418644",
"0.6403949",
"0.6402045",
"0.63889",
"0.6383837",
"0.6382561",
"0.63752896",
"0.6357808",
"0.6350534",
"0.63502073",
"0.6343167",
"0.6342441",
"0.6302596",
"0.6298904",
"0.62972236",
"0.62929696",
"0.6277934",
"0.6277264",
"0.6271374",
"0.6248771",
"0.62433505",
"0.62420475",
"0.62372303",
"0.6237038",
"0.6229518",
"0.6211877",
"0.62028855",
"0.6197885",
"0.6196424",
"0.61908627",
"0.61852515",
"0.61852515",
"0.61845857",
"0.61661345",
"0.6162821",
"0.6159411",
"0.6154098",
"0.61437416",
"0.61356556",
"0.6134213",
"0.6118116",
"0.60880136",
"0.6073264",
"0.6065389",
"0.6059573",
"0.6049034",
"0.6048545",
"0.6015795",
"0.6013423",
"0.6012294",
"0.60057795",
"0.5999745",
"0.5995248",
"0.5992451",
"0.59905756",
"0.59856546",
"0.5983082",
"0.59825116",
"0.5966033",
"0.5958907",
"0.5956145",
"0.59547085",
"0.595424",
"0.59306693",
"0.5928977",
"0.59288543",
"0.5915382",
"0.5915055",
"0.59105873",
"0.59101784",
"0.5904598",
"0.5896405",
"0.586817",
"0.5867981",
"0.5865106",
"0.5846711",
"0.5845678"
] |
0.62783945
|
39
|
Read contents of a file into an array
|
public static char[] readInputStreamContents(InputStream is, String encoding) throws CoreException {
Check.checkArg(is);
Reader reader;
try {
if (encoding != null)
reader = new InputStreamReader(is, encoding);
else
reader = new InputStreamReader(is);
return readReaderContents(reader);
} catch (UnsupportedEncodingException e) {
throw new CoreException(createErrorStatus(e));
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String[] read()\n {\n ArrayList<String> input = new ArrayList<String>();\n try\n {\n dir = new File(contextRef.getFilesDir(), filename);\n if (dir.exists())\n {\n Scanner contacts = new Scanner(dir);\n while (contacts.hasNextLine())\n {\n input.add(contacts.nextLine());\n }\n contacts.close();\n }\n }catch (Exception ex)\n {\n //debug(\"read file contents failure\");\n debug = \"test read failure\";\n }\n return input.toArray(new String[1]);\n }",
"String[] readFile(File file) {\n ArrayList<String> list = new ArrayList<>();\n String[] output = null;\n Scanner reader = null;\n try {\n if (file.isFile()) {\n reader = new Scanner(file);\n while (reader.hasNextLine()) {\n list.add(reader.nextLine());\n }\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found exception\");\n }\n output = new String[list.size()];\n for (int i = 0; i < list.size(); i++) output[i] = list.get(i);\n reader.close();\n return output;\n }",
"String[] readFile(String path) {\n ArrayList<String> list = new ArrayList<>();\n String[] output = null;\n Scanner reader;\n File file;\n\n try {\n file = new File(path);\n reader = new Scanner(file);\n while (reader.hasNextLine()) {\n list.add(reader.nextLine());\n }\n output = new String[list.size()];\n for (int i = 0; i < list.size(); i++) output[i] = list.get(i);\n reader.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found exception\");\n }\n return output;\n }",
"public String[] getFile() throws IOException {\n\t\n\t\n\ttry {\n\tFileReader reader = new FileReader(path);\n\tBufferedReader textReader = new BufferedReader(reader); // creates buffered file reader again\n\t\n\tint numberOfLines = getLines(); // calls the method above to know how many lines there are\n\tString[ ] textData = new String[numberOfLines]; //creates an array the size of the amount of lines the file has\n\t\n\tfor (int i=0; i < numberOfLines; i++) {\n\t\ttextData[ i ] = textReader.readLine(); // go through file and read each line into its own array space\n\t\t}\n\t\n\ttextReader.close( ); //reader is done\n\treturn textData; // return array\n\t} catch (IOException e) {\n\t\tString[] exceptionString = new String[1];\n\t\texceptionString[0] = \"nothing\";\n\t\treturn exceptionString;\n\t}\n}",
"private static String[] readFile(String file){\n\t\ttry{\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(file));\n\t\t\tString line;\n\t\t\tString data = \"\";\n\t\t\twhile((line = in.readLine()) != null){\n\t\t\t\tdata = data + '\\n' + line;\t\t\t}\n\t\t\tin.close();\n\t\t\tString[] data_array = data.split(\"\\\\n\");\n\t\t\treturn data_array;\n\t\t}\n\t\tcatch(IOException e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\tString[] shouldNeverReturn = new String[1];\n\t\treturn shouldNeverReturn;\n\t}",
"protected String[] readInFile(String filename) {\n Vector<String> fileContents = new Vector<String>();\n try {\n InputStream gtestResultStream1 = getClass().getResourceAsStream(File.separator +\n TEST_TYPE_DIR + File.separator + filename);\n BufferedReader reader = new BufferedReader(new InputStreamReader(gtestResultStream1));\n String line = null;\n while ((line = reader.readLine()) != null) {\n fileContents.add(line);\n }\n }\n catch (NullPointerException e) {\n CLog.e(\"Gest output file does not exist: \" + filename);\n }\n catch (IOException e) {\n CLog.e(\"Unable to read contents of gtest output file: \" + filename);\n }\n return fileContents.toArray(new String[fileContents.size()]);\n }",
"private String[] readFile(BufferedReader reader) throws IOException {\r\n // Read each line in the file, add it to the ArrayList lines\r\n ArrayList<String> lines = new ArrayList<String>();\r\n String line;\r\n while ((line = reader.readLine()) != null) {\r\n lines.add(line);\r\n }\r\n reader.close();\r\n // Convert the list to an array of type String and return\r\n String[] ret = new String[1];\r\n return (lines.toArray(ret));\r\n }",
"private static String[] readLines(InputStream f) throws IOException {\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(f, \"US-ASCII\"));\n\t\tArrayList<String> lines = new ArrayList<String>();\n\t\tString line;\n\t\twhile ((line = r.readLine()) != null)\n\t\t\tlines.add(line);\n\t\treturn lines.toArray(new String[0]);\n\t}",
"private static int[] readData(int size, String filename) throws FileNotFoundException {\n\t\tint[] input = new int[size];\t\n\t\tScanner scanner = new Scanner(new File(filename));\n \n int i = 0;\n while (scanner.hasNext() && i < size)\n {\n \tinput[i] = Integer.parseInt(scanner.next());\n \ti++;\n }\n scanner.close();\n\t return input;\n\t}",
"private Object[] fetchTextFile(String filePathString){\n try (Stream<String> stream = Files.lines(Paths.get(filePathString))) {\n return stream.toArray();\n }\n catch (IOException ioe){\n System.out.println(\"Could not find file at \" + filePathString);\n return null;\n }\n\n }",
"public String[] readLines() {\n\t\tVector linesVector = new Vector(); ;\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader b = new BufferedReader(fr);\n\t\t\tboolean eof = false;\n\t\t\twhile (!eof) {\n\t\t\t\tString line = b.readLine();\n\t\t\t\tif (line == null) {\n\t\t\t\t\teof = true;\n\t\t\t\t} else {\n\t\t\t\t\tlinesVector.add(line);\n\t\t\t\t}\n\t\t\t}\n\t\t\tb.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"File \" + file.getName() +\n\t\t\t\t\" is unreadable : \" + e.toString());\n\t\t}\n\t\tString[] lines = new String[linesVector.size()];\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tlines[i] = (String) (linesVector.get(i));\n\t\t}\n\t\treturn lines;\n\t}",
"public List<String> readFileContents(String filePath) throws APIException;",
"List readFile(String pathToFile);",
"public String[] openFile() throws IOException\n\t{\n\t\t//Creates a FileReader and BufferedReader to read from the file that you pass it\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textReader = new BufferedReader(fr);\n\t\t\n\t\t//Set the variable to the number of lines in the text file through the function in this class that is defined below\n\t\tnumberOfLines = readLines();\n\t\t//Creates an array of strings with size of how many lines of data there are in the file\n\t\tString[] textData = new String[numberOfLines];\n\t\t\n\t\t//Loop to read the lines from the text file for the song data\n\t\tfor (int i = 0; i < numberOfLines; i++)\n\t\t{\n\t\t\t//Read data from song file and into the string list\n\t\t\ttextData[i] = textReader.readLine();\n\t\t}\n\t\t\n\t\t//Close the BufferedReader that was opened\n\t\ttextReader.close();\n\t\t\n\t\t//Return the read data from the text file in the form of a string array\n\t\treturn textData;\n\t}",
"static byte[] readContents(File file) {\n if (!file.isFile()) {\n throw new IllegalArgumentException(\"must be a normal file\");\n }\n try {\n return Files.readAllBytes(file.toPath());\n } catch (IOException excp) {\n throw new IllegalArgumentException(excp.getMessage());\n }\n }",
"public static String[] readFile(String fn) {\n\n try {\n\n FileReader fr = new FileReader(fn); // read the file\n // store contents in a buffer\n BufferedReader bfr = new BufferedReader(fr);\n // an string array list for storing each line of content\n ArrayList<String> content = new ArrayList<String>();\n String p = null; // temper string for passing each line of contents\n while ((p = bfr.readLine()) != null) {\n content.add(p);\n }\n\n // String array for storing content\n String[] context = new String[content.size()];\n\n for (int i = 0; i < content.size(); i++) {\n context[i] = content.get(i);\n }\n\n bfr.close(); // close the buffer\n return context;\n\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found: \" + e.getMessage());\n System.exit(0);\n } catch (IOException e) {\n // TODO Auto-generated catch block\n System.out.println(\"I/O Ooops: \" + e.getMessage());\n System.exit(0);\n }\n\n // If an exception occurred we will get to here as the return statement\n // above was not executed\n // so setup a paragraphs array to return which contains the empty string\n String[] context = new String[1];\n context[0] = \"\";\n return context;\n\n }",
"@SuppressWarnings(\"resource\")\n \tpublic String[] readTextFileOutputLinesArray(String path, String fileName) throws IOException{\n \t BufferedReader in = new BufferedReader(new FileReader(path + File.separator + fileName));\n \t String str=null;\n \t ArrayList<String> lines = new ArrayList<String>();\n \t while ((str = in.readLine()) != null) {\n \t if (!str.contains(\"helper\") && (str.length() != 0)) { lines.add(str); }\n \t }\n \t String[] linesArray = lines.toArray(new String[lines.size()]);\n \t return linesArray;\n \t}",
"private void readFileToArray(FileInputStream fis, Warship[] wsArr) throws Exception {\n\t\tScanner scanner = null;\n\t\ttry {\n\t\t\tscanner = new Scanner(fis);\n\t\t\tint i = 0;\n\t\t\twhile (scanner.hasNextLine()) {\n\t\t\t\twsArr[i] = this.getWarship(scanner.nextLine());\n\t\t\t\ti++;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t} finally {\n\t\t\tif (scanner != null) {\n\t\t\t\tscanner.close();\n\t\t\t}\n\t\t}\n\t}",
"public static String[] getLines(String filename)\n throws IOException {\n\n\n try (\n FileInputStream inStream = new FileInputStream(filename);\n InputStreamReader reader = new InputStreamReader(inStream);\n BufferedReader buffer = new BufferedReader(reader)\n ) {\n List<String> lines = new LinkedList<>();\n for (String line = buffer.readLine();\n line != null;\n line = buffer.readLine()) {\n line = line.trim();\n if (!line.isEmpty()) {\n lines.add(line);\n }\n }\n return lines.toArray(new String[0]);\n }\n }",
"public static String[] readFile() throws FileNotFoundException {\r\n\t\tScanner scan = new Scanner(new File(\"H:/My Documents/Eclipse/wordlist.txt\"));\r\n\t\tArrayList<String> a = new ArrayList<String>();\r\n\t\twhile (scan.hasNextLine()) {\r\n\t\t\ta.add(scan.nextLine());\r\n\t\t}\r\n\t\tString[] w = new String[a.size()];\r\n\t\tfor (int i = 0; i < a.size(); i++) {\r\n\t\t\tw[i] = a.get(i);\r\n\t\t}\r\n\t\tscan.close();\r\n\t\treturn w;\r\n\t}",
"private static void readFileIntoArray (String inputFileName) {\n Path path = Paths.get(inputFileName);\n array = new int[countLines(inputFileName)];\n try {\n Scanner sc = new Scanner(path);\n int i = 0;\n while (sc.hasNextLine()) {\n array[i] = Integer.parseInt(sc.nextLine());\n i++;\n }\n sc.close();\n //sort the array\n MergeSort.mergeSort(array);\n }\n catch(FileNotFoundException e) {\n System.out.println(\"File Error\");\n e.printStackTrace();\n }\n catch(IOException e) {\n System.out.println(\"File Error\");\n e.printStackTrace();\n }\n }",
"static int [] readFile() throws IOException {\n\n // Scanner used to get name of file from user\n Scanner in = new Scanner(System.in);\n System.out.println(\"Please enter the name of your file: \");\n String name = in.nextLine();\n\n File file = new File(name); \n \n // Scanner used to read file\n Scanner inputFile = new Scanner(file); \n // reads first line of file for length of array\n int x = inputFile.nextInt();\n\n //Creates array \n int [] scores = new int[x]; \n\n for (int i=0; i<x; i++) {\n int value = inputFile.nextInt();\n scores[i] = value;\n }\n inputFile.close();\n in.close();\n return scores; \n }",
"private static String[] readFile(final String pathToFile) {\n try (BufferedReader reader = new BufferedReader(new FileReader(pathToFile))) {\n final List<String> lines = new ArrayList<>();\n String line;\n while ((line = reader.readLine()) != null) {\n line = line.trim();\n if (!line.startsWith(\"#\")) {\n lines.add(line);\n }\n }\n return lines.toArray(new String[lines.size()]);\n } catch (final IOException e) {\n throw new OpenGammaRuntimeException(\"Couldn't read properties file - \" + pathToFile, e);\n }\n }",
"private String[] readFile(InputStream stream) throws StorageException {\r\n try {\r\n return readFile(new BufferedReader(new InputStreamReader(stream)));\r\n } catch (Exception exception) {\r\n throw new StorageException(\"Cannot read file \");\r\n }\r\n }",
"@Override\n public ArrayList parseFile(String pathToFile) {\n\n Scanner scanner = null;\n try {\n scanner = new Scanner(new File(pathToFile));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n ArrayList<String> data = new ArrayList<>();\n while (scanner.hasNext()) {\n data.add(scanner.next());\n }\n scanner.close();\n\n return data;\n }",
"public ArrayList<String> readFile() {\n data = new ArrayList<>();\n String line = \"\";\n boolean EOF = false;\n\n try {\n do {\n line = input.readLine();\n if(line == null) {\n EOF = true;\n } else {\n data.add(line);\n }\n } while(!EOF);\n } catch(IOException io) {\n System.out.println(\"Error encountered.\");\n }\n return data;\n }",
"public ArrayList<String> fileRead(String fileName) {\n String line = null;\n ArrayList<String> list = new ArrayList<>();\n try {\n // FileReader reads text files in the default encoding.\n FileReader fileReader = new FileReader(fileName);\n\n // Always wrap FileReader in BufferedReader.\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n while ((line = bufferedReader.readLine()) != null) {\n list.add(line);\n }\n\n // Always close files.\n bufferedReader.close();\n } catch (FileNotFoundException ex) {\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n\n } catch (IOException ex) {\n System.out.println(\"Error reading file '\" + fileName + \"'\");\n }\n return list;\n }",
"static List<String> fileReader(String fileName){\n \n \n //Read a file and store the content in a string array.\n File f = new File(fileName);\n BufferedReader reader = null;\n String tempString = null;\n List<String> fileContent = new ArrayList<String>();\n //String[] fileContent = null;\n //int i = 0;\n \n try {\n reader = new BufferedReader(new FileReader(f));\n while ((tempString = reader.readLine()) != null){\n //while ((fileContent[i] = reader.readLine()) != null){\n fileContent.add(tempString);\n //i++;\n }\n reader.close();\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n finally{\n if (reader != null){\n try{\n reader.close();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }\n }\n \n return fileContent;\n \n }",
"public static byte[] readAll(String filename) {\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(filename);\n\t\t\treturn readAll(fis);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new WrappedException(e);\n\t\t}\n\t}",
"public String[] readFile() {\n\t\t\n\t\tFile file = null;\n\t\tString[] contenu = new String[2];\n\t\tMonFileChooser ouvrir = new MonFileChooser();\n\t\tint resultat = ouvrir.showOpenDialog(null);\n\t\tif (resultat == MonFileChooser.APPROVE_OPTION) {\n\t\t\tfile = ouvrir.getSelectedFile();\n\t\t\tcontenu[0]=file.getName();\n\t\t\n\t\t\n\t\t\ttry {\n\t\t\t\tString fileContent = null;\n\t\t\t\tcontenu[1] = \"\";\n\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(file)); \n\t\t\t\twhile((fileContent = br.readLine()) != null) {\n\t\t\t\t\tif (fileContent != null)\n\t\t\t\t\tcontenu[1] += fileContent+\"\\n\";\n\t\t\t}\n\t\t\t br.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\topenFiles.add(file);\n\t\t}\n\t\treturn contenu;\t\n\t}",
"private String[] readFile(String path) throws StorageException {\r\n try {\r\n return readFile(new BufferedReader(new FileReader(new File(path))));\r\n } catch (Exception exception) {\r\n throw new StorageException(\"Cannot read file \" + path + \":\" + exception.getMessage());\r\n }\r\n }",
"public byte[] getContents() throws VlException\n {\n long len = getLength();\n // 2 GB files cannot be read into memory !\n\n // zero size optimization ! \n\n if (len==0) \n {\n return new byte[0]; // empty buffer ! \n }\n\n if (len > ((long) VRS.MAX_CONTENTS_READ_SIZE))\n throw (new ResourceToBigException(\n \"Cannot read complete contents of a file greater then:\"\n + VRS.MAX_CONTENTS_READ_SIZE));\n\n int intLen = (int) len;\n return getContents(intLen);\n\n }",
"public ArrayList<String> parseFile(String fileName) throws IOException {\n\t\tthis.parrsedArray = new ArrayList<String>();\n\t\tFileInputStream inFile = null;\n\n\t\tinFile = new FileInputStream(mngr.getPath() + fileName);\n\t\tDataInputStream in = new DataInputStream(inFile);\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n\t\tString strLine;\n\n\t\twhile ((strLine = reader.readLine()) != null && strLine.length() > 0) {\n\t\t\t// Print the content on the console\n\t\t\tparrsedArray.add(strLine);\n\t\t}\n\n\t\tinFile.close();\n\n\t\treturn parrsedArray;\n\n\t}",
"public static int[] readMysteriousNumbers(String filename) throws Exception {\n File file = new File(filename);\n Scanner counter = new Scanner(file);\n int numLines = 0;\n while(counter.hasNextLine()){\n counter.nextLine();\n numLines++;\n }\n int[] arr = new int[numLines];\n\n\n\n Scanner reader = new Scanner(file);\n int index = 0;\n while(reader.hasNextLine()){\n arr[index] = Integer.parseInt(reader.nextLine());\n index++;\n }\n\n\n\n\n return arr;\n /*\n List<Integer> nums = new ArrayList<>();\n while (scanner.hasNextInt()) {\n nums.add(scanner.nextInt());\n }\n int[] ret = new int[nums.size()];\n for(int i = 0;i < ret.length;i++) {\n ret[i] = nums.get(i);\n }\n return ret*/\n }",
"public List<String> readFile() {\n \n try {\n ensureFileExists();\n return Files.readAllLines(filePath);\n } catch (FileNotFoundException ex) {\n return new ArrayList<>();\n } catch (IOException ex) {\n ex.printStackTrace();\n return new ArrayList<>();\n }\n }",
"private String[] readFile(String location) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(location));\n\t\t\tArrayList<String> document = new ArrayList<String>();\n\t\t\tString currLine;\n\n\t\t\t// continue to append until the end of file has been reached\n\t\t\twhile ((currLine = reader.readLine()) != null) {\n\t\t\t\t// avoiding empty strings\n\t\t\t\tif (!currLine.isEmpty())\n\t\t\t\t\tdocument.add(currLine);\n\t\t\t}\n\t\t\treader.close();\n\t\t\treturn document.toArray(new String[1]);\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// sadly neccessary default return case\n\t\treturn new String[0];\n\t}",
"public ArrayList<Integer> readFile(File file) {\n\t\tArrayList<Integer> fileData = new ArrayList<Integer>();\n\t\t// read the file\n\t\ttry {\n\t\t\tScanner sc = new Scanner(file);\n\t\t\twhile (sc.hasNextInt()) {\n\t\t\t\tfileData.add(sc.nextInt());\n\t\t\t}\n\t\t\tsc.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"An error occurred.\");\n\t\t e.printStackTrace();\n\t\t}\n\t\treturn fileData;\n\t}",
"public static String[] readAllLines() {\n ArrayList<String> lines = new ArrayList<String>();\n while (hasNextLine()) {\n lines.add(readLine());\n }\n return lines.toArray(new String[lines.size()]);\n }",
"public static List<String> readFile(String filepath) {\n BufferedReader reader = null;\n List<String> fileLines = new ArrayList<String>();\n try {\n File file = new File(filepath);\n String encoding = \"UTF8\";\n reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), encoding));\n \n String line = reader.readLine();\n while (line != null) {\n fileLines.add(line);\n line = reader.readLine();\n }\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n reader.close();\n } catch (IOException e) {\n // Ignore exception because reader was not initialized\n }\n }\n return fileLines;\n }",
"public static char[] readFileContents(File file, String encoding) throws CoreException {\r\n\t\tCheck.checkArg(file);\r\n\t\tFileInputStream fis;\r\n try {\r\n \tfis = new FileInputStream(file);\r\n \treturn readInputStreamContents(fis, encoding);\r\n } catch (IOException e) {\r\n throw new CoreException(createErrorStatus(e));\r\n }\r\n\t}",
"public static List<String> readFile(String fileName){\r\n \r\n List<String> lines = Collections.emptyList();\r\n\r\n try{\r\n lines = Files.readAllLines(Paths.get(fileName));\r\n }\r\n\r\n catch(IOException err){\r\n err.printStackTrace();\r\n }\r\n\r\n return lines;\r\n }",
"private List<String> readFile(String path) throws IOException {\n return Files.readAllLines (Paths.get (path), StandardCharsets.UTF_8);\n }",
"public int[] getData(String filename) throws IOException\n {\n\tScanner scanner = new Scanner(new File(filename)) ;\n\ttry {\n\t readData(scanner) ;\n\t return data ;\n\t}\n\tfinally {\n\t System.out.println(\"Finally closing the scanner.\") ;\n\t scanner.close() ;\n\t}\n }",
"private static byte[] m136428a(File file) throws IOException {\n FileInputStream fileInputStream = new FileInputStream(file);\n byte[] bArr = new byte[((int) file.length())];\n int i = 0;\n while (i < bArr.length) {\n int read = fileInputStream.read(bArr, i, bArr.length - i);\n if (read < 0) {\n break;\n }\n i += read;\n }\n if (i >= bArr.length) {\n fileInputStream.close();\n return bArr;\n }\n StringBuilder sb = new StringBuilder(\"Could not completely read file \");\n sb.append(file.getName());\n throw new IOException(sb.toString());\n }",
"public ArrayList<String> readFile(File file) {\n\t\tArrayList<String> al = new ArrayList<String>();\n\t\ttry {\n\t\t\tif (file.exists()) {\n\t\t\t\tFileReader fr = new FileReader(file);\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\t\tString line;\n\t\t\t\tbr.readLine();\n\t\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\t\tal.add(line);\n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t}\n\t\t\t\tbr.close();\n\t\t\t}\n\t\t} catch (IOException e) {\t\n\t\t\t}\n\t\treturn al;\n\t\t}",
"public static List read(String fileName) throws IOException {\n\tList data = new ArrayList() ;\n Scanner scanner = new Scanner(new FileInputStream(fileName));\n try {\n while (scanner.hasNextLine()){\n data.add(scanner.nextLine());\n }\n }\n finally{\n scanner.close();\n }\n return data;\n }",
"public List<String> readFileIntoList(String sourceFilepath) throws IOException {\n List<String> lines = new ArrayList<>();\n URL url = new URL(sourceFilepath);\n BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));\n String line = null;\n while ((line = reader.readLine()) != null) {\n lines.add(line);\n }\n reader.close();\n return lines;\n }",
"public int[] readBasicInfo() throws IOException\n\t{\n\t\t//Creates a FileReader and BufferedReader to read from the file that you pass it\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textReader = new BufferedReader(fr);\n\t\t\n\t\t//Creates a new array to read the first line of data to (is an array because need to convert to int list)\n\t\tString textData;\n\t\t\n\t\t//Reads the first line of the text file into the array\n\t\ttextData = textReader.readLine();\n\t\t\n\t\tint[] data = new int[5];\n\t\t//Create a holding variable that will help to convert the String list over to an int list\n\t\tString[] tempList = new String[6];\n\t\t//List of deliminations that will be parsed out of the read strings in the string list that the function is passed\n\t\tString delims = \"[,()]+\";\n\t\t//Splits the strings from the file by the parenthesis and the commas\n\t\ttempList = textData.split(delims);\n\t\tfor (int i = 1; i < tempList.length; i++)\n\t\t\tdata[i-1] = Integer.parseInt(tempList[i]);\n\t\t\n\t\t//Returns the array containing the first line of the text file\n\t\treturn data;\n\t}",
"static String[] copy(Scanner file, int lines){\t\t\n\t\tString[] array = new String[lines];\n\t\tfor(int i = 0; file.hasNextLine(); i++){\n\t\t array[i] = file.nextLine();\n\t\t}\n\t\treturn array;\n\t}",
"public static List<String> readIn(String filename) throws Exception {\r\n Path filePath = new File(filename).toPath();\r\n Charset charset = Charset.defaultCharset(); \r\n List<String> stringList = Files.readAllLines(filePath, charset);\r\n\r\n return stringList;\r\n }",
"private ArrayList<Integer> fileReader() {\n ArrayList<Integer> data = new ArrayList<>();\n try {\n Scanner scanner = new Scanner(new File(\"andmed.txt\"));\n while (scanner.hasNextLine()) {\n data.add(Integer.valueOf(scanner.nextLine()));\n }\n scanner.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return data;\n }",
"@SuppressWarnings(\"resource\")\n \tpublic String[] readTextFileOutputLinesArray(String fileName) throws IOException{\n \t BufferedReader in = new BufferedReader(new FileReader(Common.testOutputFileDir + fileName));\n \t String str=null;\n \t ArrayList<String> lines = new ArrayList<String>();\n \t while ((str = in.readLine()) != null) {\n \t if (!str.contains(\"helper\") && (str.length() != 0)) { lines.add(str); }\n \t }\n \t String[] linesArray = lines.toArray(new String[lines.size()]);\n \t return linesArray;\n \t}",
"public static PVector[] readFromFile(String filename) {\n ArrayList<PVector> ledPositionsList= new ArrayList<PVector> ();\n //try to read data from file\n try {\n File file = new File(filename);\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()) {\n String line = scanner.nextLine();\n String[] pieces = line.split(\"\\t\");\n if (pieces.length>3) {\n ledPositionsList.add(new PVector( (Float.parseFloat(pieces[1])/4.0f), Float.parseFloat(pieces[2])/4.0f, Float.parseFloat(pieces[3])/4.0f)); //initialize Leds x,y,z,r,g,b\n }\n }\n scanner.close();\n } \n catch (FileNotFoundException ex) {\n ex.printStackTrace();\n }\n //convert to vanilla Java Array\n PVector[] ledPositions= new PVector[ledPositionsList.size()];\n for (int i=0; i<ledPositionsList.size(); i++) {\n ledPositions[i]=ledPositionsList.get(i);\n }\n return ledPositions;\n }",
"public void readFile(String filePath) {\n\n\t\tFile file = new File(filePath);\n\t\t\n\t\ttry {\n\t\t\tScanner sc = new Scanner(file);\n \t while(sc.hasNextLine() ) {\t\t \t \n\t\t \t String line = sc.nextLine();\t\t \t \n\t\t \t linesArray.add( line.split(\",\") );\t\n\t\t \t \n\t\t\t}\n\t\t \t\t \n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\t\n\t\n\t}",
"private static List<String> readFile(File file) throws IOException {\n return Files.readAllLines(file.toPath());\n }",
"private static List<String> readFile(File file) throws IOException {\n return Files.readAllLines(file.toPath());\n }",
"private static ArrayList<String> readFile() throws ApplicationException {\r\n\r\n ArrayList<String> bookList = new ArrayList<>();\r\n\r\n File sourceFile = new File(FILE_TO_READ);\r\n try (BufferedReader input = new BufferedReader(new FileReader(sourceFile))) {\r\n\r\n if (sourceFile.exists()) {\r\n LOG.debug(\"Reading book data\");\r\n String oneLine = input.readLine();\r\n\r\n while ((oneLine = input.readLine()) != null) {\r\n\r\n bookList.add(oneLine);\r\n\r\n }\r\n input.close();\r\n } else {\r\n throw new ApplicationException(\"File \" + FILE_TO_READ + \" does not exsit\");\r\n }\r\n } catch (IOException e) {\r\n LOG.error(e.getStackTrace());\r\n }\r\n\r\n return bookList;\r\n\r\n }",
"public static char[] getFileContents(File file) {\n // char array to store the file contents in\n char[] contents = null;\n try {\n BufferedReader br = new BufferedReader(new FileReader(file));\n StringBuffer sb = new StringBuffer();\n String line = \"\";\n while ((line = br.readLine()) != null) {\n // append the content and the lost new line.\n sb.append(line + \"\\n\");\n }\n contents = new char[sb.length()];\n sb.getChars(0, sb.length() - 1, contents, 0);\n\n assert (contents.length > 0);\n } catch (IOException e) {\n System.out.println(e.getMessage());\n }\n\n return contents;\n }",
"public static ArrayList<String> Readfile(String fileName) {\n\t\t\t\t\t// This will reference one line at a time\n\t\t\t\t\tArrayList<String> doc = new ArrayList<String>();\n\t\t\t\t\tString line = null;\n\t\t\t\t\tString fileNamehere = fileName;\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// FileReader reads text files in the default encoding.\n\t\t\t\t\t\tFileReader fileReader = new FileReader(fileName);\n\n\t\t\t\t\t\t// Always wrap FileReader in BufferedReader.\n\t\t\t\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\n\t\t\t\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\t\t\t\tdoc.add(line);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Always close files.\n\t\t\t\t\t\tbufferedReader.close();\n\t\t\t\t\t} catch (FileNotFoundException ex) {\n\t\t\t\t\t\tSystem.out.println(\"file not found '\" + fileName + \"'\");\n\t\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\t\tex.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\treturn doc;\n\t}",
"public static ArrayList<String> parseSequenceFile(String filePath) {\n\t\tArrayList<String> sequence = new ArrayList<String>();\n\t\tFile file = new File(filePath);\n\t\tScanner scanner;\n\n\t\ttry {\n\t\t\tscanner = new Scanner(file);\n\n\t\t\twhile (scanner.hasNextLine()) {\n\t\t\t\tsequence.add(scanner.nextLine());\n\t\t\t}\n\n\t\t\tscanner.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found. Program aborted.\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\n\t\treturn sequence;\n\t}",
"public ClickerCounterModel[] readObjectFromFile() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\ttry {\n\t\t\tFileInputStream inputStream = openFileInput(filename);\n\t\t\tInputStreamReader isr = new InputStreamReader(inputStream);\n\t\t\tBufferedReader bufferedReader = new BufferedReader(isr);\n\t\t\tString line;\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\tsb.append(line);\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// use Gson to convert it into and object\n\t\tString json = sb.toString();\n\t\tGson gson = new Gson();\n\t\tClickerCounterModel[] object = gson.fromJson(json,\n\t\t\t\tClickerCounterModel[].class);\n\t\treturn object;\n\t}",
"public byte[] readByteArrayFromFile(String fileName)\r\n\tthrows FileNotFoundException, IOException {\r\n\t\tFileInputStream theSourceInputStream = new FileInputStream(fileName);\r\n\t\tByteArrayOutputStream theSourceOutputStream = new ByteArrayOutputStream(\r\n\t\t\t\tBUFFER_SIZE);\r\n\t\tcopyStreamContent(theSourceInputStream, theSourceOutputStream);\r\n\t\tbyte[] theResult = theSourceOutputStream.toByteArray();\r\n\t\ttheSourceInputStream.close();\r\n\t\ttheSourceOutputStream.close();\r\n\t\treturn theResult;\r\n\t}",
"public String[] ReadAllFileLines(String sFilePath) throws Exception {\n File f = null;\n FileInputStream fstream = null;\n DataInputStream in = null;\n BufferedReader br = null;\n String strLine = \"\";\n String[] stemp = null;\n StringBuffer strbuff = new StringBuffer();\n try {\n //getting file oject\n f = new File(sFilePath);\n if (f.exists()) {\n //get object for fileinputstream\n fstream = new FileInputStream(f);\n // Get the object of DataInputStream\n in = new DataInputStream(fstream);\n //get object for bufferreader\n br = new BufferedReader(new InputStreamReader(in, \"UTF-8\"));\n //Read File Line By Line\n while ((strLine = br.readLine()) != null) {\n strbuff.append(strLine + \"##NL##\");\n }\n\n stemp = strbuff.toString().split(\"##NL##\");\n } else {\n throw new Exception(\"File Not Found!!\");\n }\n\n return stemp;\n } catch (Exception e) {\n throw new Exception(\"ReadAllFileLines : \" + e.toString());\n } finally {\n //Close the input stream\n try {\n br.close();\n } catch (Exception e) {\n }\n try {\n fstream.close();\n } catch (Exception e) {\n }\n try {\n in.close();\n } catch (Exception e) {\n }\n }\n }",
"public static List<String> readFileAsList(String filePath) {\n\n\t\tBufferedReader readFile = null;\n\t\tString line = null;\n\t\tList<String> fileContents = new ArrayList<String>();\n\t\ttry {\n\t\t\treadFile = new BufferedReader((new FileReader(filePath)));\n\t\t\twhile ((line = readFile.readLine()) != null)\n\t\t\t\tfileContents.add(line);\n\t\t\treadFile.close();\n\t\t\treturn fileContents;\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Unable to find file: \" + filePath);\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Unable to read file: \" + filePath);\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn fileContents;\n\t}",
"private static String[] readFile(String path) throws FileNotFoundException{\n\t\tjava.io.File file = new java.io.File(path);\n\t\tjava.util.Scanner sc = new java.util.Scanner(file); \n\t\tStringBuilder content = new StringBuilder();\n\t\twhile (sc.hasNextLine()) {\n\t\t String line = sc.nextLine();\n\t\t if (!line.startsWith(\"!--\")){\n\t\t \tline = line.trim();\n\t\t \tString[] lineContent = line.split(\"/\");\n\t\t \tfor (String entry : lineContent){\n\t\t \t\tcontent.append(entry);\n\t\t \t\tcontent.append(\"/\");\n\t\t \t}\n\t\t \tcontent.append(\"!\");\n\t\t }\n\t\t}\n\t\tsc.close();\n\t\treturn content.toString().split(\"!\");\n\t}",
"private String[] loadFile(String filename) {\n\t\treturn loadFile(filename, new String[0], System.lineSeparator());\n\t}",
"public static byte[] readBytesFromFile(File f) {\r\n byte[] bytes = null;\r\n try {\r\n int filesize = (int) f.length();\r\n bytes = new byte[filesize];\r\n DataInputStream in = new DataInputStream(new FileInputStream(f));\r\n in.readFully(bytes);\r\n in.close();\r\n } catch (Exception e) {\r\n System.out.println(\"Error reading byte[] from file: \"\r\n + e.getMessage());\r\n return null;\r\n }\r\n return bytes;\r\n }",
"private List<String> readFile(String fileName)\n {\n try\n {\n String file = new String(Files.readAllBytes(Paths.get(fileName)), Charset.forName(\"ISO-8859-1\"));\n file = file\n .toLowerCase()\n .replaceAll(\"[^\\\\w]+\", \" \")\n .replaceAll(\"[0-9]\", \"\");\n Tokenizer tokenizer = SimpleTokenizer.INSTANCE;\n String[] tokens = tokenizer.tokenize(file);\n return Arrays.asList(tokens);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return new ArrayList<>();\n }",
"public static String[] DataCollection(String a) throws FileNotFoundException {\n\tFile file = new File(a); \n \tScanner sc = new Scanner(file); \n \n // Counter variable to count the number of entries in text file\n\tint counter = 0;\n\n\t\n \n\tString[] data = new String[2976];\n // While loop to take in data from text file \n\twhile(sc.hasNextLine())\n\t{\n\t\n\tsc.useDelimiter(\"\\\\Z\"); \n\t\n\t// Inserting data in each line to array\n\tdata[counter] = sc.nextLine();\n\tcounter = counter + 1;\n\t\n\t}\n\treturn data;\n \t}",
"public static ArrayList<String> readFile(String fileName) {\n\t\tArrayList<String> al = new ArrayList<String>();\n\t\ttry {\n\t\t\tFile myObj = new File(fileName);\n\t\t\tScanner myReader = new Scanner(myObj);\n\t\t\twhile (myReader.hasNextLine()) {\n\t\t\t\tString data = myReader.nextLine();\n\t\t\t\tal.add(data);\n\t\t\t}\n\t\t\tmyReader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tif (e.toString().contains(\"No such file or directory\")) {\n\t\t\t\tal.add(\"no file found\");\n\t\t\t\treturn al;\n\t\t\t}\n\t\t}\n\t\treturn al;\n\t}",
"public Vector<String> read(String path) throws FileNotFoundException, IOException {\n file = new File(path);\n fread = new FileReader(file);\n buf = new BufferedReader(fread);\n\n String temp;\n Vector<String> working = new Vector<String>();\n\n while (true) {\n temp = buf.readLine();\n\n if (temp == null) {\n break;\n } else {\n working.add(temp);\n }\n }\n\n return working;\n }",
"public byte[] readFile(RAFFileEntry fileEntry) throws IOException {\n\t\tarchiveFile.setPosition(fileEntry.getDataOffset());\n\t\tif (fileEntry.getDataSize() > 0xFFFFFFFFL) throw new IOException(\"File too big.\");\n\t\tbyte[] data = archiveFile.readBytes((int) fileEntry.getDataSize());\n\t\treturn data;\n\t}",
"public static void readArray(String fileName, int[] newArray) throws Exception{\n\n // Create DataInputStream object to read from binary file.\n // Use fileName from demo file and read into newArray in demo file.\n DataInputStream input = new DataInputStream(new FileInputStream(fileName));\n\n // Create boolean variable to determine End Of File\n boolean EOF = false;\n\n // While it's not the End Of File\n while(!EOF){\n\n // Try Catch Statement\n try{\n\n // for Loop to go through each integer in the binary file\n for(int i = 0; i < newArray.length; i++){\n\n // read the number and place it in the newArray\n newArray[i] = input.readInt();\n }\n }catch(EOFException e){ // Catch clause to find end of file\n // Change EOF to True\n EOF = true;\n }\n\n }\n // Close the file\n input.close();\n }",
"public String readFileContents(String filename) {\n return null;\n\n }",
"public ArrayList<String> readFromFile(String fileName) throws IOException {\n\t\tBufferedReader reader = new BufferedReader(new FileReader(fileName));\n\t ArrayList<String> retour = new ArrayList<String>();\n\t String line = null;\n\t while((line = reader.readLine()) != null) \n\t \tretour.add(line);\n\t \n\t reader.close();\n\t return retour; \n\t}",
"private byte[] readSampleData(String filePath) {\n File sampleFile = new File(filePath);\n byte[] buffer = new byte[(int) sampleFile.length()];\n FileInputStream fis = null;\n try {\n fis = new FileInputStream(sampleFile);\n readFill(fis, buffer);\n } catch (IOException e) {\n throw new RuntimeException(e);\n } finally {\n try {\n fis.close();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return buffer;\n }",
"public String[] readAllLines(){\n\t\tArrayList<String> lines=new ArrayList<>();\n\t\twhile (hasNestLine())\n\t\t\tlines.add(readLine());\n\t\treturn lines.toArray(new String[lines.size()]);\n\t}",
"public ArrayList<Integer> readNumbersFromFile() throws FileNotFoundException {\r\n ArrayList<Integer> arrayList = new ArrayList<>();\r\n File file = new File(readFilename);\r\n Scanner scanner = new Scanner(file);\r\n while(scanner.hasNextInt())\r\n {\r\n arrayList.add(scanner.nextInt());\r\n }\r\n return arrayList;\r\n }",
"private List<String> readFile() throws FileNotFoundException {\t\n\t\tList<String> itemsLines = new ArrayList<>();\n\t\tFile inputFile = new File(filePath);\t\n\t\ttry (Scanner newScanner = new Scanner(inputFile)) {\n\t\t\twhile(newScanner.hasNextLine()) {\n\t\t\t\titemsLines.add(newScanner.nextLine());\n\t\t\t}\t\n\t\t}\n\t\treturn itemsLines;\n\t}",
"public ArrayList<BigInteger> read(String fileName) {\n String line = null; // current line from text file\n String[] numbers = null;\n try {\n BufferedReader lineReader = new BufferedReader\n ( (fileName == null || fileName.length() <= 0 || fileName.equals(\"-\"))\n ? new InputStreamReader(System.in)\n : new FileReader(fileName)\n );\n while ((line = lineReader.readLine()) != null) { // read and process lines\n if (! line.matches(\"\\\\s*#.*\") && ! line.matches(\"\\\\s*\")) { // no comment line, no empty line\n numbers = line.trim().split(\"\\\\s+\");\n int last = numbers.length - 1;\n /*\n try {\n int index = Integer.parseInt(numbers[0]);\n } catch (Exception exc) {\n }\n */\n sequence.add(new BigInteger(numbers[last]));\n } else {\n // ignore comment line\n }\n } // while ! eof\n lineReader.close();\n } catch (Exception exc) {\n log.error(exc.getMessage(), exc);\n } // try\n return sequence;\n }",
"public static String[] getLines (final String pFilename) throws FileNotFoundException {\n\t\tFile file = new File (pFilename); \n\t\tScanner scanner = new Scanner (file); \n\t\t\n\t\tArrayList<String> lines = new ArrayList<String> (); \n\t\twhile (scanner.hasNextLine()) {\n\t\t\tString line = scanner.nextLine(); \n\t\t\tif (!line.isEmpty())\n\t\t\t\tlines.add(line); \n\t\t}\n\t\tscanner.close(); \n\t\t\n\t\treturn lines.toArray(new String [0]); \n\t}",
"public static byte[] getBytesFromFile(File file) throws IOException {\r\n\r\n InputStream is = new FileInputStream(file);\r\n\r\n // Get the size of the file\r\n long length = file.length();\r\n\r\n /*\r\n * You cannot create an array using a long type. It needs to be an int\r\n * type. Before converting to an int type, check to ensure that file is\r\n * not loarger than Integer.MAX_VALUE;\r\n */\r\n if (length > Integer.MAX_VALUE) {\r\n System.out.println(\"File is too large to process\");\r\n return null;\r\n }\r\n\r\n // Create the byte array to hold the data\r\n byte[] bytes = new byte[(int) length];\r\n\r\n // Read in the bytes\r\n int offset = 0;\r\n int numRead = 0;\r\n while ((offset < bytes.length) &&\r\n ((numRead = is.read(bytes, offset, bytes.length - offset)) >= 0)) {\r\n\r\n offset += numRead;\r\n\r\n }\r\n\r\n // Ensure all the bytes have been read in\r\n if (offset < bytes.length) {\r\n throw new IOException(\"Could not completely read file \" + file.getName());\r\n }\r\n\r\n is.close();\r\n return bytes;\r\n\r\n }",
"public List<String> readFileIntoList(String filepath) throws IOException;",
"public String[] readFromFile(Path destination) throws IOException {\n\t\ttry (BufferedReader buffer = Files.newBufferedReader(destination)) {\n\t\t\treturn (buffer.lines().collect(Collectors.joining(\"\\n\"))).split(\",\");\n\t\t}\n\t}",
"private ArrayList loadfile(String file_path) throws Exception{\n\t\tFileInputStream fis = null;\n\t\tBufferedReader br = null;\n\t\tArrayList filedata = new ArrayList();\n\t\ttry {\n\t\t\tFile file = new File(file_path);\n\t\t\tfis = new FileInputStream(file);\n\t\t\tbr = new BufferedReader(new InputStreamReader(fis, charset));\n\t\t\tint i = 0;\n\t\t\twhile (br.ready()) {\n\t\t\t\tString line_data = br.readLine();\n\t\t\t\tif (line_data == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tnode_line_data nd = new node_line_data(line_data, i++);\n\t\t\t\tfiledata.add(nd);\n\t\t\t}\n\t\t\treturn filedata;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (br != null)\n\t\t\t\t\tbr.close();\n\t\t\t\tif (fis != null)\n\t\t\t\t\tfis.close();\n\t\t\t}\n\t\t\tcatch (IOException ex) {\n\t\t\t}\n\t\t}\n\t}",
"private ArrayList<String> readReturnFileContents(String fileName){\n String startingDir = System.getProperty(\"user.dir\");\n BufferedReader reader = null;\n String line = \"\";\n ArrayList<String> wholeFile = new ArrayList<String>();\n try {\n reader = new BufferedReader(new FileReader(startingDir + \"/\" + fileName));\n while ((line = reader.readLine()) != null) {\n wholeFile.add(line);\n }\n } catch (FileNotFoundException fnfe) {\n System.out.println(fnfe.getMessage());\n System.exit(1);\n } catch (NullPointerException npe) {\n System.out.println(npe.getMessage());\n System.exit(1);\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n System.exit(1);\n }\n return wholeFile;\n }",
"public Student[] constructArray(String fileName)throws IOException{\n \n Student[] ans = new Student[10];\n Scanner Sc = new Scanner(new File(fileName));\n Sc.useDelimiter(\"\\t|\\n\");\n this.amount = 0;\n while(Sc.hasNext()){\n if(this.amount == ans.length){\n ans = doubler(ans);\n }\n String ID = Sc.next();\n String SName = Sc.next();\n String Email = Sc.next();\n String SClass = Sc.next();\n String major = Sc.next();\n ans[this.amount] = new Student(ID, SName, Email, SClass, major);\n amount++;\n }\n return ans;\n }",
"public static Integer[] readInputArrayFromFile(Integer[] array, String fileName) {\n\n\t\tList<Integer> ints = readInputArrayFromFile(fileName);\n\n\t\tarray = new Integer[ints.size()];\n\t\tfor (int i = 0; i < ints.size(); i++) {\n\t\t\tarray[i] = ints.get(i);\n\t\t}\n\t\treturn array;\n\t}",
"public static ArrayList<String> readLines(String fileName){\n\t\treturn read(fileName, false);\n\t}",
"private Point[] readTestFile(String filename) {\n In in = new In(filename);\n int N = in.readInt();\n Point[] points = new Point[N];\n for (int i = 0; i < N; i++) {\n int x = in.readInt();\n int y = in.readInt();\n points[i] = new Point(x, y);\n }\n return points;\n }",
"public static byte[] getBytesFromFile(File file) throws IOException {\n\t\tlong length = file.length();\r\n\r\n\t\t// You cannot create an array using a long type.\r\n\t\t// It needs to be an int type.\r\n\t\t// Before converting to an int type, check\r\n\t\t// to ensure that file is not larger than Integer.MAX_VALUE.\r\n\t\tif (length > Integer.MAX_VALUE) {\r\n\t\t\t// File is too large\r\n\t\t\tthrow new IOException(\"File is too large!\");\r\n\t\t}\r\n\r\n\t\t// Create the byte array to hold the data\r\n\t\tbyte[] bytes = new byte[(int)length];\r\n\r\n\t\t// Read in the bytes\r\n\t\tint offset = 0;\r\n\t\tint numRead = 0;\r\n\r\n\t\tInputStream is = new FileInputStream(file);\r\n\t\ttry {\r\n\t\t\twhile (offset < bytes.length\r\n\t\t\t\t\t&& (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {\r\n\t\t\t\toffset += numRead;\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tis.close();\r\n\t\t}\r\n\r\n\t\t// Ensure all the bytes have been read in\r\n\t\tif (offset < bytes.length) {\r\n\t\t\tthrow new IOException(\"Could not completely read file \"+file.getName());\r\n\t\t}\r\n\t\treturn bytes;\r\n\t}",
"TraceList read(File file) throws IOException;",
"public static int[][] read(String fileName) throws FileNotFoundException {\r\n int i = -1;\r\n int j;\r\n\r\n int row = 1;\r\n int col = 0;\r\n\r\n Scanner read = new Scanner(new File(\".\\\\data\\\\mountain.paths\\\\\" + fileName));\r\n StringTokenizer st = new StringTokenizer(read.nextLine());\r\n\r\n while (st.hasMoreTokens()) {\r\n st.nextToken();\r\n col++;\r\n }\r\n\r\n while (read.hasNextLine()) {\r\n read.nextLine();\r\n row++;\r\n }\r\n\r\n read = new Scanner(new File(\".\\\\data\\\\mountain.paths\\\\\" + fileName));\r\n int[][] data = new int[row][col];\r\n\r\n while (read.hasNextLine()) {\r\n j = -1;\r\n i++;\r\n st = new StringTokenizer(read.nextLine());\r\n while (st.hasMoreTokens()) {\r\n j++;\r\n data[i][j] = Integer.parseInt(st.nextToken());\r\n }\r\n }\r\n return data;\r\n }",
"public static byte[] readFileAsByteArray(String path) throws IOException {\n return internalReadFileAsByteArray(path).array();\n }",
"public void readIn(String file) {\r\n\r\n\t\ttry {\r\n\r\n\t\t\t/** Initialise loop variable **/\r\n\r\n\t\t\tusedSize = 0;\r\n\r\n\t\t\t/** Set up file for reading **/\r\n\r\n\t\t\tFileReader reader = new FileReader(file);\r\n\r\n\t\t\tScanner in = new Scanner(reader);\r\n\r\n\t\t\t/** Loop round reading in data while array not full **/\r\n\r\n\t\t\twhile (in.hasNextInt() && (usedSize < size)) {\r\n\r\n\t\t\t\tA[usedSize] = in.nextInt();\r\n\r\n\t\t\t\tusedSize++;\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\tSystem.out.println(\"Error processing file \" + file);\r\n\r\n\t\t}\r\n\r\n\t}",
"private static List<String[]> readInput(String filePath) {\n List<String[]> result = new ArrayList<>();\n int numOfObject = 0;\n\n try {\n Scanner sc = new Scanner(new File(filePath));\n sc.useDelimiter(\"\");\n if (sc.hasNext()) {\n numOfObject = Integer.parseInt(sc.nextLine());\n }\n for (int i=0;i<numOfObject;i++) {\n if (sc.hasNext()) {\n String s = sc.nextLine();\n if (s.trim().isEmpty()) {\n continue;\n }\n result.add(s.split(\" \"));\n }\n }\n sc.close();\n }\n catch (FileNotFoundException e) {\n System.out.println(\"FileNotFoundException\");\n }\n return result;\n }",
"public static byte[] readBytes(String file) throws IOException\n {\n try(InputStream in = getInputStream(file))\n {\n byte[] buffer = new byte[512];\n int size = 0;\n int read;\n while((read = in.read(buffer, size, buffer.length - size)) > 0)\n {\n size += read;\n if(size == buffer.length)\n buffer = Arrays.copyOf(buffer, size * 2);\n }\n\n if(size < buffer.length)\n buffer = Arrays.copyOf(buffer, size);\n\n return buffer;\n }\n }",
"private ArrayList<String> readEntriesFromFile(String nameOfFile){\n\t\tArrayList<String> foundEntries = new ArrayList<String>();\n\t\t\n\t\ttry{\n\t\t\tFile file = new File(nameOfFile); \n\t\t\tScanner fileIn = new Scanner(file);\n\t\t\twhile (fileIn.hasNext()){\n\t\t\t\tString currentLine = fileIn.nextLine();\n\t\t\t\tfoundEntries.add(currentLine);\n\t\t\t} \n\t\t\tfileIn.close();\n\t\t}catch (IOException e){\n\t\t}\n\t\t\n\t\tif(foundEntries.size()==0){\n\t\t return null;\n\t\t}else{\n\t\t\treturn foundEntries;\n\t\t}\n\t}",
"public static int[] buildArray() throws IOException {\r\n\r\n //Variable initializations\r\n int[] intArray = {};\r\n int sumOfElements = 0;\r\n int index = 0;\r\n \r\n //Initialization of File and Scanner objects\r\n \r\n File sumOfIntegers = new File(fileInput);\r\n Scanner elementScanner = new Scanner(sumOfIntegers);\r\n\r\n //Loop that increases the num of array elements by 1 every time\r\n //it acknowledges an integer value within the file and subtracts\r\n //1 from the array elements when the sentinel value is reached.\r\n while (elementScanner.hasNextInt()) {\r\n sumOfElements++;\r\n \r\n \r\n //Assign next int scanner method to x variable\r\n //Used to process if boolean condition\r\n int x = elementScanner.nextInt();\r\n\r\n //When -999 sentinel value is reached reduce num of array elements\r\n //by 1 since we do not want it included\r\n if (x == -999) {\r\n sumOfElements = sumOfElements - 1;\r\n intArray = new int[sumOfElements];\r\n }\r\n //Assign sumOfElements as num of array elements\r\n intArray = new int[sumOfElements]; \r\n\r\n }\r\n\r\n //new scanner to reset abstract cursor of file\r\n elementScanner = new Scanner(sumOfIntegers);\r\n for (index = 0; index < sumOfElements; index++) {\r\n int x = elementScanner.nextInt();\r\n\r\n if (x != -999) {\r\n intArray[index] = x;\r\n }\r\n\r\n }\r\n\r\n //Closes the file/scanner\r\n elementScanner.close();\r\n\r\n return intArray;\r\n }",
"public static byte[] convertir(File file) {\n\t\tbyte[] a = new byte[(int) file.length()];\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(file);\n\t\t\tfis.read(a);\n\t\t\tfis.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn a;\n\t}",
"private List<String[]> extract(String file) {\n List<String[]> readIn = null;\n try {\n // instantiate file reader object\n FileReader fr = new FileReader(file);\n\n // instantiate csv reader object\n CSVReader csvReader = new CSVReaderBuilder(fr).build();\n readIn = csvReader.readAll();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return readIn;\n }"
] |
[
"0.74047863",
"0.7369295",
"0.72883135",
"0.70018905",
"0.69533265",
"0.69512033",
"0.69347936",
"0.68420434",
"0.6802301",
"0.6759347",
"0.6720819",
"0.6711178",
"0.67026526",
"0.66596144",
"0.66292953",
"0.65451634",
"0.6534951",
"0.65045553",
"0.6494749",
"0.6493054",
"0.6458796",
"0.6456255",
"0.644357",
"0.6418644",
"0.6403949",
"0.6402045",
"0.63889",
"0.6383837",
"0.6382561",
"0.63752896",
"0.6357808",
"0.6350534",
"0.63502073",
"0.6343167",
"0.6342441",
"0.6302596",
"0.6298904",
"0.62972236",
"0.62929696",
"0.62783945",
"0.6277934",
"0.6277264",
"0.6271374",
"0.6248771",
"0.62433505",
"0.62420475",
"0.62372303",
"0.6237038",
"0.6229518",
"0.6211877",
"0.62028855",
"0.6197885",
"0.6196424",
"0.61908627",
"0.61852515",
"0.61852515",
"0.61845857",
"0.61661345",
"0.6162821",
"0.6159411",
"0.6154098",
"0.61437416",
"0.61356556",
"0.6134213",
"0.6118116",
"0.60880136",
"0.6073264",
"0.6065389",
"0.6059573",
"0.6049034",
"0.6048545",
"0.6015795",
"0.6013423",
"0.6012294",
"0.60057795",
"0.5999745",
"0.5995248",
"0.5992451",
"0.59905756",
"0.59856546",
"0.5983082",
"0.59825116",
"0.5966033",
"0.5958907",
"0.5956145",
"0.59547085",
"0.595424",
"0.59306693",
"0.5928977",
"0.59288543",
"0.5915382",
"0.5915055",
"0.59105873",
"0.59101784",
"0.5904598",
"0.5896405",
"0.586817",
"0.5867981",
"0.5865106",
"0.5846711",
"0.5845678"
] |
0.0
|
-1
|
Read contents of a file into an array
|
public static char[] readReaderContents(Reader reader) throws CoreException {
Check.checkArg(reader);
try {
char[] buf = new char[1024];
StringBuffer sb = new StringBuffer();
int len;
while ((len = reader.read(buf)) > 0) {
sb.append(buf, 0, len);
}
reader.close();
return sb.toString().toCharArray();
} catch (UnsupportedEncodingException e) {
throw new CoreException(createErrorStatus(e));
} catch (IOException e) {
throw new CoreException(createErrorStatus(e));
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String[] read()\n {\n ArrayList<String> input = new ArrayList<String>();\n try\n {\n dir = new File(contextRef.getFilesDir(), filename);\n if (dir.exists())\n {\n Scanner contacts = new Scanner(dir);\n while (contacts.hasNextLine())\n {\n input.add(contacts.nextLine());\n }\n contacts.close();\n }\n }catch (Exception ex)\n {\n //debug(\"read file contents failure\");\n debug = \"test read failure\";\n }\n return input.toArray(new String[1]);\n }",
"String[] readFile(File file) {\n ArrayList<String> list = new ArrayList<>();\n String[] output = null;\n Scanner reader = null;\n try {\n if (file.isFile()) {\n reader = new Scanner(file);\n while (reader.hasNextLine()) {\n list.add(reader.nextLine());\n }\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found exception\");\n }\n output = new String[list.size()];\n for (int i = 0; i < list.size(); i++) output[i] = list.get(i);\n reader.close();\n return output;\n }",
"String[] readFile(String path) {\n ArrayList<String> list = new ArrayList<>();\n String[] output = null;\n Scanner reader;\n File file;\n\n try {\n file = new File(path);\n reader = new Scanner(file);\n while (reader.hasNextLine()) {\n list.add(reader.nextLine());\n }\n output = new String[list.size()];\n for (int i = 0; i < list.size(); i++) output[i] = list.get(i);\n reader.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found exception\");\n }\n return output;\n }",
"public String[] getFile() throws IOException {\n\t\n\t\n\ttry {\n\tFileReader reader = new FileReader(path);\n\tBufferedReader textReader = new BufferedReader(reader); // creates buffered file reader again\n\t\n\tint numberOfLines = getLines(); // calls the method above to know how many lines there are\n\tString[ ] textData = new String[numberOfLines]; //creates an array the size of the amount of lines the file has\n\t\n\tfor (int i=0; i < numberOfLines; i++) {\n\t\ttextData[ i ] = textReader.readLine(); // go through file and read each line into its own array space\n\t\t}\n\t\n\ttextReader.close( ); //reader is done\n\treturn textData; // return array\n\t} catch (IOException e) {\n\t\tString[] exceptionString = new String[1];\n\t\texceptionString[0] = \"nothing\";\n\t\treturn exceptionString;\n\t}\n}",
"private static String[] readFile(String file){\n\t\ttry{\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(file));\n\t\t\tString line;\n\t\t\tString data = \"\";\n\t\t\twhile((line = in.readLine()) != null){\n\t\t\t\tdata = data + '\\n' + line;\t\t\t}\n\t\t\tin.close();\n\t\t\tString[] data_array = data.split(\"\\\\n\");\n\t\t\treturn data_array;\n\t\t}\n\t\tcatch(IOException e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\tString[] shouldNeverReturn = new String[1];\n\t\treturn shouldNeverReturn;\n\t}",
"protected String[] readInFile(String filename) {\n Vector<String> fileContents = new Vector<String>();\n try {\n InputStream gtestResultStream1 = getClass().getResourceAsStream(File.separator +\n TEST_TYPE_DIR + File.separator + filename);\n BufferedReader reader = new BufferedReader(new InputStreamReader(gtestResultStream1));\n String line = null;\n while ((line = reader.readLine()) != null) {\n fileContents.add(line);\n }\n }\n catch (NullPointerException e) {\n CLog.e(\"Gest output file does not exist: \" + filename);\n }\n catch (IOException e) {\n CLog.e(\"Unable to read contents of gtest output file: \" + filename);\n }\n return fileContents.toArray(new String[fileContents.size()]);\n }",
"private String[] readFile(BufferedReader reader) throws IOException {\r\n // Read each line in the file, add it to the ArrayList lines\r\n ArrayList<String> lines = new ArrayList<String>();\r\n String line;\r\n while ((line = reader.readLine()) != null) {\r\n lines.add(line);\r\n }\r\n reader.close();\r\n // Convert the list to an array of type String and return\r\n String[] ret = new String[1];\r\n return (lines.toArray(ret));\r\n }",
"private static String[] readLines(InputStream f) throws IOException {\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(f, \"US-ASCII\"));\n\t\tArrayList<String> lines = new ArrayList<String>();\n\t\tString line;\n\t\twhile ((line = r.readLine()) != null)\n\t\t\tlines.add(line);\n\t\treturn lines.toArray(new String[0]);\n\t}",
"private static int[] readData(int size, String filename) throws FileNotFoundException {\n\t\tint[] input = new int[size];\t\n\t\tScanner scanner = new Scanner(new File(filename));\n \n int i = 0;\n while (scanner.hasNext() && i < size)\n {\n \tinput[i] = Integer.parseInt(scanner.next());\n \ti++;\n }\n scanner.close();\n\t return input;\n\t}",
"private Object[] fetchTextFile(String filePathString){\n try (Stream<String> stream = Files.lines(Paths.get(filePathString))) {\n return stream.toArray();\n }\n catch (IOException ioe){\n System.out.println(\"Could not find file at \" + filePathString);\n return null;\n }\n\n }",
"public String[] readLines() {\n\t\tVector linesVector = new Vector(); ;\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader b = new BufferedReader(fr);\n\t\t\tboolean eof = false;\n\t\t\twhile (!eof) {\n\t\t\t\tString line = b.readLine();\n\t\t\t\tif (line == null) {\n\t\t\t\t\teof = true;\n\t\t\t\t} else {\n\t\t\t\t\tlinesVector.add(line);\n\t\t\t\t}\n\t\t\t}\n\t\t\tb.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"File \" + file.getName() +\n\t\t\t\t\" is unreadable : \" + e.toString());\n\t\t}\n\t\tString[] lines = new String[linesVector.size()];\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tlines[i] = (String) (linesVector.get(i));\n\t\t}\n\t\treturn lines;\n\t}",
"public List<String> readFileContents(String filePath) throws APIException;",
"List readFile(String pathToFile);",
"public String[] openFile() throws IOException\n\t{\n\t\t//Creates a FileReader and BufferedReader to read from the file that you pass it\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textReader = new BufferedReader(fr);\n\t\t\n\t\t//Set the variable to the number of lines in the text file through the function in this class that is defined below\n\t\tnumberOfLines = readLines();\n\t\t//Creates an array of strings with size of how many lines of data there are in the file\n\t\tString[] textData = new String[numberOfLines];\n\t\t\n\t\t//Loop to read the lines from the text file for the song data\n\t\tfor (int i = 0; i < numberOfLines; i++)\n\t\t{\n\t\t\t//Read data from song file and into the string list\n\t\t\ttextData[i] = textReader.readLine();\n\t\t}\n\t\t\n\t\t//Close the BufferedReader that was opened\n\t\ttextReader.close();\n\t\t\n\t\t//Return the read data from the text file in the form of a string array\n\t\treturn textData;\n\t}",
"static byte[] readContents(File file) {\n if (!file.isFile()) {\n throw new IllegalArgumentException(\"must be a normal file\");\n }\n try {\n return Files.readAllBytes(file.toPath());\n } catch (IOException excp) {\n throw new IllegalArgumentException(excp.getMessage());\n }\n }",
"public static String[] readFile(String fn) {\n\n try {\n\n FileReader fr = new FileReader(fn); // read the file\n // store contents in a buffer\n BufferedReader bfr = new BufferedReader(fr);\n // an string array list for storing each line of content\n ArrayList<String> content = new ArrayList<String>();\n String p = null; // temper string for passing each line of contents\n while ((p = bfr.readLine()) != null) {\n content.add(p);\n }\n\n // String array for storing content\n String[] context = new String[content.size()];\n\n for (int i = 0; i < content.size(); i++) {\n context[i] = content.get(i);\n }\n\n bfr.close(); // close the buffer\n return context;\n\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found: \" + e.getMessage());\n System.exit(0);\n } catch (IOException e) {\n // TODO Auto-generated catch block\n System.out.println(\"I/O Ooops: \" + e.getMessage());\n System.exit(0);\n }\n\n // If an exception occurred we will get to here as the return statement\n // above was not executed\n // so setup a paragraphs array to return which contains the empty string\n String[] context = new String[1];\n context[0] = \"\";\n return context;\n\n }",
"@SuppressWarnings(\"resource\")\n \tpublic String[] readTextFileOutputLinesArray(String path, String fileName) throws IOException{\n \t BufferedReader in = new BufferedReader(new FileReader(path + File.separator + fileName));\n \t String str=null;\n \t ArrayList<String> lines = new ArrayList<String>();\n \t while ((str = in.readLine()) != null) {\n \t if (!str.contains(\"helper\") && (str.length() != 0)) { lines.add(str); }\n \t }\n \t String[] linesArray = lines.toArray(new String[lines.size()]);\n \t return linesArray;\n \t}",
"private void readFileToArray(FileInputStream fis, Warship[] wsArr) throws Exception {\n\t\tScanner scanner = null;\n\t\ttry {\n\t\t\tscanner = new Scanner(fis);\n\t\t\tint i = 0;\n\t\t\twhile (scanner.hasNextLine()) {\n\t\t\t\twsArr[i] = this.getWarship(scanner.nextLine());\n\t\t\t\ti++;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t} finally {\n\t\t\tif (scanner != null) {\n\t\t\t\tscanner.close();\n\t\t\t}\n\t\t}\n\t}",
"public static String[] getLines(String filename)\n throws IOException {\n\n\n try (\n FileInputStream inStream = new FileInputStream(filename);\n InputStreamReader reader = new InputStreamReader(inStream);\n BufferedReader buffer = new BufferedReader(reader)\n ) {\n List<String> lines = new LinkedList<>();\n for (String line = buffer.readLine();\n line != null;\n line = buffer.readLine()) {\n line = line.trim();\n if (!line.isEmpty()) {\n lines.add(line);\n }\n }\n return lines.toArray(new String[0]);\n }\n }",
"public static String[] readFile() throws FileNotFoundException {\r\n\t\tScanner scan = new Scanner(new File(\"H:/My Documents/Eclipse/wordlist.txt\"));\r\n\t\tArrayList<String> a = new ArrayList<String>();\r\n\t\twhile (scan.hasNextLine()) {\r\n\t\t\ta.add(scan.nextLine());\r\n\t\t}\r\n\t\tString[] w = new String[a.size()];\r\n\t\tfor (int i = 0; i < a.size(); i++) {\r\n\t\t\tw[i] = a.get(i);\r\n\t\t}\r\n\t\tscan.close();\r\n\t\treturn w;\r\n\t}",
"private static void readFileIntoArray (String inputFileName) {\n Path path = Paths.get(inputFileName);\n array = new int[countLines(inputFileName)];\n try {\n Scanner sc = new Scanner(path);\n int i = 0;\n while (sc.hasNextLine()) {\n array[i] = Integer.parseInt(sc.nextLine());\n i++;\n }\n sc.close();\n //sort the array\n MergeSort.mergeSort(array);\n }\n catch(FileNotFoundException e) {\n System.out.println(\"File Error\");\n e.printStackTrace();\n }\n catch(IOException e) {\n System.out.println(\"File Error\");\n e.printStackTrace();\n }\n }",
"static int [] readFile() throws IOException {\n\n // Scanner used to get name of file from user\n Scanner in = new Scanner(System.in);\n System.out.println(\"Please enter the name of your file: \");\n String name = in.nextLine();\n\n File file = new File(name); \n \n // Scanner used to read file\n Scanner inputFile = new Scanner(file); \n // reads first line of file for length of array\n int x = inputFile.nextInt();\n\n //Creates array \n int [] scores = new int[x]; \n\n for (int i=0; i<x; i++) {\n int value = inputFile.nextInt();\n scores[i] = value;\n }\n inputFile.close();\n in.close();\n return scores; \n }",
"private static String[] readFile(final String pathToFile) {\n try (BufferedReader reader = new BufferedReader(new FileReader(pathToFile))) {\n final List<String> lines = new ArrayList<>();\n String line;\n while ((line = reader.readLine()) != null) {\n line = line.trim();\n if (!line.startsWith(\"#\")) {\n lines.add(line);\n }\n }\n return lines.toArray(new String[lines.size()]);\n } catch (final IOException e) {\n throw new OpenGammaRuntimeException(\"Couldn't read properties file - \" + pathToFile, e);\n }\n }",
"private String[] readFile(InputStream stream) throws StorageException {\r\n try {\r\n return readFile(new BufferedReader(new InputStreamReader(stream)));\r\n } catch (Exception exception) {\r\n throw new StorageException(\"Cannot read file \");\r\n }\r\n }",
"@Override\n public ArrayList parseFile(String pathToFile) {\n\n Scanner scanner = null;\n try {\n scanner = new Scanner(new File(pathToFile));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n ArrayList<String> data = new ArrayList<>();\n while (scanner.hasNext()) {\n data.add(scanner.next());\n }\n scanner.close();\n\n return data;\n }",
"public ArrayList<String> readFile() {\n data = new ArrayList<>();\n String line = \"\";\n boolean EOF = false;\n\n try {\n do {\n line = input.readLine();\n if(line == null) {\n EOF = true;\n } else {\n data.add(line);\n }\n } while(!EOF);\n } catch(IOException io) {\n System.out.println(\"Error encountered.\");\n }\n return data;\n }",
"public ArrayList<String> fileRead(String fileName) {\n String line = null;\n ArrayList<String> list = new ArrayList<>();\n try {\n // FileReader reads text files in the default encoding.\n FileReader fileReader = new FileReader(fileName);\n\n // Always wrap FileReader in BufferedReader.\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n while ((line = bufferedReader.readLine()) != null) {\n list.add(line);\n }\n\n // Always close files.\n bufferedReader.close();\n } catch (FileNotFoundException ex) {\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n\n } catch (IOException ex) {\n System.out.println(\"Error reading file '\" + fileName + \"'\");\n }\n return list;\n }",
"static List<String> fileReader(String fileName){\n \n \n //Read a file and store the content in a string array.\n File f = new File(fileName);\n BufferedReader reader = null;\n String tempString = null;\n List<String> fileContent = new ArrayList<String>();\n //String[] fileContent = null;\n //int i = 0;\n \n try {\n reader = new BufferedReader(new FileReader(f));\n while ((tempString = reader.readLine()) != null){\n //while ((fileContent[i] = reader.readLine()) != null){\n fileContent.add(tempString);\n //i++;\n }\n reader.close();\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n finally{\n if (reader != null){\n try{\n reader.close();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }\n }\n \n return fileContent;\n \n }",
"public static byte[] readAll(String filename) {\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(filename);\n\t\t\treturn readAll(fis);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new WrappedException(e);\n\t\t}\n\t}",
"public String[] readFile() {\n\t\t\n\t\tFile file = null;\n\t\tString[] contenu = new String[2];\n\t\tMonFileChooser ouvrir = new MonFileChooser();\n\t\tint resultat = ouvrir.showOpenDialog(null);\n\t\tif (resultat == MonFileChooser.APPROVE_OPTION) {\n\t\t\tfile = ouvrir.getSelectedFile();\n\t\t\tcontenu[0]=file.getName();\n\t\t\n\t\t\n\t\t\ttry {\n\t\t\t\tString fileContent = null;\n\t\t\t\tcontenu[1] = \"\";\n\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(file)); \n\t\t\t\twhile((fileContent = br.readLine()) != null) {\n\t\t\t\t\tif (fileContent != null)\n\t\t\t\t\tcontenu[1] += fileContent+\"\\n\";\n\t\t\t}\n\t\t\t br.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\topenFiles.add(file);\n\t\t}\n\t\treturn contenu;\t\n\t}",
"private String[] readFile(String path) throws StorageException {\r\n try {\r\n return readFile(new BufferedReader(new FileReader(new File(path))));\r\n } catch (Exception exception) {\r\n throw new StorageException(\"Cannot read file \" + path + \":\" + exception.getMessage());\r\n }\r\n }",
"public byte[] getContents() throws VlException\n {\n long len = getLength();\n // 2 GB files cannot be read into memory !\n\n // zero size optimization ! \n\n if (len==0) \n {\n return new byte[0]; // empty buffer ! \n }\n\n if (len > ((long) VRS.MAX_CONTENTS_READ_SIZE))\n throw (new ResourceToBigException(\n \"Cannot read complete contents of a file greater then:\"\n + VRS.MAX_CONTENTS_READ_SIZE));\n\n int intLen = (int) len;\n return getContents(intLen);\n\n }",
"public ArrayList<String> parseFile(String fileName) throws IOException {\n\t\tthis.parrsedArray = new ArrayList<String>();\n\t\tFileInputStream inFile = null;\n\n\t\tinFile = new FileInputStream(mngr.getPath() + fileName);\n\t\tDataInputStream in = new DataInputStream(inFile);\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n\t\tString strLine;\n\n\t\twhile ((strLine = reader.readLine()) != null && strLine.length() > 0) {\n\t\t\t// Print the content on the console\n\t\t\tparrsedArray.add(strLine);\n\t\t}\n\n\t\tinFile.close();\n\n\t\treturn parrsedArray;\n\n\t}",
"public static int[] readMysteriousNumbers(String filename) throws Exception {\n File file = new File(filename);\n Scanner counter = new Scanner(file);\n int numLines = 0;\n while(counter.hasNextLine()){\n counter.nextLine();\n numLines++;\n }\n int[] arr = new int[numLines];\n\n\n\n Scanner reader = new Scanner(file);\n int index = 0;\n while(reader.hasNextLine()){\n arr[index] = Integer.parseInt(reader.nextLine());\n index++;\n }\n\n\n\n\n return arr;\n /*\n List<Integer> nums = new ArrayList<>();\n while (scanner.hasNextInt()) {\n nums.add(scanner.nextInt());\n }\n int[] ret = new int[nums.size()];\n for(int i = 0;i < ret.length;i++) {\n ret[i] = nums.get(i);\n }\n return ret*/\n }",
"public List<String> readFile() {\n \n try {\n ensureFileExists();\n return Files.readAllLines(filePath);\n } catch (FileNotFoundException ex) {\n return new ArrayList<>();\n } catch (IOException ex) {\n ex.printStackTrace();\n return new ArrayList<>();\n }\n }",
"private String[] readFile(String location) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(location));\n\t\t\tArrayList<String> document = new ArrayList<String>();\n\t\t\tString currLine;\n\n\t\t\t// continue to append until the end of file has been reached\n\t\t\twhile ((currLine = reader.readLine()) != null) {\n\t\t\t\t// avoiding empty strings\n\t\t\t\tif (!currLine.isEmpty())\n\t\t\t\t\tdocument.add(currLine);\n\t\t\t}\n\t\t\treader.close();\n\t\t\treturn document.toArray(new String[1]);\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// sadly neccessary default return case\n\t\treturn new String[0];\n\t}",
"public ArrayList<Integer> readFile(File file) {\n\t\tArrayList<Integer> fileData = new ArrayList<Integer>();\n\t\t// read the file\n\t\ttry {\n\t\t\tScanner sc = new Scanner(file);\n\t\t\twhile (sc.hasNextInt()) {\n\t\t\t\tfileData.add(sc.nextInt());\n\t\t\t}\n\t\t\tsc.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"An error occurred.\");\n\t\t e.printStackTrace();\n\t\t}\n\t\treturn fileData;\n\t}",
"public static String[] readAllLines() {\n ArrayList<String> lines = new ArrayList<String>();\n while (hasNextLine()) {\n lines.add(readLine());\n }\n return lines.toArray(new String[lines.size()]);\n }",
"public static List<String> readFile(String filepath) {\n BufferedReader reader = null;\n List<String> fileLines = new ArrayList<String>();\n try {\n File file = new File(filepath);\n String encoding = \"UTF8\";\n reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), encoding));\n \n String line = reader.readLine();\n while (line != null) {\n fileLines.add(line);\n line = reader.readLine();\n }\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n reader.close();\n } catch (IOException e) {\n // Ignore exception because reader was not initialized\n }\n }\n return fileLines;\n }",
"public static char[] readFileContents(File file, String encoding) throws CoreException {\r\n\t\tCheck.checkArg(file);\r\n\t\tFileInputStream fis;\r\n try {\r\n \tfis = new FileInputStream(file);\r\n \treturn readInputStreamContents(fis, encoding);\r\n } catch (IOException e) {\r\n throw new CoreException(createErrorStatus(e));\r\n }\r\n\t}",
"public static List<String> readFile(String fileName){\r\n \r\n List<String> lines = Collections.emptyList();\r\n\r\n try{\r\n lines = Files.readAllLines(Paths.get(fileName));\r\n }\r\n\r\n catch(IOException err){\r\n err.printStackTrace();\r\n }\r\n\r\n return lines;\r\n }",
"private List<String> readFile(String path) throws IOException {\n return Files.readAllLines (Paths.get (path), StandardCharsets.UTF_8);\n }",
"public int[] getData(String filename) throws IOException\n {\n\tScanner scanner = new Scanner(new File(filename)) ;\n\ttry {\n\t readData(scanner) ;\n\t return data ;\n\t}\n\tfinally {\n\t System.out.println(\"Finally closing the scanner.\") ;\n\t scanner.close() ;\n\t}\n }",
"private static byte[] m136428a(File file) throws IOException {\n FileInputStream fileInputStream = new FileInputStream(file);\n byte[] bArr = new byte[((int) file.length())];\n int i = 0;\n while (i < bArr.length) {\n int read = fileInputStream.read(bArr, i, bArr.length - i);\n if (read < 0) {\n break;\n }\n i += read;\n }\n if (i >= bArr.length) {\n fileInputStream.close();\n return bArr;\n }\n StringBuilder sb = new StringBuilder(\"Could not completely read file \");\n sb.append(file.getName());\n throw new IOException(sb.toString());\n }",
"public ArrayList<String> readFile(File file) {\n\t\tArrayList<String> al = new ArrayList<String>();\n\t\ttry {\n\t\t\tif (file.exists()) {\n\t\t\t\tFileReader fr = new FileReader(file);\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\t\tString line;\n\t\t\t\tbr.readLine();\n\t\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\t\tal.add(line);\n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t}\n\t\t\t\tbr.close();\n\t\t\t}\n\t\t} catch (IOException e) {\t\n\t\t\t}\n\t\treturn al;\n\t\t}",
"public static List read(String fileName) throws IOException {\n\tList data = new ArrayList() ;\n Scanner scanner = new Scanner(new FileInputStream(fileName));\n try {\n while (scanner.hasNextLine()){\n data.add(scanner.nextLine());\n }\n }\n finally{\n scanner.close();\n }\n return data;\n }",
"public List<String> readFileIntoList(String sourceFilepath) throws IOException {\n List<String> lines = new ArrayList<>();\n URL url = new URL(sourceFilepath);\n BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));\n String line = null;\n while ((line = reader.readLine()) != null) {\n lines.add(line);\n }\n reader.close();\n return lines;\n }",
"public int[] readBasicInfo() throws IOException\n\t{\n\t\t//Creates a FileReader and BufferedReader to read from the file that you pass it\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textReader = new BufferedReader(fr);\n\t\t\n\t\t//Creates a new array to read the first line of data to (is an array because need to convert to int list)\n\t\tString textData;\n\t\t\n\t\t//Reads the first line of the text file into the array\n\t\ttextData = textReader.readLine();\n\t\t\n\t\tint[] data = new int[5];\n\t\t//Create a holding variable that will help to convert the String list over to an int list\n\t\tString[] tempList = new String[6];\n\t\t//List of deliminations that will be parsed out of the read strings in the string list that the function is passed\n\t\tString delims = \"[,()]+\";\n\t\t//Splits the strings from the file by the parenthesis and the commas\n\t\ttempList = textData.split(delims);\n\t\tfor (int i = 1; i < tempList.length; i++)\n\t\t\tdata[i-1] = Integer.parseInt(tempList[i]);\n\t\t\n\t\t//Returns the array containing the first line of the text file\n\t\treturn data;\n\t}",
"static String[] copy(Scanner file, int lines){\t\t\n\t\tString[] array = new String[lines];\n\t\tfor(int i = 0; file.hasNextLine(); i++){\n\t\t array[i] = file.nextLine();\n\t\t}\n\t\treturn array;\n\t}",
"public static List<String> readIn(String filename) throws Exception {\r\n Path filePath = new File(filename).toPath();\r\n Charset charset = Charset.defaultCharset(); \r\n List<String> stringList = Files.readAllLines(filePath, charset);\r\n\r\n return stringList;\r\n }",
"private ArrayList<Integer> fileReader() {\n ArrayList<Integer> data = new ArrayList<>();\n try {\n Scanner scanner = new Scanner(new File(\"andmed.txt\"));\n while (scanner.hasNextLine()) {\n data.add(Integer.valueOf(scanner.nextLine()));\n }\n scanner.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return data;\n }",
"@SuppressWarnings(\"resource\")\n \tpublic String[] readTextFileOutputLinesArray(String fileName) throws IOException{\n \t BufferedReader in = new BufferedReader(new FileReader(Common.testOutputFileDir + fileName));\n \t String str=null;\n \t ArrayList<String> lines = new ArrayList<String>();\n \t while ((str = in.readLine()) != null) {\n \t if (!str.contains(\"helper\") && (str.length() != 0)) { lines.add(str); }\n \t }\n \t String[] linesArray = lines.toArray(new String[lines.size()]);\n \t return linesArray;\n \t}",
"public static PVector[] readFromFile(String filename) {\n ArrayList<PVector> ledPositionsList= new ArrayList<PVector> ();\n //try to read data from file\n try {\n File file = new File(filename);\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()) {\n String line = scanner.nextLine();\n String[] pieces = line.split(\"\\t\");\n if (pieces.length>3) {\n ledPositionsList.add(new PVector( (Float.parseFloat(pieces[1])/4.0f), Float.parseFloat(pieces[2])/4.0f, Float.parseFloat(pieces[3])/4.0f)); //initialize Leds x,y,z,r,g,b\n }\n }\n scanner.close();\n } \n catch (FileNotFoundException ex) {\n ex.printStackTrace();\n }\n //convert to vanilla Java Array\n PVector[] ledPositions= new PVector[ledPositionsList.size()];\n for (int i=0; i<ledPositionsList.size(); i++) {\n ledPositions[i]=ledPositionsList.get(i);\n }\n return ledPositions;\n }",
"public void readFile(String filePath) {\n\n\t\tFile file = new File(filePath);\n\t\t\n\t\ttry {\n\t\t\tScanner sc = new Scanner(file);\n \t while(sc.hasNextLine() ) {\t\t \t \n\t\t \t String line = sc.nextLine();\t\t \t \n\t\t \t linesArray.add( line.split(\",\") );\t\n\t\t \t \n\t\t\t}\n\t\t \t\t \n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\t\n\t\n\t}",
"private static List<String> readFile(File file) throws IOException {\n return Files.readAllLines(file.toPath());\n }",
"private static List<String> readFile(File file) throws IOException {\n return Files.readAllLines(file.toPath());\n }",
"private static ArrayList<String> readFile() throws ApplicationException {\r\n\r\n ArrayList<String> bookList = new ArrayList<>();\r\n\r\n File sourceFile = new File(FILE_TO_READ);\r\n try (BufferedReader input = new BufferedReader(new FileReader(sourceFile))) {\r\n\r\n if (sourceFile.exists()) {\r\n LOG.debug(\"Reading book data\");\r\n String oneLine = input.readLine();\r\n\r\n while ((oneLine = input.readLine()) != null) {\r\n\r\n bookList.add(oneLine);\r\n\r\n }\r\n input.close();\r\n } else {\r\n throw new ApplicationException(\"File \" + FILE_TO_READ + \" does not exsit\");\r\n }\r\n } catch (IOException e) {\r\n LOG.error(e.getStackTrace());\r\n }\r\n\r\n return bookList;\r\n\r\n }",
"public static char[] getFileContents(File file) {\n // char array to store the file contents in\n char[] contents = null;\n try {\n BufferedReader br = new BufferedReader(new FileReader(file));\n StringBuffer sb = new StringBuffer();\n String line = \"\";\n while ((line = br.readLine()) != null) {\n // append the content and the lost new line.\n sb.append(line + \"\\n\");\n }\n contents = new char[sb.length()];\n sb.getChars(0, sb.length() - 1, contents, 0);\n\n assert (contents.length > 0);\n } catch (IOException e) {\n System.out.println(e.getMessage());\n }\n\n return contents;\n }",
"public static ArrayList<String> Readfile(String fileName) {\n\t\t\t\t\t// This will reference one line at a time\n\t\t\t\t\tArrayList<String> doc = new ArrayList<String>();\n\t\t\t\t\tString line = null;\n\t\t\t\t\tString fileNamehere = fileName;\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// FileReader reads text files in the default encoding.\n\t\t\t\t\t\tFileReader fileReader = new FileReader(fileName);\n\n\t\t\t\t\t\t// Always wrap FileReader in BufferedReader.\n\t\t\t\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\n\t\t\t\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\t\t\t\tdoc.add(line);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Always close files.\n\t\t\t\t\t\tbufferedReader.close();\n\t\t\t\t\t} catch (FileNotFoundException ex) {\n\t\t\t\t\t\tSystem.out.println(\"file not found '\" + fileName + \"'\");\n\t\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\t\tex.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\treturn doc;\n\t}",
"public static ArrayList<String> parseSequenceFile(String filePath) {\n\t\tArrayList<String> sequence = new ArrayList<String>();\n\t\tFile file = new File(filePath);\n\t\tScanner scanner;\n\n\t\ttry {\n\t\t\tscanner = new Scanner(file);\n\n\t\t\twhile (scanner.hasNextLine()) {\n\t\t\t\tsequence.add(scanner.nextLine());\n\t\t\t}\n\n\t\t\tscanner.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found. Program aborted.\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\n\t\treturn sequence;\n\t}",
"public ClickerCounterModel[] readObjectFromFile() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\ttry {\n\t\t\tFileInputStream inputStream = openFileInput(filename);\n\t\t\tInputStreamReader isr = new InputStreamReader(inputStream);\n\t\t\tBufferedReader bufferedReader = new BufferedReader(isr);\n\t\t\tString line;\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\tsb.append(line);\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// use Gson to convert it into and object\n\t\tString json = sb.toString();\n\t\tGson gson = new Gson();\n\t\tClickerCounterModel[] object = gson.fromJson(json,\n\t\t\t\tClickerCounterModel[].class);\n\t\treturn object;\n\t}",
"public byte[] readByteArrayFromFile(String fileName)\r\n\tthrows FileNotFoundException, IOException {\r\n\t\tFileInputStream theSourceInputStream = new FileInputStream(fileName);\r\n\t\tByteArrayOutputStream theSourceOutputStream = new ByteArrayOutputStream(\r\n\t\t\t\tBUFFER_SIZE);\r\n\t\tcopyStreamContent(theSourceInputStream, theSourceOutputStream);\r\n\t\tbyte[] theResult = theSourceOutputStream.toByteArray();\r\n\t\ttheSourceInputStream.close();\r\n\t\ttheSourceOutputStream.close();\r\n\t\treturn theResult;\r\n\t}",
"public String[] ReadAllFileLines(String sFilePath) throws Exception {\n File f = null;\n FileInputStream fstream = null;\n DataInputStream in = null;\n BufferedReader br = null;\n String strLine = \"\";\n String[] stemp = null;\n StringBuffer strbuff = new StringBuffer();\n try {\n //getting file oject\n f = new File(sFilePath);\n if (f.exists()) {\n //get object for fileinputstream\n fstream = new FileInputStream(f);\n // Get the object of DataInputStream\n in = new DataInputStream(fstream);\n //get object for bufferreader\n br = new BufferedReader(new InputStreamReader(in, \"UTF-8\"));\n //Read File Line By Line\n while ((strLine = br.readLine()) != null) {\n strbuff.append(strLine + \"##NL##\");\n }\n\n stemp = strbuff.toString().split(\"##NL##\");\n } else {\n throw new Exception(\"File Not Found!!\");\n }\n\n return stemp;\n } catch (Exception e) {\n throw new Exception(\"ReadAllFileLines : \" + e.toString());\n } finally {\n //Close the input stream\n try {\n br.close();\n } catch (Exception e) {\n }\n try {\n fstream.close();\n } catch (Exception e) {\n }\n try {\n in.close();\n } catch (Exception e) {\n }\n }\n }",
"public static List<String> readFileAsList(String filePath) {\n\n\t\tBufferedReader readFile = null;\n\t\tString line = null;\n\t\tList<String> fileContents = new ArrayList<String>();\n\t\ttry {\n\t\t\treadFile = new BufferedReader((new FileReader(filePath)));\n\t\t\twhile ((line = readFile.readLine()) != null)\n\t\t\t\tfileContents.add(line);\n\t\t\treadFile.close();\n\t\t\treturn fileContents;\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Unable to find file: \" + filePath);\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Unable to read file: \" + filePath);\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn fileContents;\n\t}",
"private static String[] readFile(String path) throws FileNotFoundException{\n\t\tjava.io.File file = new java.io.File(path);\n\t\tjava.util.Scanner sc = new java.util.Scanner(file); \n\t\tStringBuilder content = new StringBuilder();\n\t\twhile (sc.hasNextLine()) {\n\t\t String line = sc.nextLine();\n\t\t if (!line.startsWith(\"!--\")){\n\t\t \tline = line.trim();\n\t\t \tString[] lineContent = line.split(\"/\");\n\t\t \tfor (String entry : lineContent){\n\t\t \t\tcontent.append(entry);\n\t\t \t\tcontent.append(\"/\");\n\t\t \t}\n\t\t \tcontent.append(\"!\");\n\t\t }\n\t\t}\n\t\tsc.close();\n\t\treturn content.toString().split(\"!\");\n\t}",
"private String[] loadFile(String filename) {\n\t\treturn loadFile(filename, new String[0], System.lineSeparator());\n\t}",
"public static byte[] readBytesFromFile(File f) {\r\n byte[] bytes = null;\r\n try {\r\n int filesize = (int) f.length();\r\n bytes = new byte[filesize];\r\n DataInputStream in = new DataInputStream(new FileInputStream(f));\r\n in.readFully(bytes);\r\n in.close();\r\n } catch (Exception e) {\r\n System.out.println(\"Error reading byte[] from file: \"\r\n + e.getMessage());\r\n return null;\r\n }\r\n return bytes;\r\n }",
"private List<String> readFile(String fileName)\n {\n try\n {\n String file = new String(Files.readAllBytes(Paths.get(fileName)), Charset.forName(\"ISO-8859-1\"));\n file = file\n .toLowerCase()\n .replaceAll(\"[^\\\\w]+\", \" \")\n .replaceAll(\"[0-9]\", \"\");\n Tokenizer tokenizer = SimpleTokenizer.INSTANCE;\n String[] tokens = tokenizer.tokenize(file);\n return Arrays.asList(tokens);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return new ArrayList<>();\n }",
"public static String[] DataCollection(String a) throws FileNotFoundException {\n\tFile file = new File(a); \n \tScanner sc = new Scanner(file); \n \n // Counter variable to count the number of entries in text file\n\tint counter = 0;\n\n\t\n \n\tString[] data = new String[2976];\n // While loop to take in data from text file \n\twhile(sc.hasNextLine())\n\t{\n\t\n\tsc.useDelimiter(\"\\\\Z\"); \n\t\n\t// Inserting data in each line to array\n\tdata[counter] = sc.nextLine();\n\tcounter = counter + 1;\n\t\n\t}\n\treturn data;\n \t}",
"public static ArrayList<String> readFile(String fileName) {\n\t\tArrayList<String> al = new ArrayList<String>();\n\t\ttry {\n\t\t\tFile myObj = new File(fileName);\n\t\t\tScanner myReader = new Scanner(myObj);\n\t\t\twhile (myReader.hasNextLine()) {\n\t\t\t\tString data = myReader.nextLine();\n\t\t\t\tal.add(data);\n\t\t\t}\n\t\t\tmyReader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tif (e.toString().contains(\"No such file or directory\")) {\n\t\t\t\tal.add(\"no file found\");\n\t\t\t\treturn al;\n\t\t\t}\n\t\t}\n\t\treturn al;\n\t}",
"public Vector<String> read(String path) throws FileNotFoundException, IOException {\n file = new File(path);\n fread = new FileReader(file);\n buf = new BufferedReader(fread);\n\n String temp;\n Vector<String> working = new Vector<String>();\n\n while (true) {\n temp = buf.readLine();\n\n if (temp == null) {\n break;\n } else {\n working.add(temp);\n }\n }\n\n return working;\n }",
"public byte[] readFile(RAFFileEntry fileEntry) throws IOException {\n\t\tarchiveFile.setPosition(fileEntry.getDataOffset());\n\t\tif (fileEntry.getDataSize() > 0xFFFFFFFFL) throw new IOException(\"File too big.\");\n\t\tbyte[] data = archiveFile.readBytes((int) fileEntry.getDataSize());\n\t\treturn data;\n\t}",
"public static void readArray(String fileName, int[] newArray) throws Exception{\n\n // Create DataInputStream object to read from binary file.\n // Use fileName from demo file and read into newArray in demo file.\n DataInputStream input = new DataInputStream(new FileInputStream(fileName));\n\n // Create boolean variable to determine End Of File\n boolean EOF = false;\n\n // While it's not the End Of File\n while(!EOF){\n\n // Try Catch Statement\n try{\n\n // for Loop to go through each integer in the binary file\n for(int i = 0; i < newArray.length; i++){\n\n // read the number and place it in the newArray\n newArray[i] = input.readInt();\n }\n }catch(EOFException e){ // Catch clause to find end of file\n // Change EOF to True\n EOF = true;\n }\n\n }\n // Close the file\n input.close();\n }",
"public String readFileContents(String filename) {\n return null;\n\n }",
"public ArrayList<String> readFromFile(String fileName) throws IOException {\n\t\tBufferedReader reader = new BufferedReader(new FileReader(fileName));\n\t ArrayList<String> retour = new ArrayList<String>();\n\t String line = null;\n\t while((line = reader.readLine()) != null) \n\t \tretour.add(line);\n\t \n\t reader.close();\n\t return retour; \n\t}",
"private byte[] readSampleData(String filePath) {\n File sampleFile = new File(filePath);\n byte[] buffer = new byte[(int) sampleFile.length()];\n FileInputStream fis = null;\n try {\n fis = new FileInputStream(sampleFile);\n readFill(fis, buffer);\n } catch (IOException e) {\n throw new RuntimeException(e);\n } finally {\n try {\n fis.close();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return buffer;\n }",
"public String[] readAllLines(){\n\t\tArrayList<String> lines=new ArrayList<>();\n\t\twhile (hasNestLine())\n\t\t\tlines.add(readLine());\n\t\treturn lines.toArray(new String[lines.size()]);\n\t}",
"public ArrayList<Integer> readNumbersFromFile() throws FileNotFoundException {\r\n ArrayList<Integer> arrayList = new ArrayList<>();\r\n File file = new File(readFilename);\r\n Scanner scanner = new Scanner(file);\r\n while(scanner.hasNextInt())\r\n {\r\n arrayList.add(scanner.nextInt());\r\n }\r\n return arrayList;\r\n }",
"private List<String> readFile() throws FileNotFoundException {\t\n\t\tList<String> itemsLines = new ArrayList<>();\n\t\tFile inputFile = new File(filePath);\t\n\t\ttry (Scanner newScanner = new Scanner(inputFile)) {\n\t\t\twhile(newScanner.hasNextLine()) {\n\t\t\t\titemsLines.add(newScanner.nextLine());\n\t\t\t}\t\n\t\t}\n\t\treturn itemsLines;\n\t}",
"public ArrayList<BigInteger> read(String fileName) {\n String line = null; // current line from text file\n String[] numbers = null;\n try {\n BufferedReader lineReader = new BufferedReader\n ( (fileName == null || fileName.length() <= 0 || fileName.equals(\"-\"))\n ? new InputStreamReader(System.in)\n : new FileReader(fileName)\n );\n while ((line = lineReader.readLine()) != null) { // read and process lines\n if (! line.matches(\"\\\\s*#.*\") && ! line.matches(\"\\\\s*\")) { // no comment line, no empty line\n numbers = line.trim().split(\"\\\\s+\");\n int last = numbers.length - 1;\n /*\n try {\n int index = Integer.parseInt(numbers[0]);\n } catch (Exception exc) {\n }\n */\n sequence.add(new BigInteger(numbers[last]));\n } else {\n // ignore comment line\n }\n } // while ! eof\n lineReader.close();\n } catch (Exception exc) {\n log.error(exc.getMessage(), exc);\n } // try\n return sequence;\n }",
"public static String[] getLines (final String pFilename) throws FileNotFoundException {\n\t\tFile file = new File (pFilename); \n\t\tScanner scanner = new Scanner (file); \n\t\t\n\t\tArrayList<String> lines = new ArrayList<String> (); \n\t\twhile (scanner.hasNextLine()) {\n\t\t\tString line = scanner.nextLine(); \n\t\t\tif (!line.isEmpty())\n\t\t\t\tlines.add(line); \n\t\t}\n\t\tscanner.close(); \n\t\t\n\t\treturn lines.toArray(new String [0]); \n\t}",
"public static byte[] getBytesFromFile(File file) throws IOException {\r\n\r\n InputStream is = new FileInputStream(file);\r\n\r\n // Get the size of the file\r\n long length = file.length();\r\n\r\n /*\r\n * You cannot create an array using a long type. It needs to be an int\r\n * type. Before converting to an int type, check to ensure that file is\r\n * not loarger than Integer.MAX_VALUE;\r\n */\r\n if (length > Integer.MAX_VALUE) {\r\n System.out.println(\"File is too large to process\");\r\n return null;\r\n }\r\n\r\n // Create the byte array to hold the data\r\n byte[] bytes = new byte[(int) length];\r\n\r\n // Read in the bytes\r\n int offset = 0;\r\n int numRead = 0;\r\n while ((offset < bytes.length) &&\r\n ((numRead = is.read(bytes, offset, bytes.length - offset)) >= 0)) {\r\n\r\n offset += numRead;\r\n\r\n }\r\n\r\n // Ensure all the bytes have been read in\r\n if (offset < bytes.length) {\r\n throw new IOException(\"Could not completely read file \" + file.getName());\r\n }\r\n\r\n is.close();\r\n return bytes;\r\n\r\n }",
"public List<String> readFileIntoList(String filepath) throws IOException;",
"public String[] readFromFile(Path destination) throws IOException {\n\t\ttry (BufferedReader buffer = Files.newBufferedReader(destination)) {\n\t\t\treturn (buffer.lines().collect(Collectors.joining(\"\\n\"))).split(\",\");\n\t\t}\n\t}",
"private ArrayList loadfile(String file_path) throws Exception{\n\t\tFileInputStream fis = null;\n\t\tBufferedReader br = null;\n\t\tArrayList filedata = new ArrayList();\n\t\ttry {\n\t\t\tFile file = new File(file_path);\n\t\t\tfis = new FileInputStream(file);\n\t\t\tbr = new BufferedReader(new InputStreamReader(fis, charset));\n\t\t\tint i = 0;\n\t\t\twhile (br.ready()) {\n\t\t\t\tString line_data = br.readLine();\n\t\t\t\tif (line_data == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tnode_line_data nd = new node_line_data(line_data, i++);\n\t\t\t\tfiledata.add(nd);\n\t\t\t}\n\t\t\treturn filedata;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (br != null)\n\t\t\t\t\tbr.close();\n\t\t\t\tif (fis != null)\n\t\t\t\t\tfis.close();\n\t\t\t}\n\t\t\tcatch (IOException ex) {\n\t\t\t}\n\t\t}\n\t}",
"private ArrayList<String> readReturnFileContents(String fileName){\n String startingDir = System.getProperty(\"user.dir\");\n BufferedReader reader = null;\n String line = \"\";\n ArrayList<String> wholeFile = new ArrayList<String>();\n try {\n reader = new BufferedReader(new FileReader(startingDir + \"/\" + fileName));\n while ((line = reader.readLine()) != null) {\n wholeFile.add(line);\n }\n } catch (FileNotFoundException fnfe) {\n System.out.println(fnfe.getMessage());\n System.exit(1);\n } catch (NullPointerException npe) {\n System.out.println(npe.getMessage());\n System.exit(1);\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n System.exit(1);\n }\n return wholeFile;\n }",
"public Student[] constructArray(String fileName)throws IOException{\n \n Student[] ans = new Student[10];\n Scanner Sc = new Scanner(new File(fileName));\n Sc.useDelimiter(\"\\t|\\n\");\n this.amount = 0;\n while(Sc.hasNext()){\n if(this.amount == ans.length){\n ans = doubler(ans);\n }\n String ID = Sc.next();\n String SName = Sc.next();\n String Email = Sc.next();\n String SClass = Sc.next();\n String major = Sc.next();\n ans[this.amount] = new Student(ID, SName, Email, SClass, major);\n amount++;\n }\n return ans;\n }",
"public static Integer[] readInputArrayFromFile(Integer[] array, String fileName) {\n\n\t\tList<Integer> ints = readInputArrayFromFile(fileName);\n\n\t\tarray = new Integer[ints.size()];\n\t\tfor (int i = 0; i < ints.size(); i++) {\n\t\t\tarray[i] = ints.get(i);\n\t\t}\n\t\treturn array;\n\t}",
"public static ArrayList<String> readLines(String fileName){\n\t\treturn read(fileName, false);\n\t}",
"private Point[] readTestFile(String filename) {\n In in = new In(filename);\n int N = in.readInt();\n Point[] points = new Point[N];\n for (int i = 0; i < N; i++) {\n int x = in.readInt();\n int y = in.readInt();\n points[i] = new Point(x, y);\n }\n return points;\n }",
"public static byte[] getBytesFromFile(File file) throws IOException {\n\t\tlong length = file.length();\r\n\r\n\t\t// You cannot create an array using a long type.\r\n\t\t// It needs to be an int type.\r\n\t\t// Before converting to an int type, check\r\n\t\t// to ensure that file is not larger than Integer.MAX_VALUE.\r\n\t\tif (length > Integer.MAX_VALUE) {\r\n\t\t\t// File is too large\r\n\t\t\tthrow new IOException(\"File is too large!\");\r\n\t\t}\r\n\r\n\t\t// Create the byte array to hold the data\r\n\t\tbyte[] bytes = new byte[(int)length];\r\n\r\n\t\t// Read in the bytes\r\n\t\tint offset = 0;\r\n\t\tint numRead = 0;\r\n\r\n\t\tInputStream is = new FileInputStream(file);\r\n\t\ttry {\r\n\t\t\twhile (offset < bytes.length\r\n\t\t\t\t\t&& (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {\r\n\t\t\t\toffset += numRead;\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tis.close();\r\n\t\t}\r\n\r\n\t\t// Ensure all the bytes have been read in\r\n\t\tif (offset < bytes.length) {\r\n\t\t\tthrow new IOException(\"Could not completely read file \"+file.getName());\r\n\t\t}\r\n\t\treturn bytes;\r\n\t}",
"TraceList read(File file) throws IOException;",
"public static int[][] read(String fileName) throws FileNotFoundException {\r\n int i = -1;\r\n int j;\r\n\r\n int row = 1;\r\n int col = 0;\r\n\r\n Scanner read = new Scanner(new File(\".\\\\data\\\\mountain.paths\\\\\" + fileName));\r\n StringTokenizer st = new StringTokenizer(read.nextLine());\r\n\r\n while (st.hasMoreTokens()) {\r\n st.nextToken();\r\n col++;\r\n }\r\n\r\n while (read.hasNextLine()) {\r\n read.nextLine();\r\n row++;\r\n }\r\n\r\n read = new Scanner(new File(\".\\\\data\\\\mountain.paths\\\\\" + fileName));\r\n int[][] data = new int[row][col];\r\n\r\n while (read.hasNextLine()) {\r\n j = -1;\r\n i++;\r\n st = new StringTokenizer(read.nextLine());\r\n while (st.hasMoreTokens()) {\r\n j++;\r\n data[i][j] = Integer.parseInt(st.nextToken());\r\n }\r\n }\r\n return data;\r\n }",
"public static byte[] readFileAsByteArray(String path) throws IOException {\n return internalReadFileAsByteArray(path).array();\n }",
"public void readIn(String file) {\r\n\r\n\t\ttry {\r\n\r\n\t\t\t/** Initialise loop variable **/\r\n\r\n\t\t\tusedSize = 0;\r\n\r\n\t\t\t/** Set up file for reading **/\r\n\r\n\t\t\tFileReader reader = new FileReader(file);\r\n\r\n\t\t\tScanner in = new Scanner(reader);\r\n\r\n\t\t\t/** Loop round reading in data while array not full **/\r\n\r\n\t\t\twhile (in.hasNextInt() && (usedSize < size)) {\r\n\r\n\t\t\t\tA[usedSize] = in.nextInt();\r\n\r\n\t\t\t\tusedSize++;\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\tSystem.out.println(\"Error processing file \" + file);\r\n\r\n\t\t}\r\n\r\n\t}",
"private static List<String[]> readInput(String filePath) {\n List<String[]> result = new ArrayList<>();\n int numOfObject = 0;\n\n try {\n Scanner sc = new Scanner(new File(filePath));\n sc.useDelimiter(\"\");\n if (sc.hasNext()) {\n numOfObject = Integer.parseInt(sc.nextLine());\n }\n for (int i=0;i<numOfObject;i++) {\n if (sc.hasNext()) {\n String s = sc.nextLine();\n if (s.trim().isEmpty()) {\n continue;\n }\n result.add(s.split(\" \"));\n }\n }\n sc.close();\n }\n catch (FileNotFoundException e) {\n System.out.println(\"FileNotFoundException\");\n }\n return result;\n }",
"public static byte[] readBytes(String file) throws IOException\n {\n try(InputStream in = getInputStream(file))\n {\n byte[] buffer = new byte[512];\n int size = 0;\n int read;\n while((read = in.read(buffer, size, buffer.length - size)) > 0)\n {\n size += read;\n if(size == buffer.length)\n buffer = Arrays.copyOf(buffer, size * 2);\n }\n\n if(size < buffer.length)\n buffer = Arrays.copyOf(buffer, size);\n\n return buffer;\n }\n }",
"private ArrayList<String> readEntriesFromFile(String nameOfFile){\n\t\tArrayList<String> foundEntries = new ArrayList<String>();\n\t\t\n\t\ttry{\n\t\t\tFile file = new File(nameOfFile); \n\t\t\tScanner fileIn = new Scanner(file);\n\t\t\twhile (fileIn.hasNext()){\n\t\t\t\tString currentLine = fileIn.nextLine();\n\t\t\t\tfoundEntries.add(currentLine);\n\t\t\t} \n\t\t\tfileIn.close();\n\t\t}catch (IOException e){\n\t\t}\n\t\t\n\t\tif(foundEntries.size()==0){\n\t\t return null;\n\t\t}else{\n\t\t\treturn foundEntries;\n\t\t}\n\t}",
"public static int[] buildArray() throws IOException {\r\n\r\n //Variable initializations\r\n int[] intArray = {};\r\n int sumOfElements = 0;\r\n int index = 0;\r\n \r\n //Initialization of File and Scanner objects\r\n \r\n File sumOfIntegers = new File(fileInput);\r\n Scanner elementScanner = new Scanner(sumOfIntegers);\r\n\r\n //Loop that increases the num of array elements by 1 every time\r\n //it acknowledges an integer value within the file and subtracts\r\n //1 from the array elements when the sentinel value is reached.\r\n while (elementScanner.hasNextInt()) {\r\n sumOfElements++;\r\n \r\n \r\n //Assign next int scanner method to x variable\r\n //Used to process if boolean condition\r\n int x = elementScanner.nextInt();\r\n\r\n //When -999 sentinel value is reached reduce num of array elements\r\n //by 1 since we do not want it included\r\n if (x == -999) {\r\n sumOfElements = sumOfElements - 1;\r\n intArray = new int[sumOfElements];\r\n }\r\n //Assign sumOfElements as num of array elements\r\n intArray = new int[sumOfElements]; \r\n\r\n }\r\n\r\n //new scanner to reset abstract cursor of file\r\n elementScanner = new Scanner(sumOfIntegers);\r\n for (index = 0; index < sumOfElements; index++) {\r\n int x = elementScanner.nextInt();\r\n\r\n if (x != -999) {\r\n intArray[index] = x;\r\n }\r\n\r\n }\r\n\r\n //Closes the file/scanner\r\n elementScanner.close();\r\n\r\n return intArray;\r\n }",
"public static byte[] convertir(File file) {\n\t\tbyte[] a = new byte[(int) file.length()];\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(file);\n\t\t\tfis.read(a);\n\t\t\tfis.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn a;\n\t}",
"private List<String[]> extract(String file) {\n List<String[]> readIn = null;\n try {\n // instantiate file reader object\n FileReader fr = new FileReader(file);\n\n // instantiate csv reader object\n CSVReader csvReader = new CSVReaderBuilder(fr).build();\n readIn = csvReader.readAll();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return readIn;\n }"
] |
[
"0.74047863",
"0.7369295",
"0.72883135",
"0.70018905",
"0.69533265",
"0.69512033",
"0.69347936",
"0.68420434",
"0.6802301",
"0.6759347",
"0.6720819",
"0.6711178",
"0.67026526",
"0.66596144",
"0.66292953",
"0.65451634",
"0.6534951",
"0.65045553",
"0.6494749",
"0.6493054",
"0.6458796",
"0.6456255",
"0.644357",
"0.6418644",
"0.6403949",
"0.6402045",
"0.63889",
"0.6383837",
"0.6382561",
"0.63752896",
"0.6357808",
"0.6350534",
"0.63502073",
"0.6343167",
"0.6342441",
"0.6302596",
"0.6298904",
"0.62972236",
"0.62929696",
"0.62783945",
"0.6277934",
"0.6277264",
"0.6271374",
"0.6248771",
"0.62433505",
"0.62420475",
"0.62372303",
"0.6237038",
"0.6229518",
"0.6211877",
"0.62028855",
"0.6197885",
"0.6196424",
"0.61908627",
"0.61852515",
"0.61852515",
"0.61845857",
"0.61661345",
"0.6162821",
"0.6159411",
"0.6154098",
"0.61437416",
"0.61356556",
"0.6134213",
"0.6118116",
"0.60880136",
"0.6073264",
"0.6065389",
"0.6059573",
"0.6049034",
"0.6048545",
"0.6015795",
"0.6013423",
"0.6012294",
"0.60057795",
"0.5999745",
"0.5995248",
"0.5992451",
"0.59905756",
"0.59856546",
"0.5983082",
"0.59825116",
"0.5966033",
"0.5958907",
"0.5956145",
"0.59547085",
"0.595424",
"0.59306693",
"0.5928977",
"0.59288543",
"0.5915382",
"0.5915055",
"0.59105873",
"0.59101784",
"0.5904598",
"0.5896405",
"0.586817",
"0.5867981",
"0.5865106",
"0.5846711",
"0.5845678"
] |
0.0
|
-1
|
Write contents of a file from an array
|
public static void writeFileContents(File file, char[] text, String encoding) throws CoreException {
Check.checkArg(file);
FileOutputStream fos;
try {
fos = new FileOutputStream(file);
writeOutputStreamContents(fos, text, encoding);
} catch (IOException e) {
throw new CoreException(createErrorStatus(e));
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static void writeArray(String fileName, int[] array) throws Exception{\n\n // Create DataOutputStream to create a binary file.\n // Use fileName from Demo file and write from the array\n DataOutputStream output = new DataOutputStream(new FileOutputStream(fileName));\n\n // for each number in array\n for(int i : array) {\n //write the number to the binary file\n output.writeInt(i);\n }\n\n // close the output file\n output.close();\n }",
"private void writeArrayToFile(Warship[] wsArr, FileOutputStream fos) throws Exception {\n\t\tPrintWriter pw = null;\n\t\ttry {\n\t\t\tpw = new PrintWriter(fos);\n\t\t\tfor (Warship ws : wsArr) {\n\t\t\t\tif (ws != null) {\n\t\t\t\t\tpw.println(ws);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t} finally {\n\t\t\tif (pw != null) {\n\t\t\t\tpw.close();\n\t\t\t}\n\t\t}\n\t}",
"public static void writeFile(File file, String[] arr) throws FileNotFoundException {\r\n System.out.println(\"writing file\");\r\n PrintWriter writer = new PrintWriter(file); // create writer\r\n String temp = \"\"; // use to compare\r\n int count;\r\n\r\n for (int i = 0; i < arr.length; i++) // start from beginning of the array\r\n {\r\n if (arr[i].equals(temp) && i != 0) // if arr[i] is same as before != 0 for write the first element\r\n continue; // skip\r\n else {\r\n temp = arr[i];\r\n count = count(arr, arr[i], i); // count number of time appear\r\n writer.printf(\"%-15s %5d %n\", temp, count); // write into file\r\n }\r\n }\r\n writer.close(); // write into hard disk\r\n }",
"private static void writeToFile(String[] writeStringArr, String outputFileName){\n BufferedWriter outputBuffer = null;\n try{\n File outputFile = new File(outputFileName);\n if(!outputFile.exists()){\n outputFile.createNewFile();\n }\n\n outputBuffer = new BufferedWriter(new FileWriter(outputFile)); //create buffered reader\n// outputBuffer.write(writeString);\n\n for(int i=0; i< writeStringArr.length; i++){\n outputBuffer.write(writeStringArr[i]);\n outputBuffer.newLine();\n }\n } catch (IOException e){System.err.println(\"Error Writing File\");}\n finally {\n try {\n outputBuffer.close();\n }catch (IOException e){System.err.println(\"Error Closing File\");}\n }\n }",
"public void writeFile(String[] results) {\n\t\ttry {\n\t\t\tFile file = new File(outputFile);\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\n\t\t\tfor(int i = 0; i < results.length; i++) {\n\t\t\t\tString[] tuple = testTuples.get(i);\n\t\t\t\t// convert String[] to String\n\t\t\t\tString tupleString = \"\";\n\t\t\t\tfor(int j = 0; j < tuple.length; j++) {\n\t\t\t\t\ttupleString += tuple[j] + \",\";\n\t\t\t\t}\n\t\t\t\twriter.write(tupleString + results[i] + \"\\n\");\n\t\t\t}\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public void writeArray(Object o) throws IOException;",
"public void writeToFile(byte[] output) {\r\n try {\r\n file.seek(currOffset);\r\n file.write(output);\r\n currOffset += output.length;\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public static void write(byte[] data, File file) throws IOException {\n write(data, file, false);\n }",
"void writeByteArray(ByteArray array);",
"public void writeTextFile(int[][] a, int n) {\n\t\ttry {\n\t\t\twriter = new PrintWriter(new BufferedWriter(new FileWriter(filename,true)));\n\t\t\twriter.print(\"_|_\");\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\twriter.print(i + 1 + \"_\");\n\t\t\twriter.println();\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\twriter.print(i + 1 + \"| \");\n\t\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\twriter.print(a[i][j] + \" \");\n\t\t\t\t}\n\t\t\t\twriter.println();\n\t\t\t}\n\t\t\twriter.println();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not write to\\t\\\"\" + filename + \"\\\"\");\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\twriter.close();\n\t\t}\n\t\t\n\t}",
"public void writeBinaryArr(byte[] bytes, String filename, String dest) throws IOException {\n\t\tConfiguration conf = this.getConfig();\r\n\r\n\t\tFileSystem fileSystem = FileSystem.get(conf);\r\n\t\t// Create the destination path including the filename.\r\n\t\tif (dest.charAt(dest.length() - 1) != '/') {\r\n\t\t\tdest = dest + \"/\" + filename;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdest = dest + filename;\r\n\t\t}\r\n\r\n\t\t// Check if the file already exists\r\n\t\tPath path = new Path(dest);\r\n\t\tif (fileSystem.exists(path)) {\r\n\t\t\tSystem.out.println(\"File \" + dest + \" already exists\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Create a new file and write data to it.\r\n\t\tFSDataOutputStream out = fileSystem.create(path);\r\n\r\n\t\tout.write(bytes);\r\n\t\tout.close();\r\n\t}",
"private void writeDataToFile(char[] charArr, String filePath) {\n try {\n\n File outputFile = new File(filePath);\n\n if (sentencesProcessed == 1 || isMetricsFilePath) {\n outputFile.delete();\n outputFile.createNewFile();\n }\n\n FileWriter outputFileWrtrObj = new FileWriter(outputFile, true);\n\n for (char ch : charArr) {\n outputFileWrtrObj.write(ch);\n }\n\n outputFileWrtrObj.close();\n\n } catch (Exception e) {\n System.out.println(utilityConstants.LINE_SEPARATOR);\n System.err.println(utilityConstants.FILE_WRITING_ERROR_MSG);\n e.printStackTrace();\n System.exit(0);\n\n }\n }",
"static void writeContents(File file, byte[] bytes) {\n try {\n if (file.isDirectory()) {\n throw\n new IllegalArgumentException(\"cannot overwrite directory\");\n }\n Files.write(file.toPath(), bytes);\n } catch (IOException excp) {\n throw new IllegalArgumentException(excp.getMessage());\n }\n }",
"public static void writeWithFileOutputStreamWithBufArr(String testSource, String path) throws IOException {\n byte[] buf = testSource.getBytes();\n try(FileOutputStream f = new FileOutputStream(path)) {\n f.write(buf);\n }\n }",
"public void writeIntArray(int[] array) throws IOException {\n\t\tfor (int a : array) {\n\t\t\tthis.writeInt(a);\n\t\t}\n\t}",
"private static void writeToBuffer(int index, RandomAccessFile fos) {\n\n try {\n\n // x is the current integer value to be written.\n int x;\n // loc is the current location in the buffer to be written.\n int loc = 0;\n\n // iterates through each value in the sorted integer array.\n for (int k = 0; k < index; k++) {\n // gets the current integer.\n x = ints[k];\n\n // checks if the buffer is full.\n if (loc == BUF_SIZE) {\n // if the buffer is full, write its contents out to the file.\n fos.write(buf);\n // the buffer has been emptied, so set its current location back to the start.\n loc = 0;\n }\n\n // convert the current integer value to be written to a byte array.\n buf[loc] = (byte) (x >> 24);\n buf[loc + 1] = (byte) (x >> 16);\n buf[loc + 2] = (byte) (x >> 8);\n buf[loc + 3] = (byte) (x);\n\n // increment the location in the buffer now that a value has been written in.\n loc += BYTES_TO_INTS;\n }\n\n if (loc > 0) {\n // if there are any values left over in the buffer, write them out to the file.\n fos.write(buf, 0, loc);\n\n }\n } catch (IOException e){\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) throws Exception{\n\n FileOutputStream fos = new FileOutputStream(\"C:/Users/e678332/JavaProgrammingPractice/bytearrayfile.txt\");\n FileOutputStream fos1 = new FileOutputStream(\"C:/Users/e678332/JavaProgrammingPractice/bytearrayfile2.txt\");\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n String s = \"byteArrayStream\";\n byte[] b = s.getBytes();\n baos.write(b);\n baos.writeTo(fos);\n baos.writeTo(fos1);\n baos.flush();\n baos.close();\n\n }",
"static void writeFile(final PropertyArray data, final String file, boolean prettyPrint) throws IOException {\n if(data == null || data.isEmpty() || file == null || file.isEmpty())\n throw new IOException(\"data or file path is null or empty.\");\n\n if(prettyPrint) {\n writeFile(data, file, 2);\n return;\n }\n\n writeFile(data, file, 0);\n }",
"public void writeToFile() {\n try {\n // stworz plik\n File file = new File(\"../Alice.ids\");\n // stworz bufor zapisu do pliku\n FileWriter fileWriter = new FileWriter(file);\n for(int i = 0; i < identificationNumbers.length; i++) {\n for(int j = 0; j < identificationNumbers[i].length; j++)\n fileWriter.write(Integer.toString(identificationNumbers[i][j]));\n\t\t\t fileWriter.write(\"\\n\");\n }\n\t\t\tfileWriter.flush();\n\t\t\tfileWriter.close();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }",
"protected abstract void writeFile();",
"private static void printSortedArray(String outputFileName) {\n try {\n File output = new File(outputFileName);\n BufferedWriter writer = new BufferedWriter(new FileWriter(output));\n for(int i = 0; i < array.length; i++) {\n writer.write(array[i] + \"\\n\");\n }\n writer.close();\n }\n catch(IOException e){\n System.out.println(\"File Error\");\n }\n }",
"public void writeByteArrayToFile(byte[] aByteArray, String targetFilename)\r\n\tthrows FileNotFoundException, IOException {\r\n\t\tByteArrayInputStream theTargetInputStream = new ByteArrayInputStream(\r\n\t\t\t\taByteArray);\r\n\t\tFileOutputStream theFileOutputStream = new FileOutputStream(\r\n\t\t\t\ttargetFilename);\r\n\t\tcopyStreamContent(theTargetInputStream, theFileOutputStream);\r\n\t\ttheFileOutputStream.close();\r\n\t\ttheTargetInputStream.close();\r\n\t}",
"public static void writeBytesToFile(byte[] bytes, File outputFile) {\n try (FileOutputStream outputFileStream = new FileOutputStream(outputFile)) {\n outputFileStream.write(bytes);\n } catch (IOException e) {\n throw new UncheckedIOException(\"Could not write file \" + outputFile, e);\n }\n }",
"public static void createFile(double[] array){\n //String for the name of the file that's going to be created.\n String newFileName = \"results.csv\";\n\n //Create a file variable using the created file name\n try{\n File newFile = new File(newFileName);\n\n //Create new instance of PrintWriter to write into the new file\n FileWriter csvWriter = new FileWriter(newFile, false);\n //For each number, print the percentage into the file\n for(int i = 0; i < 9; i++){\n csvWriter.write((i+1) + \": \" + array[i] + \"%\\n\");\n }\n //Close the PrintWriter since we don't need it anymore.\n csvWriter.close();\n }\n catch(FileNotFoundException e){\n System.out.println(\"File not found\");\n }\n catch(IOException e){\n System.out.println(\"IO Exception\");\n }\n }",
"public static void bytesToFile(byte[] bytes, String filePath) throws IOException {\n final FileOutputStream stream = new FileOutputStream(filePath);\n try {\n stream.write(bytes);\n } finally {\n stream.close();\n }\n }",
"public static void writeSortedArrayToFile(String[] lines, int linesLength, String fileName) {\n File outFile = new File(fileName);\n FileWriter outFileWriter = null;\n\n try {\n outFileWriter = new FileWriter(outFile);\n\n for (int i = 0; i < linesLength; i++)\n outFileWriter.append(lines[i] + \"\\n\");\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n outFileWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"public void writeObjects(Object[] arr) throws IOException\n\t{\n\t\twriteLength(arr.length);\n\t\tfor (final Object a : arr) {\n\t\t\twriteObject(a);\n\t\t}\n\t}",
"private static void writeToOutput(String path, Apriori apriori){\n try{\n BufferedWriter output = new BufferedWriter(new FileWriter(path, false));\n for (String s : apriori.mItemSet){\n output.write(s);\n }\n output.close();\n } catch (IOException e){\n e.printStackTrace();\n }\n }",
"public void addOn(ArrayList array) {\n try {\n PrintWriter writer;\n if (array.get(0) instanceof Integer)\n writer = new PrintWriter(\"points.txt\");\n else writer = new PrintWriter(\"names.txt\");\n\n for (int i=0; i<array.size(); i++)\n writer.println(array.get(i));\n writer.close();\n } catch (IOException e)\n {}\n }",
"public void fileOutput(String[][] arrOfstr, String fileName){\n try (Formatter output = new Formatter(fileName)) {\n //loop through 2d array and output it to text file\n for (int counter2 = 0; counter2 < 3; counter2++) {\n for (int counter3 = 0; counter3 < arrOfstr[counter2].length; counter3++) {\n output.format(\"%s \", arrOfstr[counter2][counter3]);\n }\n output.format(\"%n\");\n }\n //catch if file not found\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }",
"static void writearray(String[]array) {\n\t\t for (int i = 0; i < array.length; i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t}",
"public static void writeFile(ArrayList<String> lines, String fileName)\n {\n try\n {\n // Create file \n FileWriter fstream = new FileWriter(fileName);\n BufferedWriter out = new BufferedWriter(fstream);\n for (String line: lines)\n {\n out.write(line);\n }\n //Close the output stream\n out.close();\n }\n catch (Exception e){//Catch exception if any\n System.err.println(\"Error: \" + e.getMessage());\n }\n }",
"private static void writeToFile(String[] data) {\n\t\t// Regatta hasn't been calculated.\n\t\tif(r == null) {\n\t\t\tSystem.out.println(\"\\nYou haven't processed a regatta yet! \\nUse regatta to begin processing.\\n\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Just the command was specified, we need to get the filename.\n\t\tif(data.length == 1) {\n\t\t\tSystem.out.println(\"Oops, looks like you didn't specify an output file.\\n\");\n\t\t\tinitializeOutput(getFilename());\n\t\t}\n\n\t\t// Filename was specified but is invalid. Need to get another one.\n\t\tif(!isValidFileName(data[1])) {\n\t\t\tSystem.out.println(\"Looks like your filename is incorrect.\\n\");\n\t\t\tinitializeOutput(getFilename());\n\t\t}\n\n\t\tinitializeOutput(data[1]);\n\n\t\t// Write out.\n\t\tfileOutput.print(r.podium());\n\t\tfileOutput.close();\n\t}",
"public void write(String[] buf) throws IOException;",
"public static void writeFile(ArrayList<Integer> data, String path) {\n\t\ttry {\n\t\t\tFileOutputStream fos = new FileOutputStream(path);\n\t\t\tOutputStreamWriter osw = new OutputStreamWriter(fos);\n\t\t\tBufferedWriter bw = new BufferedWriter(osw);\n\n//\t\t\tfor (String dt : data) {\n//\t\t\t\tbw.write(dt);\n//\t\t\t\tbw.newLine();\n//\t\t\t}\n\n\t\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\t\tbw.write(data.get(i).toString());\n\t\t\t\tif (i < data.size() - 1)\n\t\t\t\t\tbw.write(\", \");\n\n\t\t\t\t// bw.newLine();\n\t\t\t}\n\t\t\tbw.newLine();\n\t\t\tbw.close();\n\t\t\tosw.close();\n\t\t\tfos.close();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private static void writer(String filename, char[] chars) {\n BinaryOut binaryOut = new BinaryOut(filename);\n\n for (char c : chars) {\n binaryOut.write(c);\n }\n\n binaryOut.close();\n }",
"public static void WriteToFile(){\r\n try {\r\n File file = new File(\"output.txt\");\r\n file.createNewFile();\r\n \r\n FileWriter fw = new FileWriter(file.getAbsoluteFile());\r\n BufferedWriter bw = new BufferedWriter(fw);\r\n String[] FinalBoard = new String[Board.ReportBoardValues().length];\r\n FinalBoard = Board.ReportBoardValues();\r\n for(int i = 0; i < Board.ReportBoardValues().length; i++){\r\n bw.write(FinalBoard[i]);\r\n bw.newLine();\r\n }\r\n bw.close();\r\n fw.close();\r\n \r\n }\r\n catch (IOException e) {\r\n System.out.println (\"Output error\");\r\n }\r\n }",
"static void writeStudentsToFile(Student[] students, String filename) {\n\t\ttry (FileWriter out = new FileWriter(filename)) {\n\n\t\t\tfor (Student s : students)\n\t\t\t\tout.write(s.toString() + \"\\n\");\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"void writeBytes(byte[] b, File f) throws Exception {\n \n ByteBuffer[] bb = splitByteArray(b);\n\n for (int i = 0; i < bb.length; ++i) {\n\n // WRITE NEXT PORTION OF BYTES VIA FOS:\n\n fos.write(bb[i].array()); \n\n ++i;\n\n // WRITE NEXT PORTION OF BYTES VIA CHANNEL:\n\n if (i < bb.length) {\n FileLock fl = outChannel.lock();\n outChannel.write(bb[i]);\n outChannel.force(false);\n fl.release();\n }\n }\n }",
"private void saveInFile(final String fileName, ArrayList<Habit> habitArray) {\r\n try {\r\n FileOutputStream fos = openFileOutput(fileName, 0);\r\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos));\r\n Gson gson = new Gson();\r\n gson.toJson(habitArray, out);\r\n out.flush();\r\n\r\n fos.close();\r\n } catch (FileNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n throw new RuntimeException();\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n throw new RuntimeException();\r\n }\r\n }",
"public void write(byte b[]) throws IOException;",
"public static void writeFile(String filepath, List<String> contents) {\n List<String> content = new ArrayList<String>();\n File file = new File(filepath);\n if (file.exists()) {\n content.addAll(FileIOUtilities.readFile(filepath));\n }\n content.addAll(contents);\n if (content != null && !content.isEmpty()) {\n BufferedWriter writer = null;\n String encoding = \"UTF8\";\n try {\n writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), encoding));\n for (String line : content) {\n writer.write(line);\n writer.newLine();\n }\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n writer.close();\n } catch (IOException e) {\n // Ignore exception because writer was not initialized\n }\n }\n \n }\n }",
"void writePiece(int index, byte[] values){\n int cnt = 0;\n for(int i = index*piece_size;i<(index+1)*piece_size;i++){\n file_pieces[i] = values[cnt++];\n }\n }",
"public synchronized static void write(double[] xxx,String fileName){\n\t\ttry{\n\t\t \tFileOutputStream fos = new FileOutputStream(fileName);\n\t\t \tDataOutputStream dos = new DataOutputStream(fos);\n\t\t\t\n\t\t\tfor(double x:xxx)\n\t\t\t\tdos.writeDouble(x);\n\t\t\tdos.close();\n\t\t\tfos.close();\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t}",
"public static void GuardaArchivoChips(ArrayList<Chip> ArrayChips) throws FileNotFoundException, IOException {\n File f = new File(\"Archivos/chips1.txt\");\n FileWriter fw = new FileWriter(f, false);\n BufferedWriter bw = new BufferedWriter(fw);\n for (Chip objChip : ArrayChips) { //RECORRER EL ARRAY LIST Y GRABAR POR CADA OBJETO\n bw.write(objChip.getNumero() + \",\");\n bw.write(objChip.getActivo() + \",\");\n bw.write(objChip.getSaldo() + \",\");\n bw.write(objChip.getMegas() + \",\");\n bw.write(objChip.getCliente().getCedula() + \",\");\n\n }\n bw.close();\n fw.close();\n }",
"void writeFloats(float[] f, int off, int len) throws IOException;",
"void writeInts(int[] i, int off, int len) throws IOException;",
"private static void writeFile(final PropertyArray data, final String file, int indent) throws IOException {\n loadParser();\n parser_.setIndent(indent);\n parser_.writeConfig(data, file);\n parser_.setIndent(0);\n }",
"public void writeToFile(ArrayList<String> word, ArrayList<String> abb) {\n String path =\n Environment.getExternalStorageDirectory() + File.separator + \"TextEasy\";\n // Create the folder.\n File folder = new File(path);\n folder.mkdirs();\n\n // Create the file.\n File file = new File(folder, filename);\n\n // Save your stream, don't forget to flush() it before closing it.\n\n try {\n file.createNewFile();\n FileOutputStream fOut = new FileOutputStream(file);\n OutputStreamWriter myOutWriter = new OutputStreamWriter(fOut);\n for (int i = 0; i < word.size(); i++) {\n String text = word.get(i) + \"\\n\" + abb.get(i) + \"\\n\";\n myOutWriter.append(text);\n }\n myOutWriter.close();\n fOut.flush();\n fOut.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }",
"private void writeToFile() {\n try {\n FileOutputStream fos = new FileOutputStream(f);\n String toWrite = myJSON.toString(4);\n byte[] b = toWrite.getBytes();\n fos.write(b);\n fos.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void writeToFile(String fullFilePath, File newTB, String[] commandArray){\n\n //Find starting position of first bracket and take 1st subsequent element\n int i = whichArrayElementEqualTo(commandArray, \"(\") + 1;\n int id;\n\n try {\n if(newTB.isFile()) {\n //Use append option in the filewriter to create new lines\n FileWriter fw = new FileWriter(fullFilePath, true);\n bw = new BufferedWriter(fw);\n\n //Return ID number\n id = idNum(fullFilePath);\n\n //Create ID column\n bw.write(\"\\n\");\n bw.write(String.valueOf(id));\n bw.write(\"\\t\");\n\n //Loop through from instance of open bracket to instance of close bracket outputting specified variables\n while (i < whichArrayElementEqualTo(commandArray, \")\")) {\n\n //Remove commas and apostrophes prior to outputting\n bw.write(removeApostrophe(removeComma(commandArray[i])));\n bw.write(\"\\t\");\n i++;\n }\n }\n }\n catch(IOException ioe) {\n ioe.printStackTrace();\n System.out.println(ioe);\n }\n finally {\n try{\n //Close buffered writer\n if(bw!=null) {\n bw.close();\n }\n }\n catch(Exception ex){\n ex.printStackTrace();\n System.out.println(\"Error in closing the BufferedWriter\" + ex);\n }\n }\n }",
"public abstract void writeToFile( );",
"public static void writeAll(byte[] bs, String fn) {\n\t\tFileOutputStream fos = null;\n\t\ttry {\n\t\t\tfos = new FileOutputStream(fn);\n\t\t\twriteAll(bs, fos);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new WrappedException(e);\n\t\t} finally {\n\t\t\tclose(fos);\n\t\t}\n\t}",
"public static final void writeBytes(@org.jetbrains.annotations.NotNull java.io.File r2, @org.jetbrains.annotations.NotNull byte[] r3) {\n /*\n java.lang.String r0 = \"$this$writeBytes\"\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r2, r0)\n java.lang.String r0 = \"array\"\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r3, r0)\n java.io.FileOutputStream r0 = new java.io.FileOutputStream\n r0.<init>(r2)\n java.io.Closeable r0 = (java.io.Closeable) r0\n r2 = 0\n r1 = r0\n java.io.FileOutputStream r1 = (java.io.FileOutputStream) r1 // Catch:{ Throwable -> 0x001e }\n r1.write(r3) // Catch:{ Throwable -> 0x001e }\n kotlin.io.CloseableKt.closeFinally(r0, r2)\n return\n L_0x001c:\n r3 = move-exception\n goto L_0x0020\n L_0x001e:\n r2 = move-exception\n throw r2 // Catch:{ all -> 0x001c }\n L_0x0020:\n kotlin.io.CloseableKt.closeFinally(r0, r2)\n throw r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.io.i.writeBytes(java.io.File, byte[]):void\");\n }",
"public static void writeBinaryFile(List<Integer> binary, String filename) throws IOException\n {\n FileOutputStream outputStream = new FileOutputStream(filename);\n BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(outputStream);\n\n StringBuilder bytes = new StringBuilder();\n\n for (int i : binary) {\n bytes.append(i);\n }\n\n String toWriteString = bytes.toString();\n\n byte[] toWrite = toWriteString.getBytes();\n\n bufferedOutputStream.write(toWrite);\n bufferedOutputStream.flush();\n bufferedOutputStream.close();\n outputStream.close();\n }",
"void addNotes(Note arr[]){\n for(int i = 0; i < arr.length; i++){\n System.out.println(\"Please enter the name of the author of this note\");\n String author = sc.nextLine();\n arr[i].setAuthor(author);\n\n System.out.println(\"Please enter the date of this note\");\n String date = sc.nextLine();\n arr[i].setDate(date);\n\n System.out.println(\"You can now enter your note\");\n String description = sc.nextLine();\n arr[i].setDescription(description);\n\n //checks to see if a file exists\n try {\n if(!file.exists()){\n file.createNewFile();\n }\n // BufferedWriter allows the ability to write to file\n BufferedWriter buffer = new BufferedWriter(new FileWriter(file, true));\n buffer.write(author);\n buffer.write(date);\n buffer.write(description);\n\n buffer.close();\n System.out.println(\"Successfully written to file\");\n\n }catch (Exception ex){\n System.out.println(ex);\n }// end of try catch\n }//end of for loop\n }",
"public static void main(String[] args) throws Exception {\n FileOutputStream fos=new FileOutputStream(\"e:/data/contents.txt\");\r\n //step-2 (write data)\r\n String s=\"Something We want To Write To A File\";\r\n byte b[]=s.getBytes();\r\n //fos.write(b);\r\n fos.write(b, 3, 10);\r\n //step-3 (close file)\r\n fos.close();\r\n System.out.println(\"DATA STORED\");\r\n }",
"private void writeToFile(){\n try(BufferedWriter br = new BufferedWriter(new FileWriter(filename))){\n for(Teme x:getAll())\n br.write(x.toString()+\"\\n\");\n br.close();\n }catch (IOException e){\n e.printStackTrace();\n }\n }",
"public void write(String[] buf, int offset, int size) throws IOException;",
"public static void saveVectorsToFile(double [][] inputArray, String filename) throws IOException {\n StringBuilder vectors = new StringBuilder();\n for (int i = 0; i < inputArray.length; i++) {\n for (int j = 0; j < inputArray[0].length; j++) {\n vectors.append(inputArray[i][j] + \"\");\n if (j < inputArray.length - 1)\n vectors.append(\",\");\n }\n vectors.append(\"\\n\");\n }\n BufferedWriter writer = new BufferedWriter(new FileWriter(filename));\n writer.write(vectors.toString());\n writer.close();\n }",
"public static void saveAvgValuesToFile(double [] inputArray, String filename) throws IOException {\n StringBuilder avgValues = new StringBuilder();\n for (int i = 0; i < inputArray.length; i++) {\n avgValues.append(inputArray[i] + \"\");\n avgValues.append(\",\");\n avgValues.append(\"\\n\");\n }\n BufferedWriter writer = new BufferedWriter(new FileWriter(filename));\n writer.write(avgValues.toString());\n writer.close();\n }",
"public static void mergeFiles(String[] array) {\n\n // Loops over every transaction file.\n \tfor (int i=0; i<array.length; i++) {\n storeFile(array[i], mergedTransferFiles);\n }\n }",
"void write(byte b[]) throws IOException;",
"public void writeToFile(String fileName){\r\n try (Writer bfwriter = new BufferedWriter(new OutputStreamWriter(\r\n new FileOutputStream(fileName), \"utf-8\"))) {\r\n bfwriter.write(array2CSV());\r\n }\r\n catch(IOException e){\r\n e.printStackTrace();\r\n }\r\n }",
"private static void writeText(FileWriter outputStream, TextArray textArray, TextArray pTextArray) throws IOException {\n if (pTextArray.compareTo(textArray) != 0) {\n textArray.write(outputStream);\n pTextArray.clone(textArray); // Update the previously save word for comparison in next turn\n }\n }",
"@Override\n public void write(byte[] b_array) throws IOException {\n int i;\n int flag = 1;\n int my_decimal1=0;\n for (i = 0; i < 12; i++) {\n out.write(b_array[i]);\n }\n //write to output stream the rest of the bytearray's size - division 8\n int rest = (b_array.length - 12) % 8;\n out.write((byte) rest);\n\n\n while (i < b_array.length) {\n //start to count the number of 0\n if (i < b_array.length - rest) {\n for (int j = 0; j < 8; j++) {\n //check if we not in the rest part of the byte array\n if (i < b_array.length - rest) {\n //my_str = String.valueOf((int)b_array[i]);\n my_decimal1 += (int)b_array[i]*(Math.pow(2, j));\n i++;\n }\n else {\n flag = 0;\n break;\n }\n }\n }\n else{\n flag=0;\n }\n //if the for loop finish without break;\n if (flag == 1) {\n out.write((byte) my_decimal1);\n my_decimal1 = 0;\n }\n else {\n out.write(b_array[i]);\n i++;\n }\n }\n\n //>>\n\n\n }",
"private static void sortWordAndWriteFile(List<TextArray> textArrays) throws IOException {\n SORT_TOOL.addAll(textArrays); // Sort and remove duplicates\n\n Path sortedFilePath = createTempFile(TEMP_SORTED_WORD_FOLDER);\n\n // Save to a new file\n try (FileWriter outputStream = new FileWriter(sortedFilePath.toFile().getAbsolutePath())) {\n SORT_TOOL.forEach(a -> {\n try {\n a.write(outputStream);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n });\n } finally {\n SORT_TOOL.clear();\n }\n }",
"@SuppressWarnings(\"unchecked\")\n public static void writeFile(String outputFile) {\n try (FileWriter file = new FileWriter(outputFile)) { // Creates file\n file.write(Constants.OPEN_SQUARE); // Begin array\n for(Map.Entry<Integer, String> entry : valid.entrySet()) { // Iterates names\n int id = entry.getKey();\n String name = entry.getValue();\n String cust = String.format(Constants.ENTRY, id, name);\n file.write(cust); // Writes formatted string to file\n }\n file.write(Constants.CLOSE_SQUARE); // Closes the array\n file.flush(); // Flushes buffer\n } catch (IOException e) { // Case of exception\n e.printStackTrace();\n }\n }",
"public void writeObject(RandomAccessFile arq) throws IOException{\n byte[] dados = this.getByteArray();\n arq.writeChar(' ');\n arq.writeShort(dados.length);\n arq.write(dados);\n }",
"void writeToFile(){\n try{\n OutputStream o = new FileOutputStream(distanceFile);\n for(int start = 1; start < 200; start++)\n for(int to = 1; to < 200; to++)\n for(int taxi = 0; taxi < 12; taxi++)\n for(int bus = 0; bus < 9; bus++)\n o.write(distance[start][to][taxi][bus]);\n o.close();\n o = new FileOutputStream(validMoveFile);\n for(int node = 1; node < 200; node++)\n for(int taxi = 0; taxi < 3; taxi++)\n for(int bus = 0; bus < 3; bus++)\n for(int underground = 0; underground < 3; underground++)\n for(int doublet = 0; doublet < 2; doublet++)\n for(int secret = 0; secret < 3; secret++)\n for(int b = 0; b < 4; b++)\n o.write((byte) (validMoves[node][taxi][bus][underground][doublet][secret] >> ((3 - b) * 8)));\n o.close();\n }\n catch (Exception e){\n System.out.println(\"Exception: \" + e);\n }\n }",
"void write(final FileWriter outputStream) throws IOException {\n if (array[0] != -1) {\n // Ignore -1 value\n Arrays.stream(array).filter(i -> i >= 0).forEachOrdered(i -> {\n try {\n outputStream.write(toChars(i));\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n });\n\n outputStream.write(\"\\n\");\n }\n }",
"public void writeFileContents(String filename, String contents) {\n }",
"void writeBytes(byte[] value);",
"public final boolean writeToFile(byte[] bArr) {\n boolean z;\n VEssayLogUtil bVar;\n StringBuilder sb;\n File downloadTempFile;\n C32569u.m150519b(bArr, C6969H.m41409d(\"G6896D113B0\"));\n VEssayLogUtil bVar2 = VEssayLogUtil.f90847b;\n bVar2.mo110964a(C6969H.m41409d(\"G6D8CC214B33FAA2DA643D05FE0ECD7D22985DC16BA70\") + this);\n if (this.outputStream == null) {\n this.outputStream = getOutputStream(this.filePath);\n }\n VEssayLogUtil bVar3 = VEssayLogUtil.f90847b;\n bVar3.mo110964a(C6969H.m41409d(\"G6D8CC214B33FAA2DA643D05FE0ECD7D22985DC16BA70\") + this);\n Long l = null;\n try {\n VEssayLogUtil bVar4 = VEssayLogUtil.f90847b;\n bVar4.mo110964a(C6969H.m41409d(\"G6D8CC214B33FAA2DA643D05FE0ECD7D22985DC16BA70B83CE50D955BE1A59397\") + this);\n FileOutputStream fileOutputStream = this.outputStream;\n if (fileOutputStream != null) {\n fileOutputStream.write(bArr);\n }\n FileOutputStream fileOutputStream2 = this.outputStream;\n if (fileOutputStream2 != null) {\n fileOutputStream2.flush();\n }\n VEssayLogUtil bVar5 = VEssayLogUtil.f90847b;\n bVar5.mo110964a(C6969H.m41409d(\"G6D8CC214B33FAA2DA643D05FE0ECD7D22985DC16BA70B83CE50D955BE1A59297\") + this);\n z = true;\n bVar = VEssayLogUtil.f90847b;\n sb = new StringBuilder();\n sb.append(C6969H.m41409d(\"G6D8CC214B33FAA2DA643D05FE0ECD7D22985DC14BE3CA730A643D0\"));\n downloadTempFile = getDownloadTempFile(this.filePath);\n } catch (IOException e) {\n e.printStackTrace();\n VEssayLogUtil bVar6 = VEssayLogUtil.f90847b;\n bVar6.mo110964a(C6969H.m41409d(\"G6D8CC214B33FAA2DA643D05FE0ECD7D22985DC16BA70AE31E50B805CFBEACD9722C3\") + e.getMessage());\n z = false;\n bVar = VEssayLogUtil.f90847b;\n sb = new StringBuilder();\n sb.append(C6969H.m41409d(\"G6D8CC214B33FAA2DA643D05FE0ECD7D22985DC14BE3CA730A643D0\"));\n downloadTempFile = getDownloadTempFile(this.filePath);\n } catch (Throwable th) {\n VEssayLogUtil bVar7 = VEssayLogUtil.f90847b;\n StringBuilder sb2 = new StringBuilder();\n sb2.append(C6969H.m41409d(\"G6D8CC214B33FAA2DA643D05FE0ECD7D22985DC14BE3CA730A643D0\"));\n File downloadTempFile2 = getDownloadTempFile(this.filePath);\n if (downloadTempFile2 != null) {\n l = Long.valueOf(downloadTempFile2.length());\n }\n sb2.append(l);\n sb2.append(C6969H.m41409d(\"G29CF95\"));\n sb2.append(this);\n bVar7.mo110964a(sb2.toString());\n throw th;\n }\n }",
"public void write(String s, ArrayList<String[]> data) throws IOException {\n\t\tFile metaFile = new File(s);\n\t\tmetaFile.createNewFile();\n\t\tFileWriter fw = new FileWriter(metaFile);\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\tString row = \"\";\n\t\t\tfor (int j = 0; j < 5; j++) {\n\t\t\t\trow = row + data.get(i)[j] + \",\";\n\t\t\t}\n\t\t\trow = row + data.get(i)[5];\n\t\t\tbw.write(row);\n\t\t\tbw.newLine();\n\t\t}\n\t\tbw.close();\n\t}",
"public static void output(String filePath, BigDecimal[][] m){\n\t\tFileWriter fileWriter;\n\t\ttry {\n\t\t\tfileWriter = new FileWriter(filePath);\n\t\t\tfor(int i = 0; i < m.length; i++){\n\t\t\t\tfor(int j = 0; j < m[0].length; j++)\n\t\t\t\t\tfileWriter.append(m[i][j]+\"\\t\");\n\n\t\t\t\tfileWriter.append(\"\\n\");\n\t\t\t}\n\t\t\tfileWriter.flush();\n\t\t\tfileWriter.close();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"File writer error!\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\t}",
"static void writeFile(){\n try{\n Path contactsListPath = Paths.get(\"contacts\",\"contacts.txt\");\n Files.write(contactsListPath, contactList);\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n //refreshes list of Contact objs\n fileToContactObjs();\n }",
"@Override\r\n public void save(String[] arr) {\r\n\tString name = arr[arr.length - 2];\r\n\tString fileName = arr[arr.length - 1];\r\n\tMaze3d m = hMaze.get(name);\r\n\ttry {\r\n\t OutputStream out = new MyCompressorOutputStream(new FileOutputStream(fileName));\r\n\t out.write(m.toByteArray());\r\n\t out.close();\r\n\t setChanged();\r\n\t notifyObservers(\"Maze \" + name + \" is saved\");\r\n\t} catch (FileNotFoundException e) {\r\n\t setChanged();\r\n\t notifyObservers(\"Error - the file was not found\");\r\n\t} catch (IOException e) {\r\n\t setChanged();\r\n\t notifyObservers(\"Error - IOException\");\r\n\t}\r\n }",
"public static void writeByteArrayToFile( final File file, final byte[] data ) throws IOException\n {\n writeByteArrayToFile( file, data, false );\n }",
"public void writeToFile(File file) {\n\n\t}",
"public static void salvaArrayListArquivo(ArrayList<Cliente> array, String nomeArquivo) throws InterruptedException{\n\t\tString payLoad = \"\";\n\t\t\n\t\tdeletaArquivo(nomeArquivo);\n\t\t\n\t\tfor (Cliente cliente1 : array) {\n\t\t\t//Armazena dados em arquivo.\n\t\t\tpayLoad = PayLoad.montaPayLoad(cliente1);\n\t\t\tArquivo.addArquivo(payLoad, nomeArquivo);\n\t\t}\n\t\t\n\t\t\n\t}",
"public void writeFile(String filename, ArrayList<String> output)\n {\n try\n {\n PrintWriter write = new PrintWriter(filename);\n for(String out : output)\n {\n write.println(out);\n }\n write.close();\n }\n catch(FileNotFoundException exception) \n {\n String error = filename + \" not found\";\n System.out.println(error);\n }\n \n catch(IOException exception) \n {\n String error = \"Unexpected I/O error occured\";\n System.out.println(error); \n } \n }",
"public void writer(List<String> toStore) throws IOException{\n //creates writer and clears file\n PrintWriter writer = new PrintWriter(\"output.txt\", \"UTF-8\");\n //for each loop to store all the values in the file into the file named output.txt\n for(String s : toStore)\n //stores the strings for outputting\n writer.println(s);\n //closes the writer and outputs to the file\n writer.close();\n }",
"public abstract void write(byte[] b);",
"public void writeFile() \r\n\t{\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tfor(String str : scorers)\r\n\t\t\tbuilder.append(str).append(\",\");\r\n\t\tbuilder.deleteCharAt(builder.length() - 1);\r\n\t\t\r\n\t\ttry(DataOutputStream output = new DataOutputStream(new FileOutputStream(HIGHSCORERS_FILE)))\r\n\t\t{\r\n\t\t\toutput.writeChars(builder.toString());\r\n\t\t} \r\n\t\tcatch (FileNotFoundException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.err.println(\"[ERROR]:[FileManager] File \" + HIGHSCORERS_FILE + \" was not found \" \r\n\t\t\t\t\t+ \"while writing.\");\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.err.println(\"[ERROR]:[FileManager] Error while reading the file \" + HIGHSCORERS_FILE);\r\n\t\t}\r\n\t}",
"private void writeFile(String path)\n {\n FileIO fileIO = new FileIO();\n StringBuffer stringBuf = new StringBuffer();\n for(int i = 0; i< getDrivers().getSize(); i++) // go through each driver in the collection\n {\n stringBuf.append(getDrivers().getDriver(i).getName() + \",\" + getDrivers().getDriver(i).getRanking() \n + \",\" + getDrivers().getDriver(i).getSpecialSkill() + ((i == (getDrivers().getSize() - 1)) ? \"\" :\"\\n\")); // append details to buffer\n }\n fileIO.setFileName(path);\n fileIO.writeFile(stringBuf.toString());\n }",
"public void write(byte[] buffer);",
"public void write(ArrayDataOutput out) throws FitsException, IOException;",
"public void writeFile() {\n\t\ttry {\n\t\t\tFile dir = Environment.getExternalStorageDirectory();\n\t\t\tFile myFile = new File(dir.toString() + File.separator + FILENAME);\n\t\t\tLog.i(\"MyMovies\", \"SeSus write : \" + myFile.toString());\n\t\t\tmyFile.createNewFile();\n\t\t\tFileOutputStream fOut = new FileOutputStream(myFile);\n\t\t\tOutputStreamWriter myOutWriter = \n\t\t\t\t\tnew OutputStreamWriter(fOut);\n\t\t\tfor (Map.Entry<String, ValueElement> me : hm.entrySet()) {\n\t\t\t\tString refs = (me.getValue().cRefMovies>0? \"MOVIE\" : \"\");\n\t\t\t\trefs += (me.getValue().cRefBooks>0? \"BOOK\" : \"\");\n\t\t\t\tString line = me.getKey() + DELIMITER + me.getValue().zweiteZeile \n\t\t\t\t\t\t //+ DELIMITER\n\t\t\t\t\t\t //+ me.getValue().count\n\t\t\t\t\t \t+ DELIMITER\n\t\t\t\t\t \t+ refs\n\t\t\t\t\t \t + System.getProperty(\"line.separator\");\n\t\t\t\t//Log.i(\"MyMovies\", \"SeSus extracted : \" + line);\n\t\t\t\tmyOutWriter.write(line);\n\t\t\t}\n\t\t\tmyOutWriter.close();\n\t\t\tfOut.close();\n\t\t} catch (IOException e) {\n\t\t\t//\n\t\t\tLog.i(\"MyMovies\", \"SeSus write Exception : \");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void writeStringArrayNullable(String[] array) throws IOException {\n\t\tif (array == null) {\n\t\t\twriteVInt(0);\n\t\t} else {\n\t\t\twriteVInt(array.length);\n\t\t\tfor (String s : array) {\n\t\t\t\twriteString(s);\n\t\t\t}\n\t\t}\n\t}",
"private void writeToFile(ArrayList<Task> tasks) throws IOException {\r\n FileWriter fileWriter = new FileWriter(filePath);\r\n for (Task task : tasks) {\r\n Parser fileFormatter = new ParseToFileFormat(task);\r\n String taskData = fileFormatter.getFileFormat();\r\n fileWriter.write(taskData);\r\n }\r\n fileWriter.close();\r\n }",
"public static void bytesToFile(byte[] bytes, File file) throws Exception {\n FileOutputStream out = null;\n if (bytes != null) {\n try {\n out = new FileOutputStream(file);\n out.write(bytes);\n } finally {\n if (out != null) {\n out.close();\n }\n }\n } else {\n file.delete();\n }\n }",
"private void append(byte[] bts) {\n checkFile();\n try {\n outputStream.write(bts);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static void printArray(String[] names, String fileName) throws IOException{//throw IOException\n \tFile outfile = new File(fileName);\n \tPrintWriter pw = new PrintWriter(outfile);\n \tfor(int a = 0; a < names.length; a++){\n \t\tpw.println(names[a]);\n \t}\n \tpw.close();\n \treturn;\n }",
"public void write( byte[] array, int firstIndex,\n\t\t\tint count );",
"public void write(byte[] b) throws IOException {\n\t\tbaos.writeBytes(b);\n\t}",
"void writeMap(Collection<?> array);",
"protected void writeFloatArray( DataOutput out, float[] array ) throws IOException {\n\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n DataOutputStream dataOut = new DataOutputStream( byteStream );\n\n dataOut.writeInt( array.length );\n for(int i=0; i<array.length; i++)\n dataOut.writeFloat( array[i] );\n dataOut.close();\n\n out.writeInt( byteStream.size() );\n out.write( byteStream.toByteArray() );\n }",
"public static void write(byte[] data, File file, boolean append) throws IOException {\n OutputStream os = null;\n try {\n os = new FileOutputStream(file, append);\n os.write(data);\n os.flush();\n } finally {\n close(os);\n }\n }",
"private static void writeToFile(HighScore[] scoresToSave) throws IOException {\n FileWriter writer = new FileWriter(SCORE_FILE_NAME);\n \n for (int i = 0; i < scoresToSave.length; i++) {\n //Don't write more than the maximum number of scores to save\n if (i > NUMBER_OF_SCORES_TO_SAVE)\n break;\n \n String str = scoresToSave[i].toString();\n writer.write(str);\n writer.write(System.getProperty(\"line.separator\"));\n }\n \n writer.close();\n }"
] |
[
"0.7134464",
"0.6765383",
"0.65795124",
"0.6436172",
"0.6401242",
"0.6193176",
"0.6120976",
"0.60972995",
"0.59564817",
"0.5922213",
"0.58919716",
"0.5890758",
"0.5863325",
"0.58593845",
"0.5800555",
"0.5800125",
"0.5779513",
"0.57745725",
"0.5752953",
"0.57342917",
"0.5724939",
"0.5717436",
"0.5716666",
"0.5649965",
"0.5643801",
"0.5629112",
"0.5626909",
"0.562331",
"0.5619973",
"0.56174153",
"0.5611011",
"0.55882275",
"0.5586054",
"0.55731994",
"0.5571118",
"0.55621964",
"0.55609864",
"0.55562824",
"0.5555916",
"0.55508226",
"0.5537949",
"0.5527688",
"0.5525347",
"0.55197746",
"0.55175024",
"0.55126685",
"0.550249",
"0.54987204",
"0.54970217",
"0.549333",
"0.54916716",
"0.54814845",
"0.5457688",
"0.5431009",
"0.54255116",
"0.5420764",
"0.54065096",
"0.53935015",
"0.5378769",
"0.53746134",
"0.5369472",
"0.5366613",
"0.5349994",
"0.5344367",
"0.5341055",
"0.5333914",
"0.5330231",
"0.5325439",
"0.53135335",
"0.52950764",
"0.52866244",
"0.5278688",
"0.52651024",
"0.5263026",
"0.52619904",
"0.52610976",
"0.52592266",
"0.52512074",
"0.5239837",
"0.52372986",
"0.5230095",
"0.52288795",
"0.52194524",
"0.52097875",
"0.52068883",
"0.5197043",
"0.5193958",
"0.519249",
"0.51879084",
"0.51734585",
"0.5169718",
"0.5164111",
"0.51620805",
"0.5161459",
"0.5157376",
"0.5152601",
"0.5138104",
"0.51204485",
"0.5117803",
"0.5111884"
] |
0.51993424
|
85
|
Write contents on array to an output stream
|
public static void writeOutputStreamContents(OutputStream os, char[] text, String encoding) throws CoreException {
Check.checkArg(os);
Writer writer;
try {
if (encoding != null)
writer = new OutputStreamWriter(os, encoding);
else
writer = new OutputStreamWriter(os);
writeWriterContents(writer, text);
} catch (UnsupportedEncodingException e) {
throw new CoreException(createErrorStatus(e));
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void writeArray(Object o) throws IOException;",
"public void write(ArrayDataOutput out) throws FitsException, IOException;",
"private void writeArrayToFile(Warship[] wsArr, FileOutputStream fos) throws Exception {\n\t\tPrintWriter pw = null;\n\t\ttry {\n\t\t\tpw = new PrintWriter(fos);\n\t\t\tfor (Warship ws : wsArr) {\n\t\t\t\tif (ws != null) {\n\t\t\t\t\tpw.println(ws);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t} finally {\n\t\t\tif (pw != null) {\n\t\t\t\tpw.close();\n\t\t\t}\n\t\t}\n\t}",
"public void writeObjects(Object[] arr) throws IOException\n\t{\n\t\twriteLength(arr.length);\n\t\tfor (final Object a : arr) {\n\t\t\twriteObject(a);\n\t\t}\n\t}",
"@Override\n public void writeCompressed(DataOutput out) throws IOException {\n out.writeInt(length);\n out.write(array);\n }",
"public void writeIntArray(int[] array) throws IOException {\n\t\tfor (int a : array) {\n\t\t\tthis.writeInt(a);\n\t\t}\n\t}",
"public static void writeArray(String fileName, int[] array) throws Exception{\n\n // Create DataOutputStream to create a binary file.\n // Use fileName from Demo file and write from the array\n DataOutputStream output = new DataOutputStream(new FileOutputStream(fileName));\n\n // for each number in array\n for(int i : array) {\n //write the number to the binary file\n output.writeInt(i);\n }\n\n // close the output file\n output.close();\n }",
"void write(final FileWriter outputStream) throws IOException {\n if (array[0] != -1) {\n // Ignore -1 value\n Arrays.stream(array).filter(i -> i >= 0).forEachOrdered(i -> {\n try {\n outputStream.write(toChars(i));\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n });\n\n outputStream.write(\"\\n\");\n }\n }",
"public void write(byte[] buffer);",
"public void writeExternal(ObjectOutput out) throws IOException\n\t{\n\t\tif (SanityManager.DEBUG)\n\t\t{\n\t\t\tSanityManager.ASSERT(array != null, \"Array is null, which isn't expected\");\n\t\t}\n\n\t\tArrayUtil.writeArrayLength(out, array);\n\t\tArrayUtil.writeArrayItems(out, array);\n\t}",
"@Override\n public void write(byte[] data) throws IOException {\n for (int i = 0; i < data.length; i++) {\n write(data[i]);\n }\n }",
"public void write( OutputStream stream, short[] shorts, int offset, int numShorts ) throws IOException\n {\n int limit = offset + numShorts;\n\t\tfor( int i=offset; i<limit; i++ )\n\t\t{\n short sample = shorts[i];\n stream.write( sample >> 8 ); // high byte\n stream.write( sample ); // low byte\n\t\t}\n\t}",
"void writeByteArray(ByteArray array);",
"public void write(byte b[]) throws IOException;",
"public void writeTo(OutputStream arg0) throws IOException {\n\t\t\r\n\t}",
"public abstract void writeToStream(java.io.DataOutputStream output) throws java.io.IOException;",
"@Override\n public void write(byte[] b_array) throws IOException {\n int i;\n int flag = 1;\n int my_decimal1=0;\n for (i = 0; i < 12; i++) {\n out.write(b_array[i]);\n }\n //write to output stream the rest of the bytearray's size - division 8\n int rest = (b_array.length - 12) % 8;\n out.write((byte) rest);\n\n\n while (i < b_array.length) {\n //start to count the number of 0\n if (i < b_array.length - rest) {\n for (int j = 0; j < 8; j++) {\n //check if we not in the rest part of the byte array\n if (i < b_array.length - rest) {\n //my_str = String.valueOf((int)b_array[i]);\n my_decimal1 += (int)b_array[i]*(Math.pow(2, j));\n i++;\n }\n else {\n flag = 0;\n break;\n }\n }\n }\n else{\n flag=0;\n }\n //if the for loop finish without break;\n if (flag == 1) {\n out.write((byte) my_decimal1);\n my_decimal1 = 0;\n }\n else {\n out.write(b_array[i]);\n i++;\n }\n }\n\n //>>\n\n\n }",
"static void writearray(String[]array) {\n\t\t for (int i = 0; i < array.length; i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t}",
"public void write(byte[] buffer){\r\n\t\t\r\n\t\ttry{\r\n\t\t\toOutStream.write(buffer);\r\n\t\t}catch(IOException e){\r\n\t\t\tLog.e(TAG, \"exception during write\", e);\r\n\t\t}\r\n\t}",
"public StreamWriter write(byte[] buffer)\r\n {\r\n \t_stream.write(buffer,0,buffer.length);\r\n\t\treturn this;\r\n }",
"void serializeContents(OutputStream stream, TargetType o) throws IOException {\n val writeVersion = this.versions[getWriteVersion()];\n stream.write(writeVersion.getVersion());\n stream.write(writeVersion.getRevisions().size());\n\n // Write each Revision for this Version, in turn.\n for (val r : writeVersion.getRevisions()) {\n stream.write(r.getRevision());\n try (val revisionOutput = RevisionDataOutputStream.wrap(stream)) {\n r.getWriter().accept(o, revisionOutput);\n }\n }\n }",
"public void write(byte[] b) throws IOException\n {\n for(int i = 0; i < 12; i++) // write the first 12 bytes to the OutPutStream [row, row, column, column, S(r), S(r), S(c), S(c), G(r), G(r), G(c), G(c), ..]\n {\n this.out.write(b[i]);\n }\n int counter = 0;\n String s = \"\";\n int lastIter = 7;\n for(int i = 12; i < b.length; i++)\n {\n s += b[i];\n counter++;\n if((counter == 7) || (i == b.length - 1))\n {\n if(i == b.length - 1)\n {\n lastIter = counter;\n }\n byte binaryByte = (byte)(int)Integer.valueOf(s, 2);\n this.out.write(binaryByte);\n counter = 0;\n s = \"\";\n }\n }\n this.out.write(lastIter);\n }",
"@Override\n public void write(byte[] data, int off, int len) throws IOException {\n for (int i = off; i < len; i++) {\n write(data[i]);\n }\n }",
"public void write(byte[] data, long offset);",
"private static void writeArray(int[] randomArray) {\n\t\tfor (int i = 0; i < randomArray.length; i++) {\r\n\t\t\tSystem.out.print(\" \" + i + \" . eleman :\" + randomArray[i]);\r\n\t\t}\r\n\t}",
"public static void generate(byte[] data, PrintStream output) {\n generate(SparseStream.fromStream(new MemoryStream(data, false), Ownership.None), output);\n }",
"public void write( byte[] array, int firstIndex,\n\t\t\tint count );",
"public void write_to_buffer(byte[] buffer) throws IOException {\r\n ByteArrayOutputStream byte_out = new ByteArrayOutputStream(buffer.length);\r\n DataOutputStream out = new DataOutputStream(byte_out);\r\n\r\n write_to_buffer(out);\r\n\r\n byte[] bytes = byte_out.toByteArray();\r\n for (int i = 0; i < buffer.length; ++i) {\r\n buffer[i] = bytes[i];\r\n }\r\n\r\n out.close();\r\n byte_out.close();\r\n }",
"public void write(byte[] bytes) {\n try {\n mmOutStream.write(bytes);\n } catch (IOException e) { }\n }",
"public void write(byte[] bytes) {\n try {\n mmOutStream.write(bytes);\n } catch (IOException e) { }\n }",
"public void write(byte[] bytes) {\n try {\n mmOutStream.write(bytes);\n } catch (IOException e) { }\n }",
"@Override\n public void write(byte[] buf, int offset, int size) throws IOException;",
"private void writeBuffer( byte b[], int offset, int length) throws IOException\r\n\t{\r\n\t\t// Write the chunk length as a hex number.\r\n\t\tfinal String size = Integer.toHexString(length);\r\n\t\tthis.out.write(size.getBytes());\r\n\t\t// Write a CRLF.\r\n\t\tthis.out.write( CR );\r\n\t\tthis.out.write( LF );\r\n\t\t// Write the data.\r\n\t\tif (length != 0 )\r\n\t\t\tthis.out.write(b, offset, length);\r\n\t\t// Write a CRLF.\r\n\t\tthis.out.write( CR );\r\n\t\tthis.out.write( LF );\r\n\t\t// And flush the real stream.\r\n\t\tthis.out.flush();\r\n\t}",
"@Override\n public void write(byte[] buf) throws IOException;",
"void write(byte b[]) throws IOException;",
"protected void writeDoubleArray( DataOutput out, double[] array ) throws IOException {\n\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n DataOutputStream dataOut = new DataOutputStream( byteStream );\n\n dataOut.writeInt( array.length );\n for(int i=0; i<array.length; i++)\n dataOut.writeDouble( array[i] );\n dataOut.close();\n\n out.writeInt( byteStream.size() );\n out.write( byteStream.toByteArray() );\n }",
"private static void printSortedArray(String outputFileName) {\n try {\n File output = new File(outputFileName);\n BufferedWriter writer = new BufferedWriter(new FileWriter(output));\n for(int i = 0; i < array.length; i++) {\n writer.write(array[i] + \"\\n\");\n }\n writer.close();\n }\n catch(IOException e){\n System.out.println(\"File Error\");\n }\n }",
"public abstract void write(byte[] b);",
"public void write(byte[] bytes) {\n\t\ttry {\n\t\t\tfor(int i=0; i<bytes.length; i++) {\n\t\t\t\tmmOutStream.write(bytes[i] & 0xFF);\t\n\t\t\t}\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"void writeInts(int[] i, int off, int len) throws IOException;",
"void write();",
"@Override\n\tpublic void write(OutStream outStream) {\n\t}",
"public void write(byte[] bytes) {\n\t\t\ttry {\n\t\t\t\tmmOutStream.write(bytes);\n\t\t\t\tmmOutStream.flush();\n\t\t\t} catch (IOException e) { }\n\t\t}",
"@Override\n public void writeExternal(ObjectOutput out) throws IOException {\n out.writeLong(size);\n out.writeInt(batch);\n\n long remaining = size >> 3;\n int step = 1 << 15;\n w.position(0);\n while (remaining > 0) {\n ByteBuffer buffer = ByteBuffer.allocate(step);\n int byteSize = w.read(buffer);\n remaining -= byteSize;\n out.write(buffer.array());\n }\n }",
"@Override\n public void write(final byte[] data) throws IOException {\n write(data, 0, data.length);\n }",
"public void write(String[] buf) throws IOException;",
"protected abstract void writeToExternal(byte[] b, int off, int len) throws IOException;",
"public void writeToFile(byte[] output) {\r\n try {\r\n file.seek(currOffset);\r\n file.write(output);\r\n currOffset += output.length;\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"void writeBytes(byte[] value);",
"public void write(OutputStream arg0) throws IOException {\n\n\t}",
"public void write(char[] cArr) throws XMLStreamException {\n try {\n this.writer.write(cArr);\n } catch (IOException e) {\n throw new XMLStreamException((Throwable) e);\n }\n }",
"public static void writeJsonArray(HttpServletResponse response, JSONArray array) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(array);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"int writeTo(byte[] iStream, int pos, ORecordVersion version);",
"public void write(byte b[], int off, int len) throws IOException;",
"void write(byte[] buffer, int bufferOffset, int length) throws IOException;",
"public void write(byte[] b) throws IOException {\n\t\tbaos.writeBytes(b);\n\t}",
"public abstract void write(DataOutput out) throws IOException;",
"private void write(final byte[] entry) {\n try {\n out.write(entry);\n } catch (final IOException e) {\n throw new CommandExecutionException(\"unable to write entry data to output\"\n + \" stream.\", e);\n }\n }",
"public OutputStream getOutputStream();",
"protected abstract void _write(DataOutput output) throws IOException;",
"public void write(short[] buffer, int offset, int bufLen) throws IOException {\n for(int i = offset; i< offset + bufLen; i++) {\n byte b1 = (byte) (buffer[i] & 0xFF);\n byte b2 = (byte) (buffer[i] >> 8);\n // Log.d(\"PHILIP\", \"writing \" + b1);\n mOutputStream.write(b1);\n // Log.d(\"PHILIP\", \"writing \" + b2);\n mOutputStream.write(b2);\n }\n }",
"private static void writeToBuffer(int index, RandomAccessFile fos) {\n\n try {\n\n // x is the current integer value to be written.\n int x;\n // loc is the current location in the buffer to be written.\n int loc = 0;\n\n // iterates through each value in the sorted integer array.\n for (int k = 0; k < index; k++) {\n // gets the current integer.\n x = ints[k];\n\n // checks if the buffer is full.\n if (loc == BUF_SIZE) {\n // if the buffer is full, write its contents out to the file.\n fos.write(buf);\n // the buffer has been emptied, so set its current location back to the start.\n loc = 0;\n }\n\n // convert the current integer value to be written to a byte array.\n buf[loc] = (byte) (x >> 24);\n buf[loc + 1] = (byte) (x >> 16);\n buf[loc + 2] = (byte) (x >> 8);\n buf[loc + 3] = (byte) (x);\n\n // increment the location in the buffer now that a value has been written in.\n loc += BYTES_TO_INTS;\n }\n\n if (loc > 0) {\n // if there are any values left over in the buffer, write them out to the file.\n fos.write(buf, 0, loc);\n\n }\n } catch (IOException e){\n e.printStackTrace();\n }\n }",
"public void writeObject(RandomAccessFile arq) throws IOException{\n byte[] dados = this.getByteArray();\n arq.writeChar(' ');\n arq.writeShort(dados.length);\n arq.write(dados);\n }",
"protected void writeFloatArray( DataOutput out, float[] array ) throws IOException {\n\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n DataOutputStream dataOut = new DataOutputStream( byteStream );\n\n dataOut.writeInt( array.length );\n for(int i=0; i<array.length; i++)\n dataOut.writeFloat( array[i] );\n dataOut.close();\n\n out.writeInt( byteStream.size() );\n out.write( byteStream.toByteArray() );\n }",
"int writeTo(OutputStream out) throws IOException;",
"public void writeOutput() {\n // Create json object to be written\n Map<String, Object> jsonOutput = new LinkedHashMap<>();\n // Get array of json output objects for consumers\n List<Map<String, Object>> jsonConsumers = writeConsumers();\n // Add array for consumers to output object\n jsonOutput.put(Constants.CONSUMERS, jsonConsumers);\n // Get array of json output objects for distributors\n List<Map<String, Object>> jsonDistributors = writeDistributors();\n // Add array for distributors to output objects\n jsonOutput.put(Constants.DISTRIBUTORS, jsonDistributors);\n // Get array of json output objects for producers\n List<Map<String, Object>> jsonProducers = writeProducers();\n // Add array for producers to output objects\n jsonOutput.put(Constants.ENERGYPRODUCERS, jsonProducers);\n // Write to output file and close\n try {\n ObjectMapper mapper = new ObjectMapper();\n ObjectWriter writer = mapper.writer(new DefaultPrettyPrinter());\n writer.writeValue(Paths.get(outFile).toFile(), jsonOutput);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public static void generate(byte[] data, int offset, int count, PrintStream output) {\n byte[] tempBuffer = new byte[count];\n System.arraycopy(data, offset, tempBuffer, 0, count);\n generate(SparseStream.fromStream(new MemoryStream(tempBuffer, false), Ownership.None), output);\n }",
"public boolean write(byte[] bytes, int offset, int size) {\n System.arraycopy(bytes, offset, outputData, curIndex, size);\n curIndex += size;\n return true;\n }",
"private void writeline(String ... args) {\r\n\t\twriteArrayToLine(args);\r\n\t}",
"public static void WriteToFile(){\r\n try {\r\n File file = new File(\"output.txt\");\r\n file.createNewFile();\r\n \r\n FileWriter fw = new FileWriter(file.getAbsoluteFile());\r\n BufferedWriter bw = new BufferedWriter(fw);\r\n String[] FinalBoard = new String[Board.ReportBoardValues().length];\r\n FinalBoard = Board.ReportBoardValues();\r\n for(int i = 0; i < Board.ReportBoardValues().length; i++){\r\n bw.write(FinalBoard[i]);\r\n bw.newLine();\r\n }\r\n bw.close();\r\n fw.close();\r\n \r\n }\r\n catch (IOException e) {\r\n System.out.println (\"Output error\");\r\n }\r\n }",
"private static void writeToFile(String[] writeStringArr, String outputFileName){\n BufferedWriter outputBuffer = null;\n try{\n File outputFile = new File(outputFileName);\n if(!outputFile.exists()){\n outputFile.createNewFile();\n }\n\n outputBuffer = new BufferedWriter(new FileWriter(outputFile)); //create buffered reader\n// outputBuffer.write(writeString);\n\n for(int i=0; i< writeStringArr.length; i++){\n outputBuffer.write(writeStringArr[i]);\n outputBuffer.newLine();\n }\n } catch (IOException e){System.err.println(\"Error Writing File\");}\n finally {\n try {\n outputBuffer.close();\n }catch (IOException e){System.err.println(\"Error Closing File\");}\n }\n }",
"String write(byte[] content, boolean noPin);",
"@Override\r\n\tpublic void write() {\n\t\t\r\n\t}",
"public void writeTo(OutputStream os) throws IOException, MessagingException {\n/* 96 */ LineOutputStream los = null;\n/* 97 */ if (os instanceof LineOutputStream) {\n/* 98 */ los = (LineOutputStream)os;\n/* */ } else {\n/* 100 */ los = new LineOutputStream(os);\n/* */ } \n/* */ \n/* */ \n/* 104 */ Enumeration hdrLines = getAllHeaderLines();\n/* 105 */ while (hdrLines.hasMoreElements()) {\n/* 106 */ los.writeln(hdrLines.nextElement());\n/* */ }\n/* */ \n/* 109 */ los.writeln();\n/* */ \n/* */ \n/* 112 */ getDataHandler().writeTo(os);\n/* 113 */ os.flush();\n/* */ }",
"public void write(byte b[]) throws IOException {\n baos.write(b, 0, b.length);\n }",
"public StreamWriter write(byte[] buffer, int offset, int size)\r\n {\r\n _stream.write(buffer,offset,size);\r\n return this;\r\n }",
"private int writeBytesMultiple(ChannelOutboundBuffer in, IovArray array) throws IOException {\n/* 311 */ long expectedWrittenBytes = array.size();\n/* 312 */ assert expectedWrittenBytes != 0L;\n/* 313 */ int cnt = array.count();\n/* 314 */ assert cnt != 0;\n/* */ \n/* 316 */ long localWrittenBytes = this.socket.writevAddresses(array.memoryAddress(0), cnt);\n/* 317 */ if (localWrittenBytes > 0L) {\n/* 318 */ adjustMaxBytesPerGatheringWrite(expectedWrittenBytes, localWrittenBytes, array.maxBytes());\n/* 319 */ in.removeBytes(localWrittenBytes);\n/* 320 */ return 1;\n/* */ } \n/* 322 */ return Integer.MAX_VALUE;\n/* */ }",
"private static void writeOutput (int[][] outData) {\r\n\t\tString outFile = \"Input_\" + outData.length + \".txt\";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tFile fileLocation = new File(outFile);\t\t\r\n\t\t\tPrintWriter Writer = new PrintWriter(fileLocation, \"UTF-8\");\t\r\n\t\t\tfor (int i = 0; i < outData.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < outData[i].length; j++) {\r\n\t\t\t\t\tif (outData[i][j] == INFINITY) {\r\n\t\t\t\t\t\tWriter.print(\"NA\");\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tWriter.print(outData[i][j]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (j != outData[i].length - 1) {\r\n\t\t\t\t\t\tWriter.print(\"\\t\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tWriter.println();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tWriter.close();\r\n\t\t} catch (Exception ex) {\r\n System.out.println(ex.toString()); \r\n\t\t}\r\n\t}",
"public void write(byte b[]) throws IOException\n {\n checkThreshold(b.length);\n getStream().write(b);\n written += b.length;\n }",
"void generateContent(OutputStream output) throws Exception;",
"private void outputToFile() {\n\t\tPath filePath = Paths.get(outputFile);\n\n\t\ttry (BufferedWriter writer = Files.newBufferedWriter(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tRowIterator iterator = currentGen.iterateRows();\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tElemIterator elem = iterator.next();\n\t\t\t\twhile (elem.hasNext()) {\n\t\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\t\twriter.write(mElem.rowIndex() + \",\" + mElem.columnIndex());\n\t\t\t\t\twriter.newLine();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Unable to write to the provided file\");\n\t\t}\n\n\t}",
"public abstract void writeToStream(DataOutputStream dataOutputStream);",
"public void writeStartArray()\n/* */ throws IOException\n/* */ {\n/* 217 */ _verifyValueWrite(\"start an array\");\n/* 218 */ this._writeContext = this._writeContext.createChildArrayContext();\n/* 219 */ if (this._cfgPrettyPrinter != null) {\n/* 220 */ this._cfgPrettyPrinter.writeStartArray(this);\n/* */ } else {\n/* 222 */ if (this._outputTail >= this._outputEnd) {\n/* 223 */ _flushBuffer();\n/* */ }\n/* 225 */ this._outputBuffer[(this._outputTail++)] = '[';\n/* */ }\n/* */ }",
"private void writeArrayToLine(String[ ] args) {\r\n\t\tStringBuilder buf = new StringBuilder();\r\n\t\tif (args.length>0) buf.append(args[0]);\r\n\t\tint k = 1;\r\n\t\twhile(k < args.length) buf.append(delim).append(args[k++]);\r\n\t\tout.println(buf.toString());\r\n\t}",
"OutputStream getOutputStream();",
"static public void writeVectorArray(PrintWriter writer, double[] vector) {\r\n writer.println(vector.length);\r\n for (double v : vector) {\r\n writer.println(Double.toString(v));\r\n }\r\n }",
"public void write(int ints) {\n try {\n mOutStream.writeInt(ints);\n Log.i(\"TRANSFER\", \"wrote \" + ints);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void write(DataOutput out) throws IOException {\n\t\tout.writeInt(bytes);\n\t\tout.write(buffer);\t\t\n\t}",
"public void write(char[] charArray, int offset, int length) throws IOException{\r\n if(closed){\r\n throw new IOException(\"The stream is not open.\");\r\n }\r\n getBuffer().append(charArray, offset, length);\r\n }",
"void tickHostWrite(INDArray array);",
"public OutputStream getOutputStream() {\n return new BufferedOutputStream(new OutputStream() {\n public void write(int b) throws IOException {\n _combinedOutputStream.write(b);\n }\n public void flush() throws IOException {\n _combinedOutputStream.flush();\n }\n public void close() throws IOException {\n _combinedOutputStream.close();\n }\n });\n }",
"public void write(String[] buf, int offset, int size) throws IOException;",
"@Override\n public void write() {\n\n }",
"@DSSink({DSSinkKind.IO})\n @DSSpec(DSCat.IO)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-09-03 14:59:52.266 -0400\", hash_original_method = \"E4B5E15EBD1DC0F51B6909882AA2B9D3\", hash_generated_method = \"F2EA6D6D1EB28486AFF7B8C18D6CD1F3\")\n \n@Override\r\n public void write(byte[] bts) throws IOException {\r\n try {\r\n int len = bts != null ? bts.length : 0;\r\n beforeWrite(len);\r\n out.write(bts);\r\n afterWrite(len);\r\n } catch (IOException e) {\r\n handleIOException(e);\r\n }\r\n }",
"public void writeFile(String[] results) {\n\t\ttry {\n\t\t\tFile file = new File(outputFile);\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\n\t\t\tfor(int i = 0; i < results.length; i++) {\n\t\t\t\tString[] tuple = testTuples.get(i);\n\t\t\t\t// convert String[] to String\n\t\t\t\tString tupleString = \"\";\n\t\t\t\tfor(int j = 0; j < tuple.length; j++) {\n\t\t\t\t\ttupleString += tuple[j] + \",\";\n\t\t\t\t}\n\t\t\t\twriter.write(tupleString + results[i] + \"\\n\");\n\t\t\t}\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public void write(final byte[] b) throws IOException {\n\t\twrite(b, 0, b.length);\n\t}",
"public static void write(@Nullable final byte[] data, final OutputStream output)\n throws IOException {\n if (data != null) {\n output.write(data);\n }\n }",
"void write(StreamOption streamOpt);",
"public interface ObjectOutput extends DataOutput, AutoCloseable {\n /**\n * Write an object to the underlying storage or stream. The class that implements this interface\n * defines how the object is written.\n *\n * @param obj the object to be written\n * @exception IOException Any of the usual Input/Output related exceptions.\n */\n public void writeObject(Object obj) throws IOException;\n\n /**\n * Writes a byte. This method will block until the byte is actually written.\n * \n * @param b the byte\n * @exception IOException If an I/O error has occurred.\n */\n public void write(int b) throws IOException;\n\n /**\n * Writes an array of bytes. This method will block until the bytes are actually written.\n * \n * @param b the data to be written\n * @exception IOException If an I/O error has occurred.\n */\n public void write(byte b[]) throws IOException;\n\n /**\n * Writes a sub array of bytes.\n * \n * @param b the data to be written\n * @param off the start offset in the data\n * @param len the number of bytes that are written\n * @exception IOException If an I/O error has occurred.\n */\n public void write(byte b[], int off, int len) throws IOException;\n\n /**\n * Flushes the stream. This will write any buffered output bytes.\n * \n * @exception IOException If an I/O error has occurred.\n */\n public void flush() throws IOException;\n\n /**\n * Closes the stream. This method must be called to release any resources associated with the\n * stream.\n * \n * @exception IOException If an I/O error has occurred.\n */\n public void close() throws IOException;\n}",
"public void write_to_buffer(DataOutputStream out) throws IOException\r\n {\r\n for (int i = 0; i < 2*dimension; ++i)\r\n out.writeFloat(bounces[i]);\r\n out.writeInt(son);\r\n out.writeInt(num_of_data);\r\n }",
"private void writeToConsole(IOConsoleOutputStream stream, String output){\n try {\n stream.write(output);\n } catch (IOException e) {\n OPIBuilderPlugin.getLogger().log(Level.WARNING, \"Write Console error\",e); //$NON-NLS-1$\n }\n }"
] |
[
"0.7113603",
"0.69969493",
"0.6509373",
"0.6499473",
"0.63814414",
"0.6357646",
"0.6251949",
"0.6250746",
"0.6198964",
"0.61801815",
"0.611326",
"0.6113229",
"0.61059076",
"0.6104022",
"0.60724795",
"0.6066039",
"0.60616744",
"0.6051643",
"0.60404485",
"0.59957516",
"0.59944785",
"0.5985081",
"0.5967823",
"0.59601665",
"0.59487224",
"0.59206873",
"0.591784",
"0.5915393",
"0.5912749",
"0.5912749",
"0.5912749",
"0.59105694",
"0.59034085",
"0.5866075",
"0.58639985",
"0.58522964",
"0.58518195",
"0.584949",
"0.58262527",
"0.5812198",
"0.5806888",
"0.57929254",
"0.57850236",
"0.5751168",
"0.5747952",
"0.57252276",
"0.5709332",
"0.57062024",
"0.5697389",
"0.56969523",
"0.5691836",
"0.5687527",
"0.56814426",
"0.5679224",
"0.56704336",
"0.566724",
"0.5657477",
"0.5654261",
"0.5638941",
"0.56372786",
"0.5622033",
"0.56194144",
"0.5613323",
"0.5612326",
"0.5609089",
"0.56016976",
"0.5600115",
"0.5588321",
"0.55798537",
"0.5577186",
"0.5545187",
"0.55433816",
"0.5542492",
"0.5542212",
"0.5540943",
"0.55290455",
"0.55169827",
"0.5514745",
"0.55070716",
"0.5506629",
"0.550656",
"0.5505409",
"0.54886156",
"0.5474881",
"0.5459291",
"0.54487747",
"0.54379886",
"0.54323137",
"0.5431972",
"0.54310894",
"0.54233307",
"0.542193",
"0.5417103",
"0.5409294",
"0.5403188",
"0.5400483",
"0.5399041",
"0.5396489",
"0.5394954",
"0.5374342",
"0.5372742"
] |
0.0
|
-1
|
Write contents of an array to a file
|
public static void writeWriterContents(Writer writer, char[] text) throws CoreException {
Check.checkArg(writer);
try {
try {
writer.write(text, 0, text.length);
} finally {
writer.close();
}
} catch (UnsupportedEncodingException e) {
throw new CoreException(createErrorStatus(e));
} catch (IOException e) {
throw new CoreException(createErrorStatus(e));
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static void writeArray(String fileName, int[] array) throws Exception{\n\n // Create DataOutputStream to create a binary file.\n // Use fileName from Demo file and write from the array\n DataOutputStream output = new DataOutputStream(new FileOutputStream(fileName));\n\n // for each number in array\n for(int i : array) {\n //write the number to the binary file\n output.writeInt(i);\n }\n\n // close the output file\n output.close();\n }",
"private void writeArrayToFile(Warship[] wsArr, FileOutputStream fos) throws Exception {\n\t\tPrintWriter pw = null;\n\t\ttry {\n\t\t\tpw = new PrintWriter(fos);\n\t\t\tfor (Warship ws : wsArr) {\n\t\t\t\tif (ws != null) {\n\t\t\t\t\tpw.println(ws);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t} finally {\n\t\t\tif (pw != null) {\n\t\t\t\tpw.close();\n\t\t\t}\n\t\t}\n\t}",
"public void writeArray(Object o) throws IOException;",
"public static void writeFile(File file, String[] arr) throws FileNotFoundException {\r\n System.out.println(\"writing file\");\r\n PrintWriter writer = new PrintWriter(file); // create writer\r\n String temp = \"\"; // use to compare\r\n int count;\r\n\r\n for (int i = 0; i < arr.length; i++) // start from beginning of the array\r\n {\r\n if (arr[i].equals(temp) && i != 0) // if arr[i] is same as before != 0 for write the first element\r\n continue; // skip\r\n else {\r\n temp = arr[i];\r\n count = count(arr, arr[i], i); // count number of time appear\r\n writer.printf(\"%-15s %5d %n\", temp, count); // write into file\r\n }\r\n }\r\n writer.close(); // write into hard disk\r\n }",
"public void writeFile(String[] results) {\n\t\ttry {\n\t\t\tFile file = new File(outputFile);\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\n\t\t\tfor(int i = 0; i < results.length; i++) {\n\t\t\t\tString[] tuple = testTuples.get(i);\n\t\t\t\t// convert String[] to String\n\t\t\t\tString tupleString = \"\";\n\t\t\t\tfor(int j = 0; j < tuple.length; j++) {\n\t\t\t\t\ttupleString += tuple[j] + \",\";\n\t\t\t\t}\n\t\t\t\twriter.write(tupleString + results[i] + \"\\n\");\n\t\t\t}\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"private static void writeToFile(String[] writeStringArr, String outputFileName){\n BufferedWriter outputBuffer = null;\n try{\n File outputFile = new File(outputFileName);\n if(!outputFile.exists()){\n outputFile.createNewFile();\n }\n\n outputBuffer = new BufferedWriter(new FileWriter(outputFile)); //create buffered reader\n// outputBuffer.write(writeString);\n\n for(int i=0; i< writeStringArr.length; i++){\n outputBuffer.write(writeStringArr[i]);\n outputBuffer.newLine();\n }\n } catch (IOException e){System.err.println(\"Error Writing File\");}\n finally {\n try {\n outputBuffer.close();\n }catch (IOException e){System.err.println(\"Error Closing File\");}\n }\n }",
"void writeByteArray(ByteArray array);",
"public void writeObjects(Object[] arr) throws IOException\n\t{\n\t\twriteLength(arr.length);\n\t\tfor (final Object a : arr) {\n\t\t\twriteObject(a);\n\t\t}\n\t}",
"public void writeToFile(byte[] output) {\r\n try {\r\n file.seek(currOffset);\r\n file.write(output);\r\n currOffset += output.length;\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public void writeIntArray(int[] array) throws IOException {\n\t\tfor (int a : array) {\n\t\t\tthis.writeInt(a);\n\t\t}\n\t}",
"public static void write(byte[] data, File file) throws IOException {\n write(data, file, false);\n }",
"static void writearray(String[]array) {\n\t\t for (int i = 0; i < array.length; i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t}",
"private static void printSortedArray(String outputFileName) {\n try {\n File output = new File(outputFileName);\n BufferedWriter writer = new BufferedWriter(new FileWriter(output));\n for(int i = 0; i < array.length; i++) {\n writer.write(array[i] + \"\\n\");\n }\n writer.close();\n }\n catch(IOException e){\n System.out.println(\"File Error\");\n }\n }",
"private void writeDataToFile(char[] charArr, String filePath) {\n try {\n\n File outputFile = new File(filePath);\n\n if (sentencesProcessed == 1 || isMetricsFilePath) {\n outputFile.delete();\n outputFile.createNewFile();\n }\n\n FileWriter outputFileWrtrObj = new FileWriter(outputFile, true);\n\n for (char ch : charArr) {\n outputFileWrtrObj.write(ch);\n }\n\n outputFileWrtrObj.close();\n\n } catch (Exception e) {\n System.out.println(utilityConstants.LINE_SEPARATOR);\n System.err.println(utilityConstants.FILE_WRITING_ERROR_MSG);\n e.printStackTrace();\n System.exit(0);\n\n }\n }",
"public static void WriteToFile(){\r\n try {\r\n File file = new File(\"output.txt\");\r\n file.createNewFile();\r\n \r\n FileWriter fw = new FileWriter(file.getAbsoluteFile());\r\n BufferedWriter bw = new BufferedWriter(fw);\r\n String[] FinalBoard = new String[Board.ReportBoardValues().length];\r\n FinalBoard = Board.ReportBoardValues();\r\n for(int i = 0; i < Board.ReportBoardValues().length; i++){\r\n bw.write(FinalBoard[i]);\r\n bw.newLine();\r\n }\r\n bw.close();\r\n fw.close();\r\n \r\n }\r\n catch (IOException e) {\r\n System.out.println (\"Output error\");\r\n }\r\n }",
"public void writeTextFile(int[][] a, int n) {\n\t\ttry {\n\t\t\twriter = new PrintWriter(new BufferedWriter(new FileWriter(filename,true)));\n\t\t\twriter.print(\"_|_\");\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\twriter.print(i + 1 + \"_\");\n\t\t\twriter.println();\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\twriter.print(i + 1 + \"| \");\n\t\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\twriter.print(a[i][j] + \" \");\n\t\t\t\t}\n\t\t\t\twriter.println();\n\t\t\t}\n\t\t\twriter.println();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not write to\\t\\\"\" + filename + \"\\\"\");\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\twriter.close();\n\t\t}\n\t\t\n\t}",
"public void writeToFile() {\n try {\n // stworz plik\n File file = new File(\"../Alice.ids\");\n // stworz bufor zapisu do pliku\n FileWriter fileWriter = new FileWriter(file);\n for(int i = 0; i < identificationNumbers.length; i++) {\n for(int j = 0; j < identificationNumbers[i].length; j++)\n fileWriter.write(Integer.toString(identificationNumbers[i][j]));\n\t\t\t fileWriter.write(\"\\n\");\n }\n\t\t\tfileWriter.flush();\n\t\t\tfileWriter.close();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }",
"public static void writeSortedArrayToFile(String[] lines, int linesLength, String fileName) {\n File outFile = new File(fileName);\n FileWriter outFileWriter = null;\n\n try {\n outFileWriter = new FileWriter(outFile);\n\n for (int i = 0; i < linesLength; i++)\n outFileWriter.append(lines[i] + \"\\n\");\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n outFileWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"public static void writeBytesToFile(byte[] bytes, File outputFile) {\n try (FileOutputStream outputFileStream = new FileOutputStream(outputFile)) {\n outputFileStream.write(bytes);\n } catch (IOException e) {\n throw new UncheckedIOException(\"Could not write file \" + outputFile, e);\n }\n }",
"public void write(byte b[]) throws IOException;",
"void write(final FileWriter outputStream) throws IOException {\n if (array[0] != -1) {\n // Ignore -1 value\n Arrays.stream(array).filter(i -> i >= 0).forEachOrdered(i -> {\n try {\n outputStream.write(toChars(i));\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n });\n\n outputStream.write(\"\\n\");\n }\n }",
"public void addOn(ArrayList array) {\n try {\n PrintWriter writer;\n if (array.get(0) instanceof Integer)\n writer = new PrintWriter(\"points.txt\");\n else writer = new PrintWriter(\"names.txt\");\n\n for (int i=0; i<array.size(); i++)\n writer.println(array.get(i));\n writer.close();\n } catch (IOException e)\n {}\n }",
"public void write(ArrayDataOutput out) throws FitsException, IOException;",
"public static void writeFile(ArrayList<Integer> data, String path) {\n\t\ttry {\n\t\t\tFileOutputStream fos = new FileOutputStream(path);\n\t\t\tOutputStreamWriter osw = new OutputStreamWriter(fos);\n\t\t\tBufferedWriter bw = new BufferedWriter(osw);\n\n//\t\t\tfor (String dt : data) {\n//\t\t\t\tbw.write(dt);\n//\t\t\t\tbw.newLine();\n//\t\t\t}\n\n\t\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\t\tbw.write(data.get(i).toString());\n\t\t\t\tif (i < data.size() - 1)\n\t\t\t\t\tbw.write(\", \");\n\n\t\t\t\t// bw.newLine();\n\t\t\t}\n\t\t\tbw.newLine();\n\t\t\tbw.close();\n\t\t\tosw.close();\n\t\t\tfos.close();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void write(String[] buf) throws IOException;",
"private static void writeToBuffer(int index, RandomAccessFile fos) {\n\n try {\n\n // x is the current integer value to be written.\n int x;\n // loc is the current location in the buffer to be written.\n int loc = 0;\n\n // iterates through each value in the sorted integer array.\n for (int k = 0; k < index; k++) {\n // gets the current integer.\n x = ints[k];\n\n // checks if the buffer is full.\n if (loc == BUF_SIZE) {\n // if the buffer is full, write its contents out to the file.\n fos.write(buf);\n // the buffer has been emptied, so set its current location back to the start.\n loc = 0;\n }\n\n // convert the current integer value to be written to a byte array.\n buf[loc] = (byte) (x >> 24);\n buf[loc + 1] = (byte) (x >> 16);\n buf[loc + 2] = (byte) (x >> 8);\n buf[loc + 3] = (byte) (x);\n\n // increment the location in the buffer now that a value has been written in.\n loc += BYTES_TO_INTS;\n }\n\n if (loc > 0) {\n // if there are any values left over in the buffer, write them out to the file.\n fos.write(buf, 0, loc);\n\n }\n } catch (IOException e){\n e.printStackTrace();\n }\n }",
"public static void saveVectorsToFile(double [][] inputArray, String filename) throws IOException {\n StringBuilder vectors = new StringBuilder();\n for (int i = 0; i < inputArray.length; i++) {\n for (int j = 0; j < inputArray[0].length; j++) {\n vectors.append(inputArray[i][j] + \"\");\n if (j < inputArray.length - 1)\n vectors.append(\",\");\n }\n vectors.append(\"\\n\");\n }\n BufferedWriter writer = new BufferedWriter(new FileWriter(filename));\n writer.write(vectors.toString());\n writer.close();\n }",
"public void writeBinaryArr(byte[] bytes, String filename, String dest) throws IOException {\n\t\tConfiguration conf = this.getConfig();\r\n\r\n\t\tFileSystem fileSystem = FileSystem.get(conf);\r\n\t\t// Create the destination path including the filename.\r\n\t\tif (dest.charAt(dest.length() - 1) != '/') {\r\n\t\t\tdest = dest + \"/\" + filename;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdest = dest + filename;\r\n\t\t}\r\n\r\n\t\t// Check if the file already exists\r\n\t\tPath path = new Path(dest);\r\n\t\tif (fileSystem.exists(path)) {\r\n\t\t\tSystem.out.println(\"File \" + dest + \" already exists\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Create a new file and write data to it.\r\n\t\tFSDataOutputStream out = fileSystem.create(path);\r\n\r\n\t\tout.write(bytes);\r\n\t\tout.close();\r\n\t}",
"void writeFloats(float[] f, int off, int len) throws IOException;",
"public synchronized static void write(double[] xxx,String fileName){\n\t\ttry{\n\t\t \tFileOutputStream fos = new FileOutputStream(fileName);\n\t\t \tDataOutputStream dos = new DataOutputStream(fos);\n\t\t\t\n\t\t\tfor(double x:xxx)\n\t\t\t\tdos.writeDouble(x);\n\t\t\tdos.close();\n\t\t\tfos.close();\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t}",
"public void writeByteArrayToFile(byte[] aByteArray, String targetFilename)\r\n\tthrows FileNotFoundException, IOException {\r\n\t\tByteArrayInputStream theTargetInputStream = new ByteArrayInputStream(\r\n\t\t\t\taByteArray);\r\n\t\tFileOutputStream theFileOutputStream = new FileOutputStream(\r\n\t\t\t\ttargetFilename);\r\n\t\tcopyStreamContent(theTargetInputStream, theFileOutputStream);\r\n\t\ttheFileOutputStream.close();\r\n\t\ttheTargetInputStream.close();\r\n\t}",
"static void writeFile(final PropertyArray data, final String file, boolean prettyPrint) throws IOException {\n if(data == null || data.isEmpty() || file == null || file.isEmpty())\n throw new IOException(\"data or file path is null or empty.\");\n\n if(prettyPrint) {\n writeFile(data, file, 2);\n return;\n }\n\n writeFile(data, file, 0);\n }",
"public static void saveAvgValuesToFile(double [] inputArray, String filename) throws IOException {\n StringBuilder avgValues = new StringBuilder();\n for (int i = 0; i < inputArray.length; i++) {\n avgValues.append(inputArray[i] + \"\");\n avgValues.append(\",\");\n avgValues.append(\"\\n\");\n }\n BufferedWriter writer = new BufferedWriter(new FileWriter(filename));\n writer.write(avgValues.toString());\n writer.close();\n }",
"private void saveInFile(final String fileName, ArrayList<Habit> habitArray) {\r\n try {\r\n FileOutputStream fos = openFileOutput(fileName, 0);\r\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos));\r\n Gson gson = new Gson();\r\n gson.toJson(habitArray, out);\r\n out.flush();\r\n\r\n fos.close();\r\n } catch (FileNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n throw new RuntimeException();\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n throw new RuntimeException();\r\n }\r\n }",
"static void writeStudentsToFile(Student[] students, String filename) {\n\t\ttry (FileWriter out = new FileWriter(filename)) {\n\n\t\t\tfor (Student s : students)\n\t\t\t\tout.write(s.toString() + \"\\n\");\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"void writeInts(int[] i, int off, int len) throws IOException;",
"private static void writeArray(int[] randomArray) {\n\t\tfor (int i = 0; i < randomArray.length; i++) {\r\n\t\t\tSystem.out.print(\" \" + i + \" . eleman :\" + randomArray[i]);\r\n\t\t}\r\n\t}",
"void write(byte b[]) throws IOException;",
"public void write(byte[] buffer);",
"public void writeToFile(String fileName){\r\n try (Writer bfwriter = new BufferedWriter(new OutputStreamWriter(\r\n new FileOutputStream(fileName), \"utf-8\"))) {\r\n bfwriter.write(array2CSV());\r\n }\r\n catch(IOException e){\r\n e.printStackTrace();\r\n }\r\n }",
"private void writeToFile() {\n try {\n FileOutputStream fos = new FileOutputStream(f);\n String toWrite = myJSON.toString(4);\n byte[] b = toWrite.getBytes();\n fos.write(b);\n fos.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private static void writeToFile(HighScore[] scoresToSave) throws IOException {\n FileWriter writer = new FileWriter(SCORE_FILE_NAME);\n \n for (int i = 0; i < scoresToSave.length; i++) {\n //Don't write more than the maximum number of scores to save\n if (i > NUMBER_OF_SCORES_TO_SAVE)\n break;\n \n String str = scoresToSave[i].toString();\n writer.write(str);\n writer.write(System.getProperty(\"line.separator\"));\n }\n \n writer.close();\n }",
"void writeBytes(byte[] value);",
"public static void createFile(double[] array){\n //String for the name of the file that's going to be created.\n String newFileName = \"results.csv\";\n\n //Create a file variable using the created file name\n try{\n File newFile = new File(newFileName);\n\n //Create new instance of PrintWriter to write into the new file\n FileWriter csvWriter = new FileWriter(newFile, false);\n //For each number, print the percentage into the file\n for(int i = 0; i < 9; i++){\n csvWriter.write((i+1) + \": \" + array[i] + \"%\\n\");\n }\n //Close the PrintWriter since we don't need it anymore.\n csvWriter.close();\n }\n catch(FileNotFoundException e){\n System.out.println(\"File not found\");\n }\n catch(IOException e){\n System.out.println(\"IO Exception\");\n }\n }",
"private void chatSave() {\n try{\n //create a text file to write the chatList to\n PrintStream print =\n new PrintStream(new FileOutputStream(\"log.txt\", true));\n //write each line of the array to the file \n for (String str:chatList)\n print.println(str);\n //once each record has been written to the file, close it.\n print.close();\n } catch (IOException e) {\n // exception handling\n }\n }",
"public void write(byte[] b) throws IOException {\n\t\tbaos.writeBytes(b);\n\t}",
"private static void writeText(FileWriter outputStream, TextArray textArray, TextArray pTextArray) throws IOException {\n if (pTextArray.compareTo(textArray) != 0) {\n textArray.write(outputStream);\n pTextArray.clone(textArray); // Update the previously save word for comparison in next turn\n }\n }",
"private static void writeToOutput(String path, Apriori apriori){\n try{\n BufferedWriter output = new BufferedWriter(new FileWriter(path, false));\n for (String s : apriori.mItemSet){\n output.write(s);\n }\n output.close();\n } catch (IOException e){\n e.printStackTrace();\n }\n }",
"protected void writeFloatArray( DataOutput out, float[] array ) throws IOException {\n\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n DataOutputStream dataOut = new DataOutputStream( byteStream );\n\n dataOut.writeInt( array.length );\n for(int i=0; i<array.length; i++)\n dataOut.writeFloat( array[i] );\n dataOut.close();\n\n out.writeInt( byteStream.size() );\n out.write( byteStream.toByteArray() );\n }",
"public void write(byte[] data, long offset);",
"public static void GuardaArchivoChips(ArrayList<Chip> ArrayChips) throws FileNotFoundException, IOException {\n File f = new File(\"Archivos/chips1.txt\");\n FileWriter fw = new FileWriter(f, false);\n BufferedWriter bw = new BufferedWriter(fw);\n for (Chip objChip : ArrayChips) { //RECORRER EL ARRAY LIST Y GRABAR POR CADA OBJETO\n bw.write(objChip.getNumero() + \",\");\n bw.write(objChip.getActivo() + \",\");\n bw.write(objChip.getSaldo() + \",\");\n bw.write(objChip.getMegas() + \",\");\n bw.write(objChip.getCliente().getCedula() + \",\");\n\n }\n bw.close();\n fw.close();\n }",
"protected void writeDoubleArray( DataOutput out, double[] array ) throws IOException {\n\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n DataOutputStream dataOut = new DataOutputStream( byteStream );\n\n dataOut.writeInt( array.length );\n for(int i=0; i<array.length; i++)\n dataOut.writeDouble( array[i] );\n dataOut.close();\n\n out.writeInt( byteStream.size() );\n out.write( byteStream.toByteArray() );\n }",
"public void fileOutput(String[][] arrOfstr, String fileName){\n try (Formatter output = new Formatter(fileName)) {\n //loop through 2d array and output it to text file\n for (int counter2 = 0; counter2 < 3; counter2++) {\n for (int counter3 = 0; counter3 < arrOfstr[counter2].length; counter3++) {\n output.format(\"%s \", arrOfstr[counter2][counter3]);\n }\n output.format(\"%n\");\n }\n //catch if file not found\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }",
"public void writer(List<String> toStore) throws IOException{\n //creates writer and clears file\n PrintWriter writer = new PrintWriter(\"output.txt\", \"UTF-8\");\n //for each loop to store all the values in the file into the file named output.txt\n for(String s : toStore)\n //stores the strings for outputting\n writer.println(s);\n //closes the writer and outputs to the file\n writer.close();\n }",
"@Override\n public void write(byte[] b_array) throws IOException {\n int i;\n int flag = 1;\n int my_decimal1=0;\n for (i = 0; i < 12; i++) {\n out.write(b_array[i]);\n }\n //write to output stream the rest of the bytearray's size - division 8\n int rest = (b_array.length - 12) % 8;\n out.write((byte) rest);\n\n\n while (i < b_array.length) {\n //start to count the number of 0\n if (i < b_array.length - rest) {\n for (int j = 0; j < 8; j++) {\n //check if we not in the rest part of the byte array\n if (i < b_array.length - rest) {\n //my_str = String.valueOf((int)b_array[i]);\n my_decimal1 += (int)b_array[i]*(Math.pow(2, j));\n i++;\n }\n else {\n flag = 0;\n break;\n }\n }\n }\n else{\n flag=0;\n }\n //if the for loop finish without break;\n if (flag == 1) {\n out.write((byte) my_decimal1);\n my_decimal1 = 0;\n }\n else {\n out.write(b_array[i]);\n i++;\n }\n }\n\n //>>\n\n\n }",
"public final boolean writeToFile(byte[] bArr) {\n boolean z;\n VEssayLogUtil bVar;\n StringBuilder sb;\n File downloadTempFile;\n C32569u.m150519b(bArr, C6969H.m41409d(\"G6896D113B0\"));\n VEssayLogUtil bVar2 = VEssayLogUtil.f90847b;\n bVar2.mo110964a(C6969H.m41409d(\"G6D8CC214B33FAA2DA643D05FE0ECD7D22985DC16BA70\") + this);\n if (this.outputStream == null) {\n this.outputStream = getOutputStream(this.filePath);\n }\n VEssayLogUtil bVar3 = VEssayLogUtil.f90847b;\n bVar3.mo110964a(C6969H.m41409d(\"G6D8CC214B33FAA2DA643D05FE0ECD7D22985DC16BA70\") + this);\n Long l = null;\n try {\n VEssayLogUtil bVar4 = VEssayLogUtil.f90847b;\n bVar4.mo110964a(C6969H.m41409d(\"G6D8CC214B33FAA2DA643D05FE0ECD7D22985DC16BA70B83CE50D955BE1A59397\") + this);\n FileOutputStream fileOutputStream = this.outputStream;\n if (fileOutputStream != null) {\n fileOutputStream.write(bArr);\n }\n FileOutputStream fileOutputStream2 = this.outputStream;\n if (fileOutputStream2 != null) {\n fileOutputStream2.flush();\n }\n VEssayLogUtil bVar5 = VEssayLogUtil.f90847b;\n bVar5.mo110964a(C6969H.m41409d(\"G6D8CC214B33FAA2DA643D05FE0ECD7D22985DC16BA70B83CE50D955BE1A59297\") + this);\n z = true;\n bVar = VEssayLogUtil.f90847b;\n sb = new StringBuilder();\n sb.append(C6969H.m41409d(\"G6D8CC214B33FAA2DA643D05FE0ECD7D22985DC14BE3CA730A643D0\"));\n downloadTempFile = getDownloadTempFile(this.filePath);\n } catch (IOException e) {\n e.printStackTrace();\n VEssayLogUtil bVar6 = VEssayLogUtil.f90847b;\n bVar6.mo110964a(C6969H.m41409d(\"G6D8CC214B33FAA2DA643D05FE0ECD7D22985DC16BA70AE31E50B805CFBEACD9722C3\") + e.getMessage());\n z = false;\n bVar = VEssayLogUtil.f90847b;\n sb = new StringBuilder();\n sb.append(C6969H.m41409d(\"G6D8CC214B33FAA2DA643D05FE0ECD7D22985DC14BE3CA730A643D0\"));\n downloadTempFile = getDownloadTempFile(this.filePath);\n } catch (Throwable th) {\n VEssayLogUtil bVar7 = VEssayLogUtil.f90847b;\n StringBuilder sb2 = new StringBuilder();\n sb2.append(C6969H.m41409d(\"G6D8CC214B33FAA2DA643D05FE0ECD7D22985DC14BE3CA730A643D0\"));\n File downloadTempFile2 = getDownloadTempFile(this.filePath);\n if (downloadTempFile2 != null) {\n l = Long.valueOf(downloadTempFile2.length());\n }\n sb2.append(l);\n sb2.append(C6969H.m41409d(\"G29CF95\"));\n sb2.append(this);\n bVar7.mo110964a(sb2.toString());\n throw th;\n }\n }",
"public abstract void write(byte[] b);",
"public void write(String[] buf, int offset, int size) throws IOException;",
"public static void output(String filePath, BigDecimal[][] m){\n\t\tFileWriter fileWriter;\n\t\ttry {\n\t\t\tfileWriter = new FileWriter(filePath);\n\t\t\tfor(int i = 0; i < m.length; i++){\n\t\t\t\tfor(int j = 0; j < m[0].length; j++)\n\t\t\t\t\tfileWriter.append(m[i][j]+\"\\t\");\n\n\t\t\t\tfileWriter.append(\"\\n\");\n\t\t\t}\n\t\t\tfileWriter.flush();\n\t\t\tfileWriter.close();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"File writer error!\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\t}",
"public static void writeWithFileOutputStreamWithBufArr(String testSource, String path) throws IOException {\n byte[] buf = testSource.getBytes();\n try(FileOutputStream f = new FileOutputStream(path)) {\n f.write(buf);\n }\n }",
"public void writeStringArrayNullable(String[] array) throws IOException {\n\t\tif (array == null) {\n\t\t\twriteVInt(0);\n\t\t} else {\n\t\t\twriteVInt(array.length);\n\t\t\tfor (String s : array) {\n\t\t\t\twriteString(s);\n\t\t\t}\n\t\t}\n\t}",
"public static void writeFile(ArrayList<String> lines, String fileName)\n {\n try\n {\n // Create file \n FileWriter fstream = new FileWriter(fileName);\n BufferedWriter out = new BufferedWriter(fstream);\n for (String line: lines)\n {\n out.write(line);\n }\n //Close the output stream\n out.close();\n }\n catch (Exception e){//Catch exception if any\n System.err.println(\"Error: \" + e.getMessage());\n }\n }",
"private static void writeToFile(String[] data) {\n\t\t// Regatta hasn't been calculated.\n\t\tif(r == null) {\n\t\t\tSystem.out.println(\"\\nYou haven't processed a regatta yet! \\nUse regatta to begin processing.\\n\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Just the command was specified, we need to get the filename.\n\t\tif(data.length == 1) {\n\t\t\tSystem.out.println(\"Oops, looks like you didn't specify an output file.\\n\");\n\t\t\tinitializeOutput(getFilename());\n\t\t}\n\n\t\t// Filename was specified but is invalid. Need to get another one.\n\t\tif(!isValidFileName(data[1])) {\n\t\t\tSystem.out.println(\"Looks like your filename is incorrect.\\n\");\n\t\t\tinitializeOutput(getFilename());\n\t\t}\n\n\t\tinitializeOutput(data[1]);\n\n\t\t// Write out.\n\t\tfileOutput.print(r.podium());\n\t\tfileOutput.close();\n\t}",
"@SuppressWarnings(\"unchecked\")\n public static void writeFile(String outputFile) {\n try (FileWriter file = new FileWriter(outputFile)) { // Creates file\n file.write(Constants.OPEN_SQUARE); // Begin array\n for(Map.Entry<Integer, String> entry : valid.entrySet()) { // Iterates names\n int id = entry.getKey();\n String name = entry.getValue();\n String cust = String.format(Constants.ENTRY, id, name);\n file.write(cust); // Writes formatted string to file\n }\n file.write(Constants.CLOSE_SQUARE); // Closes the array\n file.flush(); // Flushes buffer\n } catch (IOException e) { // Case of exception\n e.printStackTrace();\n }\n }",
"static void writeContents(File file, byte[] bytes) {\n try {\n if (file.isDirectory()) {\n throw\n new IllegalArgumentException(\"cannot overwrite directory\");\n }\n Files.write(file.toPath(), bytes);\n } catch (IOException excp) {\n throw new IllegalArgumentException(excp.getMessage());\n }\n }",
"public static void writeByteArrayToFile( final File file, final byte[] data ) throws IOException\n {\n writeByteArrayToFile( file, data, false );\n }",
"public abstract void writeToFile( );",
"public void save(Cacheable[] data) throws IOException, NullPointerException {\n validate(data);\n\n // write the header\n writeHeader(data);\n\n // write the data\n writeData(data);\n\n // close the file\n close();\n }",
"private void writeToFile(){\n try(BufferedWriter br = new BufferedWriter(new FileWriter(filename))){\n for(Teme x:getAll())\n br.write(x.toString()+\"\\n\");\n br.close();\n }catch (IOException e){\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) throws Exception{\n\n FileOutputStream fos = new FileOutputStream(\"C:/Users/e678332/JavaProgrammingPractice/bytearrayfile.txt\");\n FileOutputStream fos1 = new FileOutputStream(\"C:/Users/e678332/JavaProgrammingPractice/bytearrayfile2.txt\");\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n String s = \"byteArrayStream\";\n byte[] b = s.getBytes();\n baos.write(b);\n baos.writeTo(fos);\n baos.writeTo(fos1);\n baos.flush();\n baos.close();\n\n }",
"public void writeObject(RandomAccessFile arq) throws IOException{\n byte[] dados = this.getByteArray();\n arq.writeChar(' ');\n arq.writeShort(dados.length);\n arq.write(dados);\n }",
"public void write(final byte[] b) throws IOException {\n\t\twrite(b, 0, b.length);\n\t}",
"public static final void writeBytes(@org.jetbrains.annotations.NotNull java.io.File r2, @org.jetbrains.annotations.NotNull byte[] r3) {\n /*\n java.lang.String r0 = \"$this$writeBytes\"\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r2, r0)\n java.lang.String r0 = \"array\"\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r3, r0)\n java.io.FileOutputStream r0 = new java.io.FileOutputStream\n r0.<init>(r2)\n java.io.Closeable r0 = (java.io.Closeable) r0\n r2 = 0\n r1 = r0\n java.io.FileOutputStream r1 = (java.io.FileOutputStream) r1 // Catch:{ Throwable -> 0x001e }\n r1.write(r3) // Catch:{ Throwable -> 0x001e }\n kotlin.io.CloseableKt.closeFinally(r0, r2)\n return\n L_0x001c:\n r3 = move-exception\n goto L_0x0020\n L_0x001e:\n r2 = move-exception\n throw r2 // Catch:{ all -> 0x001c }\n L_0x0020:\n kotlin.io.CloseableKt.closeFinally(r0, r2)\n throw r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.io.i.writeBytes(java.io.File, byte[]):void\");\n }",
"public void writeToFile(ArrayList<String> word, ArrayList<String> abb) {\n String path =\n Environment.getExternalStorageDirectory() + File.separator + \"TextEasy\";\n // Create the folder.\n File folder = new File(path);\n folder.mkdirs();\n\n // Create the file.\n File file = new File(folder, filename);\n\n // Save your stream, don't forget to flush() it before closing it.\n\n try {\n file.createNewFile();\n FileOutputStream fOut = new FileOutputStream(file);\n OutputStreamWriter myOutWriter = new OutputStreamWriter(fOut);\n for (int i = 0; i < word.size(); i++) {\n String text = word.get(i) + \"\\n\" + abb.get(i) + \"\\n\";\n myOutWriter.append(text);\n }\n myOutWriter.close();\n fOut.flush();\n fOut.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }",
"public void write(byte b[], int off, int len) throws IOException;",
"@Override\n public void write(byte[] data) throws IOException {\n for (int i = 0; i < data.length; i++) {\n write(data[i]);\n }\n }",
"protected abstract void writeFile();",
"@Override\r\n public void save(String[] arr) {\r\n\tString name = arr[arr.length - 2];\r\n\tString fileName = arr[arr.length - 1];\r\n\tMaze3d m = hMaze.get(name);\r\n\ttry {\r\n\t OutputStream out = new MyCompressorOutputStream(new FileOutputStream(fileName));\r\n\t out.write(m.toByteArray());\r\n\t out.close();\r\n\t setChanged();\r\n\t notifyObservers(\"Maze \" + name + \" is saved\");\r\n\t} catch (FileNotFoundException e) {\r\n\t setChanged();\r\n\t notifyObservers(\"Error - the file was not found\");\r\n\t} catch (IOException e) {\r\n\t setChanged();\r\n\t notifyObservers(\"Error - IOException\");\r\n\t}\r\n }",
"public static void bytesToFile(byte[] bytes, String filePath) throws IOException {\n final FileOutputStream stream = new FileOutputStream(filePath);\n try {\n stream.write(bytes);\n } finally {\n stream.close();\n }\n }",
"public static void main(String[] args) throws Exception {\n FileOutputStream fos=new FileOutputStream(\"e:/data/contents.txt\");\r\n //step-2 (write data)\r\n String s=\"Something We want To Write To A File\";\r\n byte b[]=s.getBytes();\r\n //fos.write(b);\r\n fos.write(b, 3, 10);\r\n //step-3 (close file)\r\n fos.close();\r\n System.out.println(\"DATA STORED\");\r\n }",
"public void write(byte b[]) throws IOException {\n baos.write(b, 0, b.length);\n }",
"public void write_to_buffer(byte[] buffer) throws IOException {\r\n ByteArrayOutputStream byte_out = new ByteArrayOutputStream(buffer.length);\r\n DataOutputStream out = new DataOutputStream(byte_out);\r\n\r\n write_to_buffer(out);\r\n\r\n byte[] bytes = byte_out.toByteArray();\r\n for (int i = 0; i < buffer.length; ++i) {\r\n buffer[i] = bytes[i];\r\n }\r\n\r\n out.close();\r\n byte_out.close();\r\n }",
"void addNotes(Note arr[]){\n for(int i = 0; i < arr.length; i++){\n System.out.println(\"Please enter the name of the author of this note\");\n String author = sc.nextLine();\n arr[i].setAuthor(author);\n\n System.out.println(\"Please enter the date of this note\");\n String date = sc.nextLine();\n arr[i].setDate(date);\n\n System.out.println(\"You can now enter your note\");\n String description = sc.nextLine();\n arr[i].setDescription(description);\n\n //checks to see if a file exists\n try {\n if(!file.exists()){\n file.createNewFile();\n }\n // BufferedWriter allows the ability to write to file\n BufferedWriter buffer = new BufferedWriter(new FileWriter(file, true));\n buffer.write(author);\n buffer.write(date);\n buffer.write(description);\n\n buffer.close();\n System.out.println(\"Successfully written to file\");\n\n }catch (Exception ex){\n System.out.println(ex);\n }// end of try catch\n }//end of for loop\n }",
"public static void writeAll(byte[] bs, String fn) {\n\t\tFileOutputStream fos = null;\n\t\ttry {\n\t\t\tfos = new FileOutputStream(fn);\n\t\t\twriteAll(bs, fos);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new WrappedException(e);\n\t\t} finally {\n\t\t\tclose(fos);\n\t\t}\n\t}",
"public void write( byte[] array, int firstIndex,\n\t\t\tint count );",
"public static void saveToOutputFile(int[]tickets_array, String outputFileName, int k) {\n \n PrintWriter fileOutput = null;\n \n // PrintWriter forces handling of the FileNotFoundException, and FileWriter forces\n // handling of IOException, which includes FileNotFoundException, so\n // only IOException needs to be handled.\n try {\n fileOutput = new PrintWriter(new FileWriter(outputFileName));\n } catch (IOException e) {\n \n System.out.println(\"PrintWriter IOException occured when trying to save weight matrix data.\");\n \n }\n \n // save number of tickets\n fileOutput.println(tickets_array.length);\n \n //save the tickets\n \n double multiplyer = Math.pow(10, k-1);\n double curr = 0;\n int number = 0;\n for (int ticket : tickets_array)\n {\n curr = ticket;\n while(curr / multiplyer > 0)\n {\n number = (int)(curr / multiplyer);\n fileOutput.print(number + \" \");\n curr = ticket % multiplyer;\n multiplyer /= 10;\n \n }\n fileOutput.println(\"\");\n multiplyer = Math.pow(10, k-1);\n }\n \n // flush PrintWriter\n fileOutput.flush();\n \n // close file\n fileOutput.close();\n \n }",
"private static void writer(String filename, char[] chars) {\n BinaryOut binaryOut = new BinaryOut(filename);\n\n for (char c : chars) {\n binaryOut.write(c);\n }\n\n binaryOut.close();\n }",
"private void writeArrayToLine(String[ ] args) {\r\n\t\tStringBuilder buf = new StringBuilder();\r\n\t\tif (args.length>0) buf.append(args[0]);\r\n\t\tint k = 1;\r\n\t\twhile(k < args.length) buf.append(delim).append(args[k++]);\r\n\t\tout.println(buf.toString());\r\n\t}",
"void writeToFile(){\n try{\n OutputStream o = new FileOutputStream(distanceFile);\n for(int start = 1; start < 200; start++)\n for(int to = 1; to < 200; to++)\n for(int taxi = 0; taxi < 12; taxi++)\n for(int bus = 0; bus < 9; bus++)\n o.write(distance[start][to][taxi][bus]);\n o.close();\n o = new FileOutputStream(validMoveFile);\n for(int node = 1; node < 200; node++)\n for(int taxi = 0; taxi < 3; taxi++)\n for(int bus = 0; bus < 3; bus++)\n for(int underground = 0; underground < 3; underground++)\n for(int doublet = 0; doublet < 2; doublet++)\n for(int secret = 0; secret < 3; secret++)\n for(int b = 0; b < 4; b++)\n o.write((byte) (validMoves[node][taxi][bus][underground][doublet][secret] >> ((3 - b) * 8)));\n o.close();\n }\n catch (Exception e){\n System.out.println(\"Exception: \" + e);\n }\n }",
"void writeMap(Collection<?> array);",
"public void write(byte b[]) throws IOException\n {\n checkThreshold(b.length);\n getStream().write(b);\n written += b.length;\n }",
"private void append(byte[] bts) {\n checkFile();\n try {\n outputStream.write(bts);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void writeBytes(byte[] b) throws IOException {\n\t\tbaos.writeBytes(b);\n\t}",
"void writeBytes(byte[] b, File f) throws Exception {\n \n ByteBuffer[] bb = splitByteArray(b);\n\n for (int i = 0; i < bb.length; ++i) {\n\n // WRITE NEXT PORTION OF BYTES VIA FOS:\n\n fos.write(bb[i].array()); \n\n ++i;\n\n // WRITE NEXT PORTION OF BYTES VIA CHANNEL:\n\n if (i < bb.length) {\n FileLock fl = outChannel.lock();\n outChannel.write(bb[i]);\n outChannel.force(false);\n fl.release();\n }\n }\n }",
"public void writeToFile(String fullFilePath, File newTB, String[] commandArray){\n\n //Find starting position of first bracket and take 1st subsequent element\n int i = whichArrayElementEqualTo(commandArray, \"(\") + 1;\n int id;\n\n try {\n if(newTB.isFile()) {\n //Use append option in the filewriter to create new lines\n FileWriter fw = new FileWriter(fullFilePath, true);\n bw = new BufferedWriter(fw);\n\n //Return ID number\n id = idNum(fullFilePath);\n\n //Create ID column\n bw.write(\"\\n\");\n bw.write(String.valueOf(id));\n bw.write(\"\\t\");\n\n //Loop through from instance of open bracket to instance of close bracket outputting specified variables\n while (i < whichArrayElementEqualTo(commandArray, \")\")) {\n\n //Remove commas and apostrophes prior to outputting\n bw.write(removeApostrophe(removeComma(commandArray[i])));\n bw.write(\"\\t\");\n i++;\n }\n }\n }\n catch(IOException ioe) {\n ioe.printStackTrace();\n System.out.println(ioe);\n }\n finally {\n try{\n //Close buffered writer\n if(bw!=null) {\n bw.close();\n }\n }\n catch(Exception ex){\n ex.printStackTrace();\n System.out.println(\"Error in closing the BufferedWriter\" + ex);\n }\n }\n }",
"public void write(byte[] buffer){\r\n\t\t\r\n\t\ttry{\r\n\t\t\toOutStream.write(buffer);\r\n\t\t}catch(IOException e){\r\n\t\t\tLog.e(TAG, \"exception during write\", e);\r\n\t\t}\r\n\t}",
"public static void printArray(String[] names, String fileName) throws IOException{//throw IOException\n \tFile outfile = new File(fileName);\n \tPrintWriter pw = new PrintWriter(outfile);\n \tfor(int a = 0; a < names.length; a++){\n \t\tpw.println(names[a]);\n \t}\n \tpw.close();\n \treturn;\n }",
"private void writeCsv(float[] vals, String stimulus, PrintWriter outfile) throws FileNotFoundException {\n for (int i = 0; i < vals.length; i++) {\n outfile.append(vals[i] + \",\");\n }\n outfile.append(stimulus);\n outfile.append(\"\\n\");\n\n }",
"private static void writeFile(final PropertyArray data, final String file, int indent) throws IOException {\n loadParser();\n parser_.setIndent(indent);\n parser_.writeConfig(data, file);\n parser_.setIndent(0);\n }",
"static public void writeVectorArray(PrintWriter writer, double[] vector) {\r\n writer.println(vector.length);\r\n for (double v : vector) {\r\n writer.println(Double.toString(v));\r\n }\r\n }",
"public void write(String s, ArrayList<String[]> data) throws IOException {\n\t\tFile metaFile = new File(s);\n\t\tmetaFile.createNewFile();\n\t\tFileWriter fw = new FileWriter(metaFile);\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\tString row = \"\";\n\t\t\tfor (int j = 0; j < 5; j++) {\n\t\t\t\trow = row + data.get(i)[j] + \",\";\n\t\t\t}\n\t\t\trow = row + data.get(i)[5];\n\t\t\tbw.write(row);\n\t\t\tbw.newLine();\n\t\t}\n\t\tbw.close();\n\t}"
] |
[
"0.7471926",
"0.7349244",
"0.70549875",
"0.67528754",
"0.6707671",
"0.6600337",
"0.6558204",
"0.6396269",
"0.6388504",
"0.63779885",
"0.6340385",
"0.63259584",
"0.63103044",
"0.62685335",
"0.6143031",
"0.61080974",
"0.6071973",
"0.60668916",
"0.60445035",
"0.6037573",
"0.6037511",
"0.6023099",
"0.6014401",
"0.5981554",
"0.59746194",
"0.5965603",
"0.59561515",
"0.5947943",
"0.59342504",
"0.5905119",
"0.5904562",
"0.587004",
"0.58688706",
"0.5865504",
"0.5832105",
"0.58251107",
"0.58086985",
"0.58062947",
"0.5801256",
"0.57977057",
"0.5780475",
"0.57620823",
"0.5760107",
"0.5757921",
"0.5745873",
"0.574145",
"0.57316035",
"0.5731458",
"0.57288426",
"0.57276374",
"0.57247007",
"0.571843",
"0.5718245",
"0.5712991",
"0.5699242",
"0.5689828",
"0.56798077",
"0.5675147",
"0.5674768",
"0.5669997",
"0.56681436",
"0.5668095",
"0.5666443",
"0.56603265",
"0.5656708",
"0.5650415",
"0.5644392",
"0.56384665",
"0.5631812",
"0.5630592",
"0.5629151",
"0.56257206",
"0.5606209",
"0.5601844",
"0.5601154",
"0.5599819",
"0.5599759",
"0.557873",
"0.55786985",
"0.5577196",
"0.55736256",
"0.55620205",
"0.55535567",
"0.55516344",
"0.5542843",
"0.5536463",
"0.55232096",
"0.55145395",
"0.5508763",
"0.55037135",
"0.54995203",
"0.5498321",
"0.54976493",
"0.5488677",
"0.5480203",
"0.5478062",
"0.547569",
"0.5472246",
"0.54590225",
"0.54474115",
"0.54462487"
] |
0.0
|
-1
|
Returns whether pathSegment is a valid part of a path in a Carbide project. This checks for file name validity and name only contains alphanumeric or hyphen or underscrore or dot characters
|
public static boolean isValidCarbideProjectPathSegment(String pathSegment) {
IWorkspace workspace = ResourcesPlugin.getWorkspace();
int typeMask = IResource.FILE | IResource.FOLDER;
boolean valid = pathSegment.length() == 0 ||
workspace.validateName(pathSegment, typeMask).isOK();
if (valid) {
for (int i = 0; i < pathSegment.length(); i++) {
char c = pathSegment.charAt(i);
valid = Character.isLetterOrDigit(c) || (c == '-') || (c == '_') || (c == '.');
if (!valid)
break;
}
}
return valid;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static boolean isSafe(String pathComponent) {\n if (pathComponent == null) {\n return false;\n }\n if (!pathComponent.trim().equals(pathComponent)) {\n return false;\n }\n return pathComponent.matches(\"\\\\w([- .]|\\\\w)*\");\n }",
"public static boolean isValid(String src)\n {\n if (!src.startsWith(SEPARATOR)) {\n return false;\n }\n\n // Check for \"..\" \".\" \":\" \"/\"\n StringTokenizer tokens = new StringTokenizer(src, SEPARATOR);\n while(tokens.hasMoreTokens()) {\n String element = tokens.nextToken();\n if (element.equals(\"..\") ||\n element.equals(\".\") ||\n (element.indexOf(\":\") >= 0) ||\n (element.indexOf(\"/\") >= 0)) {\n return false;\n }\n }\n \n return true; \n }",
"public static boolean isValidFileName(String fileName) {\n\t\tfor (String c:PATH_SEPARATORS) { // checks that is it not a path\n\t\t\tif (fileName.contains(c)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!isValidPath(fileName)) { // checks whether the name contains valid characters\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public static boolean isValidPath(String path) {\n\t\ttry {\n\t\t\tPaths.get(path);\n\t\t\treturn true;\n\t\t} catch (InvalidPathException e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"private boolean isValidName(String guess_file) {\n int dot = guess_file.lastIndexOf(\".\");\n if (dot > 0) {\n String ext = guess_file.substring(dot + 1);\n if (!ext.equals(\"csv\")) {\n //We only want CSV files for parsing\n return false;\n }else if (ext.equals(\"csv\")){\n return true;\n }\n }\n return false;\n }",
"private boolean validateFile(String path) {\n return !path.equals(AppStrings.NO_FILE_PATH);\n }",
"private static boolean isValidRegattaName(String name) {\n\t\tif(name.length() == 0) {\n\t\t\tSystem.out.println(\"\\nRegatta names must be atleast one character!\"); \n\t\t\treturn false;\n\t\t}\n\n\t\tif(name.indexOf('.') == -1 && name.length() != 0) return true;\n\t\telse {\n\t\t\tSystem.out.println(\"\\nRegatta names cannot have \\'.\\' in them!\"); \n\t\t\treturn false;\n\t\t}\n\t}",
"private static boolean isValidFileName(String name) {\n\t\tif(name.indexOf('.') != -1 && name.length() != 0) return true;\n\t\telse System.out.println(\"\\nFilenames must include the file's extension.\"); return false;\n\t}",
"public static boolean isValid(String name) {\n if (name == null) {\n throw new IllegalArgumentException(\"Name is missing\");\n }\n\n boolean slash = false;\n for (int i = 0; i < name.length(); i++) {\n char ch = name.charAt(i);\n if (ch <= ' ' || ch >= 127 || ch == '(' || ch == ')' || ch == '<' || ch == '>' ||\n ch == '@' || ch == ',' || ch == ';' || ch == ':' || ch == '\\\\' || ch == '\"' ||\n ch == '[' || ch == ']' || ch == '?' || ch == '=') {\n return false;\n } else if (ch == '/') {\n if (slash || i == 0 || i + 1 == name.length()) {\n return false;\n }\n slash = true;\n }\n }\n return slash;\n }",
"private boolean isFileNameValid(char[] chars) {\n\n\t\tfor(char Char : chars) {\n\t\t\tif (!Character.isDigit(Char) && !Character.isLetter(Char) && Char != '-' && Char != '_') {\n\t\t\t\tloadingGif.setImage(null);\n\n\t\t\t\tAlert invalidName = new Alert(Alert.AlertType.ERROR);\n\t\t\t\tinvalidName.setTitle(\"Invalid Audio File Name\");\n\t\t\t\tinvalidName.setHeaderText(\"You cannot save an audio file with the character '\" + Char + \"' in its name!\");\n\t\t\t\tinvalidName.setContentText(\"Kindly enter a different name.\");\n\t\t\t\tinvalidName.showAndWait();\t\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"private boolean isValidPath(String path) {\n File file = new File(path);\n return file.exists() && file.isDirectory();\n }",
"boolean hasCsStr();",
"boolean isPathValid(LttlPath p)\n\t{\n\t\tif (p == null || !p.closed)\n\t\t{\n\t\t\tif (p != null && (!p.closed || p.controlPoints.size() < 3)\n\t\t\t\t\t&& !pathWarning)\n\t\t\t{\n\t\t\t\tLttl.logNote(\"Path or Cutout Path on \"\n\t\t\t\t\t\t+ toString()\n\t\t\t\t\t\t+ \" must be closed and have more than 3 points to create mesh.\");\n\t\t\t\tr().setMesh(null);\n\t\t\t\tpathWarning = true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public static boolean checkName(final String basePath, final String path, final NameScope scope) {\r\n if (scope == NameScope.FILE_SYSTEM) {\r\n // All good\r\n return true;\r\n }\r\n\r\n if (!path.startsWith(basePath)) {\r\n return false;\r\n }\r\n\r\n int baseLen = basePath.length();\r\n if (VFS.isUriStyle()) {\r\n // strip the trailing \"/\"\r\n baseLen--;\r\n }\r\n\r\n if (scope == NameScope.CHILD) {\r\n return path.length() != baseLen && (baseLen <= 1 || path.charAt(baseLen) == SEPARATOR_CHAR)\r\n && path.indexOf(SEPARATOR_CHAR, baseLen + 1) == -1;\r\n }\r\n if (scope == NameScope.DESCENDENT) {\r\n return path.length() != baseLen && (baseLen <= 1 || path.charAt(baseLen) == SEPARATOR_CHAR);\r\n }\r\n if (scope == NameScope.DESCENDENT_OR_SELF) {\r\n return baseLen <= 1 || path.length() <= baseLen || path.charAt(baseLen) == SEPARATOR_CHAR;\r\n }\r\n throw new IllegalArgumentException();\r\n }",
"@Override\n public boolean accept(Path path) {\n return path.getName().startsWith(partFilePrefix);\n }",
"public boolean isWorkspacePathValid(String path) {\n\t\tif(isNull(path) || path.isEmpty()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tString absolutePath = getAbsoluteSubDirectoryPath(path);\n\t\t\tFile f = new File(absolutePath);\n\t\t\t\n\t\t\tif(!f.exists() || !f.isDirectory()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (RuntimeException e) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"private boolean isNameValid(String name) {\n\n }",
"boolean isPattern(String path);",
"abstract boolean canHandle(\n final PathReal name);",
"public boolean isValidName(String proposedName);",
"public boolean isValidName(String name)\r\n {\r\n // check for illegal combinations of characters\r\n // this is probably not a complete check, but hopefully it is good enough\r\n if ( (name == null) ||\r\n (name.equals(\"\")) ||\r\n Character.isUpperCase(name.charAt(0)) ||\r\n containsSubString(name, TIGHT_BINDING) ||\r\n containsSubString(name, LOOSE_BINDING) ||\r\n containsSubString(name, SINGLE_MATCH) ||\r\n containsSubString(name, \"/\") ||\r\n containsSubString(name, \" \") ||\r\n containsSubString(name, \"\\t\") ||\r\n containsSubString(name, \"\\n\") ||\r\n name.equals(UNIQUE_NAME) )\r\n {\r\n return false;\r\n }\r\n\r\n return true;\r\n }",
"static String validateBucketName(String bucketName) {\n // If the name ends with '/', remove it.\n bucketName = toFilePath(bucketName);\n\n if (isNullOrEmpty(bucketName)) {\n throw new IllegalArgumentException(\"GCS bucket name cannot be empty.\");\n }\n\n if (!BUCKET_NAME_CHAR_MATCHER.matchesAllOf(bucketName)) {\n throw new IllegalArgumentException(\n String.format(\n \"Invalid GCS bucket name '%s': bucket name must contain only 'a-z0-9_.-' characters.\",\n bucketName));\n }\n\n return bucketName;\n }",
"boolean isPartOf(String genomeName);",
"public static boolean isPathInParent(IPath path) {\r\n\t\t// first see if any segments are \"..\" at all\r\n\t\tfor (int i = 0; i < path.segmentCount(); i++) {\r\n\t\t\tif (path.segment(i).equals(\"..\")) { //$NON-NLS-1$\r\n\t\t\t\t// comprehensive check, canonicalizing\r\n\t\t\t\tpath = new Path(path.toString());\r\n\t\t\t\tif (path.segmentCount() > 0 && path.segment(0).equals(\"..\")) { //$NON-NLS-1$\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"boolean isAgencyLogoPathValid() {\n boolean valid = true;\n\n if (defaultLogoRB.isSelected()) {\n agencyLogoPathFieldValidationLabel.setText(\"\");\n } else {\n String agencyLogoPath = agencyLogoPathField.getText();\n if (agencyLogoPath.isEmpty()) {\n agencyLogoPathFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_agencyLogoPathFieldValidationLabel_pathNotSet_text());\n valid = false;\n } else {\n File file = new File(agencyLogoPathField.getText());\n if (file.exists() && file.isFile()) {\n BufferedImage image;\n try { //ensure the image can be read\n image = ImageIO.read(file); //create it as an image first to support BMP files\n if (image == null) {\n throw new IOException(\"Unable to read file as a BufferedImage for file \" + file.toString());\n }\n agencyLogoPathFieldValidationLabel.setText(\"\");\n } catch (IOException | IndexOutOfBoundsException ignored) {\n agencyLogoPathFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_agencyLogoPathFieldValidationLabel_invalidImageSpecified_text());\n valid = false;\n }\n } else {\n agencyLogoPathFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_agencyLogoPathFieldValidationLabel_invalidPath_text());\n valid = false;\n }\n }\n }\n\n return valid;\n }",
"private boolean checkValidity(String path) {\n File checkFile = new File(path);\n return checkFile.exists();\n }",
"private void validate(Path path) {\n }",
"public static boolean isSafePath(File path) {\n // FIXME add os check here?\n Matcher matcher = safePathPattern.matcher(path.getAbsolutePath());\n return matcher.matches();\n }",
"private boolean isValid(String s, boolean hasDot) {\n\t if (s.length() > 0 && (s.charAt(0) == '+' || s.charAt(0) == '-')) {\n\t \ts = s.substring(1);\n\t }\n\t \n\t if (s.isEmpty() || s.equals(\".\")) {\n\t \treturn false;\n\t }\n\t \n\t for (int i = 0; i<s.length(); i++) {\n\t \tchar c = s.charAt(i);\n\t if (c == '.') {\n\t \t//can not have a second dot\n\t if (hasDot) {\n\t \treturn false;\n\t }\t \n\t hasDot = true;\n\t } else if (!('0' <= c && c <= '9')) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t}",
"public abstract boolean isPath();",
"public static boolean isValidName(String name) {\r\n\t\treturn (name != null && name.matches(\"[a-zA-Z_0-9.-]+\"));\r\n\t}",
"private boolean dirNameIsValid(String itemName) {\n return !(itemName.contains(\"resources\")\n || itemName.startsWith(\".\")\n || itemName.equalsIgnoreCase(\"tools\"));\n }",
"public boolean accept(File dir, String name) {\n boolean ok = false;\n StringTokenizer tokenizer = new StringTokenizer(name, \".\");\n /* There should be two parts. */\n if (tokenizer.countTokens() == 3) {\n String fileNumber = tokenizer.nextToken();\n String fileSuffix = tokenizer.nextToken();\n String repeat = tokenizer.nextToken();\n\n /* Check the length and the suffix. */\n if ((fileNumber.length() == 8) &&\n (fileSuffix.equals(\"bad\"))) {\n\n /* The first and third parts should be a numbers. */\n try {\n Integer.parseInt(fileNumber);\n Integer.parseInt(repeat);\n ok = true;\n } catch (NumberFormatException e) {\n ok = false;\n }\n }\n }\n\n return ok;\n }",
"static String validateObjectName(String objectName, boolean allowEmptyObjectName) {\n logger.atFiner().log(\"validateObjectName('%s', %s)\", objectName, allowEmptyObjectName);\n\n if (isNullOrEmpty(objectName) || objectName.equals(PATH_DELIMITER)) {\n if (allowEmptyObjectName) {\n objectName = \"\";\n } else {\n throw new IllegalArgumentException(\n String.format(\n \"GCS path must include non-empty object name [objectName='%s',\"\n + \" allowEmptyObjectName=%s]\",\n objectName, allowEmptyObjectName));\n }\n }\n\n // We want objectName to look like a traditional file system path,\n // therefore, disallow objectName with consecutive '/' chars.\n for (int i = 0; i < (objectName.length() - 1); i++) {\n if (objectName.charAt(i) == '/' && objectName.charAt(i + 1) == '/') {\n throw new IllegalArgumentException(\n String.format(\"GCS path must not have consecutive '/' characters: '%s'\", objectName));\n }\n }\n\n // Remove leading '/' if it exists.\n if (objectName.startsWith(PATH_DELIMITER)) {\n objectName = objectName.substring(1);\n }\n\n logger.atFiner().log(\"validateObjectName -> '%s'\", objectName);\n return objectName;\n }",
"private boolean isDateValid(String date) {\n return date.contains(\"/\");\n }",
"protected boolean isPublicPath(final String path)\n\t{\n\t\treturn applicationProperties.getPublicPathPatterns().contains(path);\n\t}",
"static FormValidation doCheckPath(@QueryParameter String value) {\n if (StringUtils.isBlank(value)) {\n return FormValidation.ok();\n }\n try {\n final FilePath filePath = new FilePath(new File(value));\n filePath.exists();\n } catch (Exception e) {\n return FormValidation.error(\"The specified value is not a valid path\");\n }\n return FormValidation.ok();\n }",
"@Override\n public boolean accept(Path path) {\n if (null == path) {\n return false;\n }\n\n // no parent?\n Path parent = path.getParent();\n if (null == parent) {\n return false;\n }\n\n String regionName = path.getName();\n if (null == regionName) {\n return false;\n }\n\n if (!regionName.toLowerCase(Locale.ROOT).matches(\"[0-9a-f]+\")) {\n return false;\n }\n return true;\n }",
"public static boolean m215c(String str) {\n try {\n if (TextUtils.isEmpty(str)) {\n return false;\n }\n File file = new File(str);\n if (file.exists() && file.isFile()) {\n return true;\n }\n return false;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }",
"public boolean isValidSong() { \n\t\tString filepath = aFilePath.toString();\n\t\tFile f = new File(filepath);\n\t\treturn f.exists();\n\t}",
"private boolean isValidExtension(String originalName) {\n String originalNameExtension = originalName.substring(originalName.lastIndexOf(\".\") + 1);\n switch(originalNameExtension) {\n case \"jpg\":\n case \"png\":\n case \"gif\":\n return true;\n }\n return false;\n }",
"protected boolean isValidSwagger(final String path) {\n return \"/openapi.json\".equals(path) || path.startsWith(\"/swagger-ui/\");\n }",
"public boolean validPath(int curRow, int curCol, int movRow, int movCol) {\n if (curRow + 2 == movRow || curRow - 2 == movRow){\n if (curCol + 2 == movCol || curCol - 2 == movCol){\n return true;\n }\n }\n return false;\n }",
"public boolean isValid(String s) {\n if (s.contains(\".\")) {\n String[] part = s.split(\"\\\\.\");\n if (!part[0].equals(\"0\") && part[0].startsWith(\"0\")) {\n return false;\n } else {\n return !part[1].endsWith(\"0\");\n }\n } else {\n /*\n if the point has no decimal points, we can return true if the string is 0 or if it does not start with\n 0 since 01, 04, 06, etc. are not valid\n */\n if (s.equals(\"0\")) {\n return true;\n } else {\n return !s.startsWith(\"0\");\n }\n }\n }",
"private boolean isCorrectCP(String contextPath) {\n boolean correct=true;\n if (!contextPath.equals(\"\") && !contextPath.startsWith(\"/\")) {\n correct=false; //NOI18N\n } else if (contextPath.endsWith(\"/\")) {\n correct=false; //NOI18N\n } else if (contextPath.indexOf(\"//\")>=0) {\n correct=false; //NOI18N\n }\n return correct;\n }",
"private boolean isValidFile(String sHTTPRequest) {\n String sRootFolder = \"/\" + ROOT_FOLDER.getName();\n return sAvailableFiles.contains(sRootFolder + sHTTPRequest.toLowerCase());\n }",
"public boolean isValidResource(String resource)\r\n {\r\n // check for illegal combinations of characters\r\n // this is probably not a complete check, but hopefully it is good enough\r\n if ( (resource == null) ||\r\n (resource.equals(\"\")) ||\r\n (resource.startsWith(TIGHT_BINDING)) ||\r\n (resource.endsWith(TIGHT_BINDING)) ||\r\n (resource.endsWith(LOOSE_BINDING)) ||\r\n containsSubString(resource, TIGHT_BINDING+TIGHT_BINDING) ||\r\n containsSubString(resource, SINGLE_MATCH+SINGLE_MATCH) ||\r\n containsSubString(resource, \" \") ||\r\n containsSubString(resource, \"\\t\") ||\r\n containsSubString(resource, \"\\n\") )\r\n {\r\n return false;\r\n }\r\n\r\n return true;\r\n }",
"public static boolean isValidName(String name) {\n\t\tif (name == null) {\n\t\t\treturn false;\n\t\t}\n\t\treturn name.length() > 3;\n\t}",
"private boolean checkFile(String name) {\n return name.endsWith(extension);\n }",
"private static boolean validName(String name) {\n return name != null && !name.strip().isBlank();\n }",
"@Override\r\n\t\tpublic boolean accept(Path path) {\n\t\t\tboolean flag = path.toString().matches(regex);\r\n\t\t\treturn !flag;\r\n\t\t}",
"private boolean validateFile(JTextField fileTF,\n Component parentComp) {\n if (fileTF.getText().trim().length() == 0)\n {\n JOptionPane.showMessageDialog(parentComp,\n \"Please enter a file name in the file field\",\n \"No File Name\", JOptionPane.ERROR_MESSAGE);\n return false;\n }\n String text = fileTF.getText().trim();\n File file = new File(text);\n if (!file.exists())\n {\n JOptionPane\n .showMessageDialog(\n parentComp,\n \"The file you entered does not exist. Please enter a valid file name\",\n \"Incorrect File Name\", JOptionPane.ERROR_MESSAGE);\n return false;\n }\n return true;\n }",
"private static boolean isPathCharacter (char p_char) {\n return (p_char <= '~' && (fgLookupTable[p_char] & MASK_PATH_CHARACTER) != 0);\n }",
"static public boolean validateName(String proposedName, boolean allowSpace)\n {\n Pattern p;\n if (allowSpace)\n p = Pattern.compile(\"[A-Z][A-Z0-9_. -]*\", Pattern.CASE_INSENSITIVE);\n else\n p = Pattern.compile(\"[A-Z][A-Z0-9_.-]*\", Pattern.CASE_INSENSITIVE);\n \n return (p.matcher(proposedName).matches());\n\n }",
"@Test\n\tpublic void validFileTest() {\n\t\t// Test valid file with full file path\n\t\tworkDir = new File(workingDir);\n\t\texpected = validFile.getAbsolutePath();\n\t\tactual = Helper.isValidFile(workDir, validFile.getAbsolutePath());\n\t\tassertEquals(expected, actual.getAbsolutePath());\n\n\t\t// Test valid file with only file name\n\t\texpected = workDir.getAbsolutePath() + pathSep + fileName; // Bugs: OS\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// compatible \\\\\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// changed to /\n\t\tactual = Helper.isValidFile(workDir, fileName);\n\t\tassertEquals(expected, actual.getAbsolutePath());\n\t}",
"String validateAllowedExtensions(File fileNamePath) {\n\t\tString fileName = fileNamePath.getName();\r\n\t\t\r\n\t\t//Get the index based on the extension into the string\r\n\t\tint lastIndex = fileName.lastIndexOf(\".\");\r\n\t\t\r\n\t\t//Get substring/extension from the string\r\n\t\tString extension = fileName.substring(lastIndex).toUpperCase();\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"GIF\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"JPG\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"TXT\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\t// There is no extension for the file\r\n\t\tif (lastIndex == -1) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\t\r\n\t\t// No valid extension\r\n\t\treturn \"\";\r\n\t\t\r\n\t}",
"@Override\r\n\t\tpublic boolean accept(Path path) {\n\t\t\tboolean flag = path.toString().matches(regex);\r\n\t\t\treturn flag;\r\n\t\t}",
"boolean hasFileName();",
"boolean hasFileName();",
"public boolean getIsValidPath()\r\n\t{\n\t\tDBTableEnum[] n = DBTableEnum.values();\r\n\t\tfor (DBTableEnum e : n)\r\n\t\t{\r\n\t\t\tif(e.getTableName().equals(this.folderType))\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public static boolean isValidName(String name) {\n if (name.length() == 0)\n return false;\n char ch = name.charAt(0);\n if( isNameStart(ch) == false)\n return false;\n for (int i = 1; i < name.length(); i++ ) {\n ch = name.charAt(i);\n if( isName( ch ) == false ){\n return false;\n }\n }\n return true;\n }",
"public boolean startsWith(Path path) {\n if (path == null) {\n return true;\n } else if (parts.length < path.parts.length) {\n return false;\n }\n for (int i = 0; i < path.parts.length; i++) {\n if (!parts[i].equals(path.parts[i])) {\n return false;\n }\n }\n if (parts.length == path.parts.length) {\n return index == path.index;\n } else {\n return path.index;\n }\n }",
"private boolean checkNameChar(String name) {\n\t\tString patternStr = \"[a-zA-Z]+\";\n\t\tPattern pattern = Pattern.compile(patternStr);\n\t\tMatcher matcher = pattern.matcher(name);\n\t\tboolean matchFound = matcher.matches();\n\t\treturn matchFound;\n\t}",
"public static Boolean isAuraComp(String path){\n\t\t// if not aura path, return false\n\t\treturn (path.indexOf(AURA_TOKEN) == -1)? false: true;\n\n\t}",
"public boolean validarDireccion() {\n\t\treturn direccion != null;\n\t}",
"public boolean isSpecialPath(String path) {\n return dataTree.isSpecialPath(path);\n }",
"public static boolean operationValidator(String str) {\n final Pattern pattern = Pattern.compile(\".\");\n\n return pattern.matcher(str).matches();\n\n }",
"public boolean nameIsValid() {\n return bikeName.length() > 0 && bikeName.length() < MAX_TITLE_LENGTH;\n }",
"public static boolean validateName(String name){\n return name.matches(NAME_PATTERN);\n }",
"public boolean verifyFastName(String FastName)\r\n {\r\n FastName = FastName.trim();\r\n\r\n if(FastName == null || FastName.isEmpty() || !FastName.matches(\"[a-zA-Z]*\"))\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n }",
"public boolean checkName(String name)\n {\n boolean value = true;\n if(name.length() < 3 || name.length() > 15)\n {\n System.out.println(\"Name must be between 3 and 15 characters\");\n value = false;\n }\n return value;\n }",
"boolean getPathPatternSupported();",
"boolean hasScStr();",
"private boolean isInValidInput(String input) {\n\n\t\tif (input == null || input.isEmpty())\n\t\t\treturn true;\n\n\t\tint firstPipeIndex = input.indexOf(PARAM_DELIMITER);\n\t\tint secondPipeIndex = input.indexOf(PARAM_DELIMITER, firstPipeIndex + 1);\n\n\t\t/*\n\t\t * if there are no PARAM_DELIMITERs or starts with a PARAM_DELIMITER\n\t\t * (Meaning command is missing) or only single PARAM_DELIMITER input is\n\t\t * not valid\n\t\t */\n\t\tif (firstPipeIndex == -1 || firstPipeIndex == 0 || secondPipeIndex == -1)\n\t\t\treturn true;\n\n\t\t// Means package name is empty\n\t\tif (secondPipeIndex - firstPipeIndex < 2)\n\t\t\treturn true;\n\n\t\treturn false;\n\t}",
"public static boolean isValid(String name) {\n\t\tif ((name == null) || name.isEmpty()) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"@Override\n\tpublic Boolean canParse(String fileName) {\n\t\treturn fileName.contains(\"gene_association.\") && !fileName.endsWith(\".gz\");\n\t}",
"protected boolean isSigninPath(final String path)\n\t{\n\t\treturn applicationProperties.getSigninPathPatterns().contains(path);\n\t}",
"private boolean pathHasValidTableName(String parent, String tableName) {\n String tableDirectory = \"/\" + tableName + \"/\";\n return !Strings.isNullOrEmpty(tableName) && parent.contains(tableDirectory) && !parent.endsWith(\"/\" + tableName);\n }",
"public static boolean isValidName(String name) {\n if (name.matches(pattern)) {\n return true;\n } else {\n return false;\n }\n }",
"private static boolean nameIsValid(String name) {\n if (name.length() < 4 || name.length() > 11)\n return false;\n\n for (int i = 0; i < name.length(); i++) {\n int charIndex = name.charAt(i);\n\n // Each character can only be a letter or number\n if (charIndex < 48 || (charIndex > 57 && charIndex < 65) || (charIndex > 90 && charIndex < 97) || charIndex > 122)\n return false;\n }\n\n return true;\n }",
"public static boolean isValidNCName(String ncName) {\n if (ncName.length() == 0)\n return false;\n char ch = ncName.charAt(0);\n if( isNCNameStart(ch) == false)\n return false;\n for (int i = 1; i < ncName.length(); i++ ) {\n ch = ncName.charAt(i);\n if( isNCName( ch ) == false ){\n return false;\n }\n }\n return true;\n }",
"boolean hasFilePath();",
"private boolean verifyUrlFormat( String editorUrl )\n {\n if ( null == editorUrl )\n return false;\n String normalized = editorUrl.replace('\\\\', '/');\n if ( !normalized.startsWith(CE_URL_PREFIX))\n return false;\n normalized = normalized.substring(3);\n int pos = normalized.indexOf(\"/\");\n if ( pos < 0 )\n return false;\n normalized = normalized.substring(pos+1);\n pos = normalized.indexOf(\"/\");\n if ( pos >= 0 )\n return false;\n return true;\n }",
"public static boolean isNameValid(String name) {\r\n return name.matches(\"^[a-zA-Z ]+$\");\r\n }",
"public static boolean isFullyQualified(String key) {\n return isFullyQualified(key, false);\n }",
"public static boolean isConformantSchemeName(String p_scheme) {\n if (p_scheme == null || p_scheme.trim().length() == 0) {\n return false;\n }\n \n if (!isAlpha(p_scheme.charAt(0))) {\n return false;\n }\n \n char testChar;\n int schemeLength = p_scheme.length();\n for (int i = 1; i < schemeLength; ++i) {\n testChar = p_scheme.charAt(i);\n if (!isSchemeCharacter(testChar)) {\n return false;\n }\n }\n \n return true;\n }",
"public boolean isPathCrossing(String path) {\n // keep track of x and y position \n int x = 0;\n int y = 0;\n // Hashset to hold cordinates \n HashSet<String> known = new HashSet<String>();\n // add original\n known.add(\"0,0\");\n // go through each char in the string\n for(int i = 0; i < path.length(); ++i){\n if(path.charAt(i) == 'N') ++x;\n \n else if(path.charAt(i) == 'S') --x;\n \n else if(path.charAt(i) == 'W') --y;\n \n else if(path.charAt(i) == 'E') ++y;\n \n String loc = x + \",\" + y;\n // if it is already there, return true\n if(known.contains(loc)) return true;\n // otherwise add and keep going\n known.add(loc);\n }\n // no known cordinates were found so return false\n return false;\n }",
"public boolean isValid(int i) {\n\t String path = xpaths[i];\n\t if(!path.startsWith(\"/\")){\n\t\t return false;\n\t }\n\t path = path.substring(1);\n//\t System.out.println(path);\n\n\t return validHelper(path);\n }",
"public boolean validate() {\n\n String plate = _licensePlate.getText().toString();\n\n if(plate.isEmpty() || plate.length() < 8)\n return false;\n\n else if(plate.charAt(2) == '-' || plate.charAt(5) == '-') {\n\n if (Character.isUpperCase(plate.charAt(0)) && Character.isUpperCase(plate.charAt(1))) { // first case\n if (Character.isDigit(plate.charAt(3)) && Character.isDigit(plate.charAt(4))\n && Character.isDigit(plate.charAt(6)) && Character.isDigit(plate.charAt(7)))\n return true;\n }\n\n else if(Character.isUpperCase(plate.charAt(3)) && Character.isUpperCase(plate.charAt(4))) { // second case\n if (Character.isDigit(plate.charAt(0)) && Character.isDigit(plate.charAt(1))\n && Character.isDigit(plate.charAt(6)) && Character.isDigit(plate.charAt(7)))\n return true;\n }\n\n else if(Character.isUpperCase(plate.charAt(6)) && Character.isUpperCase(plate.charAt(7))) { // third case\n if (Character.isDigit(plate.charAt(0)) && Character.isDigit(plate.charAt(1))\n && Character.isDigit(plate.charAt(3)) && Character.isDigit(plate.charAt(4)))\n return true;\n }\n\n else\n return false;\n\n }\n\n return false;\n }",
"public static boolean isValidNameFormat( String source )\n {\n int minNameLength = 3;\n\n return (source != null) && (source.length() >= minNameLength);\n }",
"private boolean isValidName(String name)\n {\n String reg = \"^[a-zA-Z]+$\";\n return name.matches(reg);\n }",
"public boolean accept(java.io.File pathName, String fileName)\r\n {\r\n\r\n boolean valid = false;\r\n java.io.File testFile = new java.io.File(pathName, fileName);\r\n\r\n valid = (testFile.isFile() && fileName != null && fileName.startsWith(name));\r\n\r\n return valid;\r\n\r\n }",
"public boolean nameValidation(String name) {\n\t char[] chars = name.toCharArray();\n\t int tempNum = 0;\n\t for (char c : chars) {\n\t tempNum += 1;\n\t \tif(!Character.isLetter(c)) {\n\t return false;\n\t }\n\t }\n\t if (tempNum == 0)\n\t \treturn false;\n\n\t return true;\n\t}",
"public static boolean isHidden(String path) {\n return getFilename(path).startsWith(\".\");\n }",
"public boolean validPath(int curRow, int curCol, int movRow, int movCol) {\n\n if(movCol > curCol && curRow == movRow || movCol < curCol && curRow == movRow){\n return true;\n }\n\n if(curRow + 1 == movRow && movCol == curCol || curRow - 1 == movRow && movCol == curCol){\n return true;\n }\n\n return false;\n }",
"public boolean isValidDirectiveName ( String name );",
"private boolean isValidId(String id) {\r\n\t\tboolean result = false;\r\n\t\tif (id.length() >= 1) {\r\n\t\t\tif (Character.isLetter(id.charAt(0))) {\r\n\t\t\t\tif (id.contains(\".\")) {\r\n\t\t\t\t\tString[] tokens = id.split(\"\\\\.\");\r\n\t\t\t\t\tif (tokens.length == 2) {\r\n\t\t\t\t\t\tfor (int i = 0; i < tokens[0].length(); i++) {\r\n\t\t\t\t\t\t\tif (!(tokens[0].charAt(i) == '.'\r\n\t\t\t\t\t\t\t\t\t|| tokens[0].charAt(i) == '_'\r\n\t\t\t\t\t\t\t\t\t|| tokens[0].charAt(i) == '-' || Character\r\n\t\t\t\t\t\t\t\t\t\t.isLetterOrDigit(tokens[0].charAt(i)))) {\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfor (int i = 0; i < tokens[1].length(); i++) {\r\n\t\t\t\t\t\t\tif (!(tokens[0].charAt(i) == '.'\r\n\t\t\t\t\t\t\t\t\t|| tokens[0].charAt(i) == '_'\r\n\t\t\t\t\t\t\t\t\t|| tokens[0].charAt(i) == '-' || Character\r\n\t\t\t\t\t\t\t\t\t\t.isLetterOrDigit(tokens[0].charAt(i)))) {\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"boolean safeIsFile(FsPath path);",
"private boolean isRenameValid()\n{\n String ntext = rename_field.getText();\n if (!isValidId(ntext)) return false;\n if (ntext.equals(start_name)) return false;\n\n return true;\n}",
"private boolean isValidRegistryBasedAuthority(String authority) {\n int index = 0;\n int end = authority.length();\n char testChar;\n \n while (index < end) {\n testChar = authority.charAt(index);\n \n // check for valid escape sequence\n if (testChar == '%') {\n if (index+2 >= end ||\n !isHex(authority.charAt(index+1)) ||\n !isHex(authority.charAt(index+2))) {\n return false;\n }\n index += 2;\n }\n // can check against path characters because the set\n // is the same except for '/' which we've already excluded.\n else if (!isPathCharacter(testChar)) {\n return false;\n }\n ++index;\n }\n return true;\n }"
] |
[
"0.65919125",
"0.63719517",
"0.6337752",
"0.62276155",
"0.61314666",
"0.60715556",
"0.6053824",
"0.59879315",
"0.5979437",
"0.59663725",
"0.5869685",
"0.58664787",
"0.5813612",
"0.58058465",
"0.57907426",
"0.5757196",
"0.57341146",
"0.5686322",
"0.563852",
"0.56330395",
"0.5625987",
"0.55565995",
"0.5531159",
"0.55258334",
"0.5517635",
"0.5506289",
"0.55027074",
"0.5499473",
"0.5474297",
"0.5458679",
"0.54363525",
"0.5429467",
"0.5416292",
"0.541529",
"0.53885573",
"0.5384998",
"0.5382133",
"0.53751457",
"0.5374725",
"0.53604627",
"0.5331173",
"0.53301305",
"0.5318597",
"0.53156245",
"0.53136575",
"0.53053033",
"0.5296939",
"0.5295262",
"0.52926904",
"0.529105",
"0.5287397",
"0.5286647",
"0.5275921",
"0.5272106",
"0.5271516",
"0.52544343",
"0.5243533",
"0.5242839",
"0.5242839",
"0.5233987",
"0.52334654",
"0.5228004",
"0.52276254",
"0.52185255",
"0.5212726",
"0.5200055",
"0.5199498",
"0.5198835",
"0.5188029",
"0.5161577",
"0.51602834",
"0.5160138",
"0.51573104",
"0.5149977",
"0.5146987",
"0.5138197",
"0.51379573",
"0.51286477",
"0.5108217",
"0.5105751",
"0.51009446",
"0.5094811",
"0.509012",
"0.50864834",
"0.5082124",
"0.5081189",
"0.50765496",
"0.50702894",
"0.5069228",
"0.5060312",
"0.5049057",
"0.50440246",
"0.504303",
"0.50273275",
"0.50110203",
"0.500555",
"0.5003416",
"0.49999118",
"0.49942833",
"0.49923"
] |
0.8673819
|
0
|
Resolve a workspacerelative path to correct any problems in capitalization.
|
public static IPath getCanonicalWorkspacePath(IPath wsPath) {
IPath resolvedPath = new Path(""); //$NON-NLS-1$
IContainer container = ResourcesPlugin.getWorkspace().getRoot();
// flag to consume the rest of the path without lookup
boolean failed = false;
for (String segment : wsPath.segments()) {
if (failed || container == null) {
resolvedPath = resolvedPath.append(segment);
continue;
}
IResource child = container.findMember(segment);
if (child != null) {
// found, so correct caps
resolvedPath = resolvedPath.append(segment);
if (child instanceof IContainer) {
container = (IContainer) child;
} else {
container = null;
}
} else {
// not found: manually search
boolean found = false;
try {
for (IResource member : container.members()) {
if (member.getName().equalsIgnoreCase(segment)) {
resolvedPath = resolvedPath.append(member.getName());
found = true;
if (member instanceof IContainer) {
container = (IContainer) member;
} else {
container = null;
}
break;
}
}
} catch (CoreException e) {
// just fail
}
if (!found) {
failed = true;
resolvedPath = resolvedPath.append(segment);
}
}
}
return resolvedPath;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public String resolve(String path)\n {\n\n // strip classname\n path = path.substring(path.lastIndexOf(\"/\") + 1);\n\n return path;\n }",
"private static String normalizePathString(String path) {\n String noUnion = removePrefix(path, \"union:/\");\n // Remove scheme marker\n String noScheme = removeAndBefore(noUnion, \"//\");\n // Remove '%2370!' that forge has, example:\n // union:/C:/Users/natan/.gradle/caches/fabric-loom/1.17.1/net.fabricmc.yarn.1_17_1.1.17.1+build.61-v2-forge-1.17.1-37.0.69/forge-1.17.1-37.0.69-minecraft-mapped.jar%2371!\n // We use 'removeLastPercentSymbol' instead of removing everything after last occurrence of '%' so it works with spaces as well\n // (the last space will be 'deleted', but that doesn't matter for our purposes)\n String noPercent = removeLastPercentSymbol(noScheme);\n // Remove trailing '/' and '!'\n return removeSuffix(removeSuffix(noPercent, \"/\"), \"!\");\n }",
"private String normalizePath(String path)\n {\n return path.replaceAll(\"\\\\\\\\{1,}\", \"/\");\n }",
"public String normalizePathName( final String name );",
"public static void main(String... args) {\nPath path = Paths.get(\".\");\ntry {\n out.println(path.normalize());\n} catch(IOException e){out.println(e);}\n\ntry {\n out.println(path.toRealPath());\n} catch(IOException e){out.println(e);}\n\n}",
"public static IPath findExistingPathIfCaseSensitive(IPath path) {\r\n\t\t// PathUtils (shared with EDC) has the stock implementation \r\n\t\treturn PathUtils.findExistingPathIfCaseSensitive(path);\r\n\t}",
"public final static String normalizePath(String path) { \n return normalizePath( path, true);\n }",
"private String resolveLabel(String aLabel){\n\t\t// Pre-condition\n\t\tif(aLabel == null) return aLabel;\n\t\t// Main code\n\t\tif (aLabel == \"univ\") return null;\n\t\tString actualName = aLabel.contains(\"this/\")?aLabel.substring(\"this/\".length()):aLabel;\n\t\treturn actualName;\n\t}",
"public abstract String resolve();",
"private String fixPath(String Path) {\n\n // Nothing to do if we're running the plugin on a Windows machine.\n if (Global.IsWindowsOS()) {\n return Path;\n }\n\n // Replace all of the Windows separator characters with linux separator characters.\n String NewPath = Path.replaceAll(\"\\\\\\\\\", File.separator);\n\n Log.getInstance().write(Log.LOGLEVEL_TRACE, \"RecordingEpisode.fixPath: \" + Path + \"->\" + NewPath);\n \n return NewPath;\n }",
"private String ensureWellFormed(String res)\r\n {\r\n String resource = res;\r\n int idx;\r\n\r\n // replace all occurances of '.*' with '*'\r\n while( (idx = resource.indexOf(TIGHT_BINDING+LOOSE_BINDING)) != -1)\r\n {\r\n if (idx == 0)\r\n {\r\n resource = LOOSE_BINDING +\r\n resource.substring(TIGHT_BINDING_LEN+LOOSE_BINDING_LEN);\r\n }\r\n else\r\n {\r\n resource = resource.substring(0, idx) + LOOSE_BINDING +\r\n resource.substring(idx+TIGHT_BINDING_LEN+LOOSE_BINDING_LEN);\r\n }\r\n }\r\n\r\n // replace all occurances of '*.' with '*'\r\n while( (idx = resource.indexOf(LOOSE_BINDING+TIGHT_BINDING)) != -1)\r\n {\r\n if (idx == 0)\r\n {\r\n resource = LOOSE_BINDING +\r\n resource.substring(TIGHT_BINDING_LEN+LOOSE_BINDING_LEN);\r\n }\r\n else\r\n {\r\n resource = resource.substring(0, idx) + LOOSE_BINDING +\r\n resource.substring(idx+LOOSE_BINDING_LEN+TIGHT_BINDING_LEN);\r\n }\r\n }\r\n\r\n return resource;\r\n }",
"public static String normalizePath(String path)\r\n {\r\n StringBuilder result = new StringBuilder();\r\n char nextChar;\r\n for(int i = 0; i < path.length(); i++)\r\n {\r\n nextChar = path.charAt(i);\r\n if((nextChar == '\\\\'))\r\n {\r\n // Convert the Windows style path separator to the standard path separator\r\n result.append('/');\r\n }\r\n else\r\n {\r\n result.append(nextChar);\r\n }\r\n }\r\n \r\n return result.toString();\r\n }",
"String resolvePath(String root_url, Enumeration path)\n {\n if (! root_url.endsWith(URL_PATH_SEPARATOR))\n root_url = root_url+URL_PATH_SEPARATOR;\n\n StringBuffer sb = new StringBuffer();\n while (path.hasMoreElements())\n {\n sb.append(path.nextElement());\n sb.append(URL_PATH_SEPARATOR);\n }\n String p = sb.toString();\n if (p.startsWith(URL_PATH_SEPARATOR))\n p = p.substring(1);\n\n return root_url + p;\n }",
"private String sanitizePath(String path)\r\n\t{\r\n\t\tif (path == null)\r\n\t\t\treturn \"\";\r\n\t\telse if (path.startsWith(\"/\"))\r\n\t\t\tpath = path.substring(1);\r\n\r\n\t\treturn path.endsWith(\"/\") ? path : path + \"/\";\r\n\t}",
"public String resolvePath();",
"@Test\n public void testResolveName_againstEmptyPath() {\n assertPathEquals(\"foo\", pathService.emptyPath().resolve(Name.simple(\"foo\")));\n }",
"public static void main(String[] args) {\n Path currentDir = Paths.get(\".\");\n System.out.println(currentDir.toAbsolutePath());\n Path parentDir = Paths.get(\"..\");\n System.out.println(parentDir.toAbsolutePath());\n Path currentDir2 = Paths.get(\"d:\\\\data\\\\projects\\\\.\\\\a-project\");\n System.out.println(currentDir2);\n String path = \"d:\\\\data\\\\projects\\\\a-project\\\\..\\\\another-project\";\n Path parentDir2 = Paths.get(path);\n System.out.println(parentDir2);\n\n String originalPath =\n \"d:\\\\data\\\\projects\\\\a-project\\\\..\\\\another-project\";\n\n Path path1 = Paths.get(originalPath);\n System.out.println(\"path1 = \" + path1);\n\n Path path2 = path1.normalize();\n System.out.println(\"path2 = \" + path2);\n }",
"private String prepareLocation (String location)\n\t{\n\t\tlocation = Utils.pathFixer (location);\n\t\tif (location.startsWith (\"./\"))\n\t\t\tlocation = location.substring (1);\n\t\t\n\t\tif (!location.startsWith (\"/\"))\n\t\t\tlocation = \"/\" + location;\n\t\t\n\t\treturn location;\n\t}",
"private String fixupCase(String s) {\r\n boolean nextIsUpper = true;\r\n StringBuffer sb = new StringBuffer();\r\n\r\n for (int i = 0; i < s.length(); i++) {\r\n char c = s.charAt(i);\r\n if (nextIsUpper) {\r\n c = Character.toUpperCase(c);\r\n } else {\r\n c = Character.toLowerCase(c);\r\n }\r\n sb.append(c);\r\n nextIsUpper = Character.isWhitespace(c);\r\n }\r\n return sb.toString();\r\n }",
"public static String localizePath(String path)\r\n {\r\n StringBuilder result = new StringBuilder();\r\n char nextChar;\r\n for(int i = 0; i < path.length(); i++)\r\n {\r\n nextChar = path.charAt(i);\r\n if((nextChar == '/') || (nextChar == '\\\\'))\r\n {\r\n // Convert the URI separator to the system dependent path separator\r\n result.append(File.separatorChar);\r\n }\r\n else\r\n {\r\n result.append(nextChar);\r\n }\r\n }\r\n \r\n return result.toString();\r\n }",
"public void testCanonicalize() {\n \tassertEquals(\"//\", new Path(\"///////\").toString());\r\n \tassertEquals(\"/a/b/c\", new Path(\"/a/b//c\").toString());\r\n \tassertEquals(\"//a/b/c\", new Path(\"//a/b//c\").toString());\r\n \tassertEquals(\"a/b/c/\", new Path(\"a/b//c//\").toString());\r\n \r\n \t// Test collapsing single dots\r\n \tassertEquals(\"2.0\", \"/\", new Path(\"/./././.\").toString());\r\n \tassertEquals(\"2.1\", \"/a/b/c\", new Path(\"/a/./././b/c\").toString());\r\n \tassertEquals(\"2.2\", \"/a/b/c\", new Path(\"/a/./b/c/.\").toString());\r\n \tassertEquals(\"2.3\", \"a/b/c\", new Path(\"a/./b/./c\").toString());\r\n \r\n \t// Test collapsing double dots\r\n \tassertEquals(\"3.0\", \"/a/b\", new Path(\"/a/b/c/..\").toString());\r\n \tassertEquals(\"3.1\", \"/\", new Path(\"/a/./b/../..\").toString());\r\n }",
"private String normalizePath(String path) {\n boolean absolute = path.startsWith(\"/\");\n int cwdl = cwd.length();\n \n // NOTE: This isn't just a fast path, it handles cases the code below doesn't\n if(!path.startsWith(\".\") && path.indexOf(\"./\") == -1 && path.indexOf(\"//\") == -1 && !path.endsWith(\".\"))\n return absolute ? path.substring(1) : cwdl == 0 ? path : path.length() == 0 ? cwd : cwd + \"/\" + path;\n \n char[] in = new char[path.length()+1];\n char[] out = new char[in.length + (absolute ? -1 : cwd.length())];\n path.getChars(0,path.length(),in,0);\n int inp=0, outp=0;\n \n if(absolute) {\n do { inp++; } while(in[inp] == '/');\n } else if(cwdl != 0) {\n cwd.getChars(0,cwdl,out,0);\n outp = cwdl;\n }\n\n while(in[inp] != 0) {\n if(inp != 0) {\n while(in[inp] != 0 && in[inp] != '/') { out[outp++] = in[inp++]; }\n if(in[inp] == '\\0') break;\n while(in[inp] == '/') inp++;\n }\n \n // Just read a /\n if(in[inp] == '\\0') break;\n if(in[inp] != '.') { out[outp++] = '/'; out[outp++] = in[inp++]; continue; }\n // Just read a /.\n if(in[inp+1] == '\\0' || in[inp+1] == '/') { inp++; continue; }\n if(in[inp+1] == '.' && (in[inp+2] == '\\0' || in[inp+2] == '/')) { // ..\n // Just read a /..{$,/}\n inp += 2;\n if(outp > 0) outp--;\n while(outp > 0 && out[outp] != '/') outp--;\n //System.err.println(\"After ..: \" + new String(out,0,outp));\n continue;\n }\n // Just read a /.[^.] or /..[^/$]\n inp++;\n out[outp++] = '/';\n out[outp++] = '.';\n }\n if(outp > 0 && out[outp-1] == '/') outp--;\n //System.err.println(\"normalize: \" + path + \" -> \" + new String(out,0,outp) + \" (cwd: \" + cwd + \")\");\n int outStart = out[0] == '/' ? 1 : 0;\n return new String(out,outStart,outp - outStart);\n }",
"public static void main(String[] args) throws IOException {\n\t\tPath testFilePath = Paths.get(\"/home/ilmir/Dropbox/Aliya_Ilmir/2дебила\");\n\t\tSystem.out.println(\"Path: \"+testFilePath);\n\t\tline();\n\n\t\t// retrieve basic information about path\n\t\tSystem.out.println(\"Printing file information: \");\n\t\tSystem.out.println(\"\\t getFileName(): \\t\" + testFilePath.getFileName());\n\t\tSystem.out.println(\"\\t getRoot(): \\t\\t\" + testFilePath.getRoot());\n\t\tSystem.out.println(\"\\t getParent(): \\t\\t\" + testFilePath.getParent());\n\t\tline();\n\n\t\t// print path elements\n\t\tSystem.out.println(\"Printing elements of the path: \");\n\t\tfor(Path element : testFilePath) {\n\t\t\tSystem.out.println(\"\\t path element: \" + element);\n\t\t}\n\t\tline();\n\n\t\t//get a path object with relative path\n\t\tPath path = Paths.get(\"./src\");\n\t\tSystem.out.println(\"Path: \"+path);\n\t\tSystem.out.println(\"1) getFileName(): \" + path.getFileName());\n\t\tSystem.out.println(\"2) toUri(): \" + path.toUri());\n\t\tSystem.out.println(\"3) toAbsolutePath(): \" + path.toAbsolutePath());\n\t\tSystem.out.println(\"4) normalize(): \" + path.normalize());\n\n\t\t// get another path object with normalized relative path\n\t\tPath testPathNormalized = Paths.get(path.normalize().toString());\n\t\tSystem.out.println(\"Path normalized: \"+testPathNormalized);\n\t\tSystem.out.println(\"5) normalized absolute path is: \" +\n\t\t\t\ttestPathNormalized.toAbsolutePath());\n\t\tSystem.out.println(\"6) normalized real path is: \" +\n\t\t\t\tpath.toRealPath (LinkOption.NOFOLLOW_LINKS));\n\n\t\tline();\n\n\t\tPath dir = Paths.get(\"/home/ilmir/Dropbox/Aliya_Ilmir\");\n\t\tPath resolvedPath = dir.resolve(\"2дебила\");\n\t\tSystem.out.println(\"Resolved path: \"+resolvedPath);\n\t}",
"private static String qualifiedName2FirstCharacterUppercasedString(final String s) {\n final StringBuffer result = new StringBuffer();\n final Matcher m = Pattern.compile(\"(?:\\\\.|^)(.)\").matcher(s);\n while (m.find()) {\n m.appendReplacement(result,\n m.group(1).toUpperCase());\n }\n m.appendTail(result);\n return result.toString().replaceAll(\"\\\\[\\\\]\", \"Array\");\n }",
"@Test\n public void testRelativize_bothAbsolute() {\n assertRelativizedPathEquals(\"b/c\", pathService.parsePath(\"/a\"), \"/a/b/c\");\n assertRelativizedPathEquals(\"c/d\", pathService.parsePath(\"/a/b\"), \"/a/b/c/d\");\n }",
"private IPath findInitialPath(IPath initialPath) {\n \t\tIPath path = cwd;\n \t\t\n \t\tif (initialPath != null) {\n \t\t\ttry {\n \t\t\t\tIFileInfo info = fileMgr.getResource(initialPath, new NullProgressMonitor()).fetchInfo();\n \t\t\t\tif (info.exists()) {\n \t\t\t\t\tpath = initialPath;\n \t\t\t\t}\n \t\t\t} catch (IOException e) {\n \t\t\t}\n \t\t}\n \t\treturn path;\n \t}",
"public String resolve(final String name) {\n return name.length() > pathLength ? pathLength > 0 ? name.substring(pathLength) : name : null;\n }",
"public static final String normalizePath(String path) {\n\t\t// Normalize the slashes and add leading slash if necessary\n\t\tString normalized = path;\n\t\tif (normalized.indexOf('\\\\') >= 0) {\n\t\t\tnormalized = normalized.replace('\\\\', '/');\n\t\t}\n\n\t\tif (!normalized.startsWith(\"/\")) {\n\t\t\tnormalized = \"/\" + normalized;\n\t\t}\n\n\t\t// Resolve occurrences of \"//\" in the normalized path\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"//\");\n\t\t\tif (index < 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnormalized = normalized.substring(0, index)\n\t\t\t\t\t+ normalized.substring(index + 1);\n\t\t}\n\n\t\t// Resolve occurrences of \"%20\" in the normalized path\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"%20\");\n\t\t\tif (index < 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnormalized = normalized.substring(0, index) + \" \"\n\t\t\t\t\t+ normalized.substring(index + 3);\n\t\t}\n\n\t\t// Resolve occurrences of \"/./\" in the normalized path\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"/./\");\n\t\t\tif (index < 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnormalized = normalized.substring(0, index)\n\t\t\t\t\t+ normalized.substring(index + 2);\n\t\t}\n\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"/../\");\n\t\t\tif (index < 0)\n\t\t\t\tbreak;\n\t\t\tif (index == 0) {\n\t\t\t\treturn (null); // Trying to go outside our context\n\t\t\t}\n\t\t\tint index2 = normalized.lastIndexOf('/', index - 1);\n\t\t\tnormalized = normalized.substring(0, index2)\n\t\t\t\t\t+ normalized.substring(index + 3);\n\t\t}\n\n\t\t// Return the normalized path that we have completed\n\t\treturn (normalized);\n\t}",
"public final static String normalizePath(String path, boolean caseSensitive) {\t\n\t\t\n\t // Check if the file state names should be case sensitive, if not then just uppercase the whole\n\t // path\n\t \n String normPath = path;\n \n\t if ( caseSensitive == true) {\n\t \n \t\t//\tSplit the path into directories and file name, only uppercase the directories to normalize\n \t\t//\tthe path.\n \n \t\tif ( path.length() > 3) {\n \t\t\t\n \t\t\t//\tSplit the path to seperate the folders/file name\n \t\t\t\n \t\t\tint pos = path.lastIndexOf(FileName.DOS_SEPERATOR);\n \t\t\tif ( pos != -1) {\n \t\t\t\t\n \t\t\t\t//\tGet the path and file name parts, normalize the path\n \t\t\t\t\n \t\t\t\tString pathPart = path.substring(0, pos).toUpperCase();\n \t\t\t\tString namePart = path.substring(pos);\n \t\t\t\t\n \t\t\t\t//\tRebuild the path string\n \t\t\t\t\n \t\t\t\tnormPath = pathPart + namePart;\n \t\t\t}\n \t\t}\n\t }\n\t else {\n\n\t // Uppercase the whole path\n\t \n\t normPath = path.toUpperCase();\n\t }\n\t \n\t\t//\tReturn the normalized path\n\t\t\n\t\treturn normPath;\n\t}",
"private String convertModuleNameToCachePathConvention(String moduleName) {\n String upperCaseSign = \"!\";\n for (int i = 0; i < moduleName.length(); i++) {\n if (isUpperCase(moduleName.charAt(i))) {\n moduleName = moduleName.replace(moduleName.substring(i, i + 1), upperCaseSign + toLowerCase(moduleName.charAt(i)));\n i += upperCaseSign.length();\n }\n }\n return moduleName;\n }",
"private static ResolvedPath resolveAbsolutePath(\n EphemeralFsPath oiginalPath,\n EphemeralFsFileSystem fs,\n //the current directory\n //that parts will be resolved from\n INode current,\n //the parts of the path that must still be resolved\n //in reverse order\n List<EphemeralFsPath> remaining,\n //the steps we have already resolved\n List<ResolvedStep> steps,\n boolean noFollowLastSymlink) throws FileSystemException {\n \n if(remaining.isEmpty()) {\n return new ResolvedPath(fs, steps, current, null, !steps.isEmpty());\n }\n \n EphemeralFsPath currentPath = remaining.remove(remaining.size() -1);\n String fileName = currentPath.toString();\n\n if(fileName.equals(\".\")) {\n if(!current.isDir()) {\n throw new FileSystemException(oiginalPath + \": Not a directory\");\n }\n return resolveAbsolutePath(oiginalPath, fs, current, remaining, steps, noFollowLastSymlink);\n }\n else if(fileName.equals(\"..\")) {\n if(!current.isDir()) {\n throw new FileSystemException(oiginalPath + \": Not a directory\");\n }\n //we always have the root as the first step\n //\n if(steps.isEmpty()) {\n //we are trying to .. above the root\n //use root to explore\n //on linux, ls /../tmp will list /tmp\n return resolveAbsolutePath(oiginalPath, fs, fs.getRoot(), remaining, steps, noFollowLastSymlink);\n }\n ResolvedStep parent = steps.remove(steps.size() - 1);\n return resolveAbsolutePath(oiginalPath, fs, parent.directory, remaining, steps, noFollowLastSymlink);\n }\n \n if(current.isDir()) {\n DirectoryEntry entry = current.resolve(currentPath);\n if(entry != null) {\n if(entry.isSymbolicLink()) {\n if(noFollowLastSymlink && remaining.isEmpty()) {\n steps.add(new ResolvedStep(current, fileName));\n return new ResolvedPath(fs, steps, null, entry, true);\n }\n EphemeralFsPath linkTarget = entry.getSymbolicLink();\n EphemeralFsPath absolutePathSoFar = getPaths(fs, steps);\n List<EphemeralFsPath> newParts = absolutePathSoFar.resolve(linkTarget).splitPaths();\n for(int i = newParts.size() -1; i >= 0; i--) {\n remaining.add(newParts.get(i));\n }\n //we have a new absolute path to resolve\n //start over\n steps.clear();\n return resolveAbsolutePath(oiginalPath, fs, fs.getRoot(), remaining, steps, noFollowLastSymlink);\n }\n steps.add(new ResolvedStep(current, fileName));\n return resolveAbsolutePath(oiginalPath, fs, entry.getDestination(), remaining, steps, noFollowLastSymlink);\n }\n } \n\n //we can't resolve everything, stop\n //what we have resolved is still useful\n //for example resolving a non existing\n //path which we want to create\n steps.add(new ResolvedStep(current, fileName));\n if(remaining.isEmpty()) {\n return new ResolvedPath(fs, steps, null, null, true);\n } else {\n return new ResolvedPath(fs, steps, null, null, false); \n }\n \n }",
"ResourceLocation resolve(String path);",
"public void testSimplePropFindWithNonLatinWithFakePathWS() throws Exception\n {\n testSimplePropFindWithNonLatin(getFakePathWS());\n }",
"private String fixCapsedI(final String line) {\n String fixedLine = line;\n\n // I in a word, not first letter\n fixedLine = fixedLine.replaceAll(\"II\", \"ll\"); // except this one, but what word starts with II? Yeah, Roman numbers... sigh\n fixedLine = fixedLine.replaceAll(\"aI\", \"al\");\n fixedLine = fixedLine.replaceAll(\"bI\", \"bl\");\n fixedLine = fixedLine.replaceAll(\"cI\", \"cl\");\n fixedLine = fixedLine.replaceAll(\"dI\", \"dl\");\n fixedLine = fixedLine.replaceAll(\"eI\", \"el\");\n fixedLine = fixedLine.replaceAll(\"fI\", \"fl\");\n fixedLine = fixedLine.replaceAll(\"gI\", \"gl\");\n fixedLine = fixedLine.replaceAll(\"hI\", \"hl\");\n fixedLine = fixedLine.replaceAll(\"iI\", \"il\");\n fixedLine = fixedLine.replaceAll(\"jI\", \"jl\");\n fixedLine = fixedLine.replaceAll(\"kI\", \"kl\");\n fixedLine = fixedLine.replaceAll(\"mI\", \"ml\");\n fixedLine = fixedLine.replaceAll(\"nI\", \"nl\");\n fixedLine = fixedLine.replaceAll(\"oI\", \"ol\");\n fixedLine = fixedLine.replaceAll(\"pI\", \"pl\");\n fixedLine = fixedLine.replaceAll(\"qI\", \"ql\");\n fixedLine = fixedLine.replaceAll(\"rI\", \"rl\");\n fixedLine = fixedLine.replaceAll(\"sI\", \"sl\");\n fixedLine = fixedLine.replaceAll(\"tI\", \"tl\");\n fixedLine = fixedLine.replaceAll(\"uI\", \"ul\");\n fixedLine = fixedLine.replaceAll(\"vI\", \"vl\");\n fixedLine = fixedLine.replaceAll(\"wI\", \"wl\");\n fixedLine = fixedLine.replaceAll(\"xI\", \"xl\");\n fixedLine = fixedLine.replaceAll(\"yI\", \"yl\");\n fixedLine = fixedLine.replaceAll(\"zI\", \"zl\");\n\n // I in a word, could be [If|In|Is|It] so it breaks that, fix it later\n fixedLine = fixedLine.replaceAll(\"Ia\", \"la\");\n fixedLine = fixedLine.replaceAll(\"Ib\", \"lb\");\n fixedLine = fixedLine.replaceAll(\"Ic\", \"lc\");\n fixedLine = fixedLine.replaceAll(\"Id\", \"ld\");\n fixedLine = fixedLine.replaceAll(\"Ie\", \"le\");\n fixedLine = fixedLine.replaceAll(\"If\", \"lf\");\n fixedLine = fixedLine.replaceAll(\"Ig\", \"lg\");\n fixedLine = fixedLine.replaceAll(\"Ih\", \"lh\");\n fixedLine = fixedLine.replaceAll(\"Ii\", \"li\");\n fixedLine = fixedLine.replaceAll(\"Ij\", \"lj\");\n fixedLine = fixedLine.replaceAll(\"Ik\", \"lk\");\n fixedLine = fixedLine.replaceAll(\"Im\", \"lm\");\n fixedLine = fixedLine.replaceAll(\"In\", \"ln\");\n fixedLine = fixedLine.replaceAll(\"Io\", \"lo\");\n fixedLine = fixedLine.replaceAll(\"Ip\", \"lp\");\n fixedLine = fixedLine.replaceAll(\"Iq\", \"lq\");\n fixedLine = fixedLine.replaceAll(\"Ir\", \"lr\");\n fixedLine = fixedLine.replaceAll(\"Is\", \"ls\");\n fixedLine = fixedLine.replaceAll(\"It\", \"lt\");\n fixedLine = fixedLine.replaceAll(\"Iu\", \"lu\");\n fixedLine = fixedLine.replaceAll(\"Iv\", \"lv\");\n fixedLine = fixedLine.replaceAll(\"Iw\", \"lw\");\n fixedLine = fixedLine.replaceAll(\"Ix\", \"lx\");\n fixedLine = fixedLine.replaceAll(\"Iy\", \"ly\");\n fixedLine = fixedLine.replaceAll(\"Iz\", \"lz\");\n\n return fixedLine;\n }",
"public String resolvePath(String path, boolean tryCurrentPath) {\n String realPath = \"\";\n if (tryCurrentPath) {\n realPath = tryExtensionsPath(path);\n // Can't find the file in the active directory.\n if (realPath.isEmpty()) {\n // try to open the file in the same directory as the current file.\n int lastForwardSlash = currentFile().lastIndexOf('/');\n int lastBackwardSlash = currentFile().lastIndexOf('\\\\');\n int lastSlash = Math.max(lastForwardSlash, lastBackwardSlash);\n if (lastSlash != -1) {\n realPath = currentFile().substring(0, lastSlash+1) + path;\n realPath = tryExtensionsPath(realPath);\n }\n }\n }\n \n // Try all search paths\n for (String searchPath: searchPaths) {\n if (!realPath.isEmpty())\n break;\n \n realPath = searchPath + path;\n realPath = tryExtensionsPath(realPath);\n }\n \n return realPath;\n }",
"public ICUResourceBundle findWithFallback(String path)\n/* */ {\n/* 383 */ return findResourceWithFallback(path, this, null);\n/* */ }",
"public T casePathNameCS(PathNameCS object) {\r\n return null;\r\n }",
"private String resolveStringValue()\n {\n ProjectStage ps = null;\n String value = null;\n keyResolved = keyOriginal;\n int keySuffices = 0;\n\n // make the longest key\n // first, try appending resolved parameter\n if (propertyParameter != null && !propertyParameter.isEmpty())\n {\n if (parameterValue != null && !parameterValue.isEmpty())\n {\n keyResolved += \".\" + parameterValue;\n keySuffices++;\n }\n // if parameter value can't be resolved and strictly\n else if (strictly)\n {\n return null;\n }\n }\n\n // try appending projectstage\n if (projectStageAware)\n {\n ps = getProjectStage();\n keyResolved += \".\" + ps;\n keySuffices++;\n }\n\n // make initial resolution of longest key\n value = getPropertyValue(keyResolved);\n\n // try fallbacks if not strictly\n if (value == null && !strictly)\n {\n\n // by the length of the longest resolved key already tried\n // breaks are left out intentionally\n switch (keySuffices)\n {\n\n case 2:\n // try base.param\n keyResolved = keyOriginal + \".\" + parameterValue;\n value = getPropertyValue(keyResolved);\n\n if (value != null)\n {\n return value;\n }\n\n // try base.ps\n ps = getProjectStage();\n keyResolved = keyOriginal + \".\" + ps;\n value = getPropertyValue(keyResolved);\n\n if (value != null)\n {\n return value;\n }\n\n case 1:\n // try base\n keyResolved = keyOriginal;\n value = getPropertyValue(keyResolved);\n return value;\n\n default:\n // the longest key was the base, no fallback\n return null;\n }\n }\n\n return value;\n }",
"private String entryName(String name) {\n name = name.replace(File.separatorChar, '/');\n String matchPath = \"\";\n /* Need to add code to consolidate paths\n for (String path : paths) {\n if (name.startsWith(path)\n && (path.length() > matchPath.length())) {\n matchPath = path;\n }\n }\n */\n name = name.substring(matchPath.length());\n \n if (name.startsWith(\"/\")) {\n name = name.substring(1);\n } else if (name.startsWith(\"./\")) {\n name = name.substring(2);\n }\n return name;\n }",
"@Override\n public List<String> pathFromDisambiguation(ResolvedTime now) {\n return now.toHierarchy();\n }",
"public static String convertPath(String path) {\n String clean = path.replaceAll(\"[^a-zA-Z0-9.-\\\\/]\", \"_\");\n String convert = clean.replace(\"\\\\\", \"/\");\n return convert;\n }",
"protected StringBuilder convertPath(final String path) {\n\t\tStringBuilder pathBuffer = new StringBuilder(\"/app:company_home\");\n\t\tString[] parts = path.split(\"/\");\n\n\t\tString subpath;\n\n\t\tfor(String part : parts) {\n\t\t\tsubpath = part.trim();\n\n\t\t\tif(subpath.length() > 0) {\n\t\t\t\tpathBuffer.append(\"/cm:\").append(ISO9075.encode(subpath));\n\t\t\t}\n\t\t}\n\n\t\treturn pathBuffer;\n\t}",
"public void testAbsolutize() throws Exception {\n\n Object[] test_values = {\n new String[]{\"/base/path\", \"foo.bar\", \"/base/path/foo.bar\"},\n new String[]{\"/base/path/\", \"foo.bar\", \"/base/path/foo.bar\"},\n new String[]{\"/base/path\", \"/foo.bar\", \"/foo.bar\"},\n \n new String[]{\"/base/path\", \"\", \"/base/path\"},\n new String[]{\"/base/path\", null, \"/base/path\"},\n \n new String[]{\"\", \"foo.bar\", \"foo.bar\"},\n new String[]{null, \"foo.bar\", \"foo.bar\"},\n };\n \n for (int i = 0; i < test_values.length; i++) {\n String tests[] = (String[]) test_values[i];\n String test_path = tests[0];\n String test_rel_resource = tests[1];\n String expected = tests[2];\n\n String result = NetUtils.absolutize(test_path, test_rel_resource);\n String message = \"Test \" +\n \" path \" + \"'\" + test_path + \"'\" +\n \" relativeResource \" + \"'\" + test_rel_resource;\n assertEquals(message, expected, result);\n }\n }",
"public VRL resolvePathVRL(String path) throws VRLSyntaxException\n\t{\n\t\treturn getLocation().resolvePath(path); \n\t}",
"private String solutionPath(State goal)\n\t{\n\t\t// TODO \n\t\t\n\t\treturn null; \n\t}",
"public static String fixParentPath(String parentPath) {\n if (parentPath.contains(\"/jsp\"))\n parentPath = parentPath.replace(\"/jsp\", \"\");\n return parentPath.replace('\\\\','/') + \"/\";\n }",
"public static String resolveRelativePath(String relPath, String absPath) {\r\n\t\t// if relative path is really absolute, then ignore absPath (eInnovation\r\n\t\t// change)\r\n\t\tif (relPath.startsWith(\"/\")) {\r\n\t\t\tabsPath = \"\";\r\n\t\t}\r\n\r\n\t\tString newAbsPath = absPath;\r\n\t\tString newRelPath = relPath;\r\n\t\tif (relPath.startsWith(\"$\")) {\r\n\t\t\treturn relPath;\r\n\t\t} else if (absPath.endsWith(\"/\")) {\r\n\t\t\tnewAbsPath = absPath.substring(0, absPath.length() - 1);\r\n\t\t} else {\r\n\t\t\t// absPath ends with a filename, remove it (eInnovation change)\r\n\t\t\tint lastSlashIndex = absPath.lastIndexOf('/');\r\n\t\t\tif (lastSlashIndex >= 0) {\r\n\t\t\t\tnewAbsPath = absPath.substring(0, lastSlashIndex);\r\n\t\t\t} else {\r\n\t\t\t\tnewAbsPath = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tint relPos = newRelPath.indexOf(\"../\");\r\n\t\twhile (relPos > -1) {\r\n\t\t\tnewRelPath = newRelPath.substring(relPos + 3);\r\n\t\t\tint lastSlashInAbsPath = newAbsPath.lastIndexOf(\"/\");\r\n\t\t\tif (lastSlashInAbsPath >= 0) {\r\n\t\t\t\tnewAbsPath = newAbsPath.substring(0,\r\n\t\t\t\t\t\tnewAbsPath.lastIndexOf(\"/\"));\r\n\t\t\t} else {\r\n\t\t\t\t// eInnovation change: fix potential exception\r\n\t\t\t\tnewAbsPath = \"\";\r\n\t\t\t}\r\n\t\t\trelPos = newRelPath.indexOf(\"../\");\r\n\t\t}\r\n\t\tString returnedPath;\r\n\t\tif (newRelPath.startsWith(\"/\")) {\r\n\t\t\treturnedPath = newAbsPath + newRelPath;\r\n\t\t} else {\r\n\t\t\treturnedPath = newAbsPath + \"/\" + newRelPath;\r\n\t\t}\r\n\r\n\t\t// remove any \".\" references to current directory (eInnovation change)\r\n\t\t// For example:\r\n\t\t// \"./junk\" becomes \"junk\"\r\n\t\t// \"/./junk\" becomes \"/junk\"\r\n\t\t// \"junk/.\" becomes \"junk\"\r\n\t\twhile (returnedPath.endsWith(\"/.\")) {\r\n\t\t\treturnedPath = returnedPath.substring(0, returnedPath.length() - 2);\r\n\t\t}\r\n\t\tdo {\r\n\t\t\tint dotSlashIndex = returnedPath.lastIndexOf(\"./\");\r\n\t\t\tif (dotSlashIndex < 0) {\r\n\t\t\t\tbreak;\r\n\t\t\t} else if (dotSlashIndex == 0\r\n\t\t\t\t\t|| returnedPath.charAt(dotSlashIndex - 1) != '.') {\r\n\t\t\t\tString firstSubstring;\r\n\t\t\t\tif (dotSlashIndex > 0) {\r\n\t\t\t\t\tfirstSubstring = returnedPath.substring(0, dotSlashIndex);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfirstSubstring = \"\";\r\n\t\t\t\t}\r\n\t\t\t\tString secondSubstring;\r\n\t\t\t\tif (dotSlashIndex + 2 < returnedPath.length()) {\r\n\t\t\t\t\tsecondSubstring = returnedPath.substring(dotSlashIndex + 2,\r\n\t\t\t\t\t\t\treturnedPath.length());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsecondSubstring = \"\";\r\n\t\t\t\t}\r\n\t\t\t\treturnedPath = firstSubstring + secondSubstring;\r\n\t\t\t}\r\n\t\t} while (true);\r\n\r\n\t\treturn returnedPath;\r\n\t}",
"int getCaseSensitive();",
"@Override\n\tpublic String resolve(EObject from) {\n\t\tString resolvename = super.resolve(from);\n\t\tif (null == resolvename) {\n\t\t\treturn resolvename;\n\t\t}\n\t\t\n\t\tif (!resolvename.endsWith(\".sats\") && !resolvename.endsWith(\".dats\")) {\n\t\t\t// todo didn't check whether path is valid\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// System.out.println(\"resolve: \" + resolvename);\n\t\t\n\t\tResource resource = from.eResource();\n\t\tURI importUri = URI.createURI(resolvename);\n\t\t// is already valid uri\n\t\tif (EcoreUtil2.isValidUri(resource, importUri)) {\n\t\t\treturn resolvename;\n\t\t}\n\n\t\t// get the name of the project\n\t\tString projname = null;\n\t\tString path = from.eResource().getURI().toString();\n\t\tfinal String platform = \"platform:/resource/\";\n\t\t// final String filesys = \"file://\";\n\t\tif (path.startsWith(platform)) {\n\t\t\tprojname = path.substring(platform.length()).split(\"/\")[0];\n\t\t\t// System.out.println(\"projname is \" + projname);\n\t\t resolvename = platform + projname + \"/\" + resolvename;\n\t\t}\n\n\t\treturn resolvename;\n\n\t}",
"public Path resolve(String part) {\n return Paths.get(part);\n }",
"private String fixLine(final String line) {\n // nothing to fix\n if (line == null || \"\".equals(line.trim())) {\n return null;\n }\n\n String fixedLine = line.trim();\n\n // more weird shit - NUL characters, escape stuff\n// fixedLine = fixedLine.replaceAll(\"[\\uFEFF-\\uFFFF]\", \"\");\n fixedLine = fixedLine.replaceAll(\"[\\\\x00]\", \"\");\n\n // Also get rid of the bold/italic/etc tags that might be there\n if (Constants.REMOVE_HTML_TAGS) {\n fixedLine = removeHTMLTags(fixedLine);\n }\n\n // Fix l -> I in lines that only consist of caps (besides the l's) and special characters, like [](): etc.\n fixedLine = fixCapsOnlyLines(fixedLine);\n\n // Replace ` with ' because they just look weird\n if (Constants.CHANGE_QUOTES) {\n fixedLine = changeQuotes(fixedLine);\n }\n\n // most of the fixing happens here\n fixedLine = fixCapsedI(fixedLine);\n\n // fix 'l ', lf, ln, ls, lt, l'm l've etc at start of the line\n if (shouldFixLineStart(fixedLine, \"l\")) {\n // this may not cover everything, but it will cover 99%\n fixedLine = fixLineStart(fixedLine, \"l \", \"ln \", \"ls \", \"lt \", \"lf \", \"l'\", \"lc\", \"lsn't \", \"lt'\", \"lr\", \"ld\", \"lb\", \"lc\",\n \"lg\", \"lh\", \"lj\", \"lk\", \"ll\", \"lm\", \"lp\", \"lq\", \"lr\", \"lv\", \"lw\", \"lx\", \"lz\");\n }\n\n // fix l --> I\n fixedLine = fixedLine.replaceAll(\" l \", \" I \");\n fixedLine = fixedLine.replaceAll(\" l'\", \" I'\");\n\n // if for some reason there is a capital I in the middle of a line (e.g. 2 sentences on one line, a name/place etc.)\n fixedLine = fixWordStarts(fixedLine);\n\n // last round, sometimes mistakes are made, this method tries to fix some of them\n fixedLine = fixMistakes(fixedLine);\n\n // just to be sure, trim again\n fixedLine = fixedLine.trim();\n\n // logging\n if (!fixedLine.equals(line)) {\n System.out.println(\" Changed <[\" + line + \"]> --> to --> <[\" + fixedLine + \"]>.\");\n }\n\n return fixedLine;\n }",
"public String smartUpperCase(String s) {\n\t\t\t \ts = s.substring(0, 1).toUpperCase() + s.substring(1, (s.length()));\n\t s = s.replace(\".\", \"_\");\n\t while (s.contains(\"_ \")) {\n\t \ts = s.replace( s.substring(s.indexOf(\"_ \"), s.indexOf(\"_ \") + 3),\n\t \t\t \". \" + (s.substring(s.indexOf(\"_ \") + 2, s.indexOf(\"_ \") + 3)).toUpperCase()\n\t \t\t );\n\t \t}\n\t s = s.replace(\"_\", \".\");\n\t return s;\n\t\t\t }",
"public FilePath resolve(String relPath) {\n if (path.isEmpty()) {\n return FilePath.of(relPath);\n }\n return FilePath.of(path + \"/\" + relPath);\n }",
"@Test\n public void shouldCorrectlyResolveItemsWithEqualNames() throws Exception {\n final MockFolder folder = rule.createFolder(\"F\");\n final FreeStyleProject prjInRoot = rule.createFreeStyleProject(\"FOO\");\n final FreeStyleProject prjInFolder = folder.createProject(FreeStyleProject.class, \"FOO\");\n\n // Additional spot-checks for the absolute addressing\n assertsPath(\"F/FOO\", null, prjInFolder);\n assertsPath(\"/F/FOO\", null, prjInFolder);\n assertsPath(\"/FOO\", null, prjInRoot);\n }",
"public void testRelativize() throws Exception {\n\n Object[] test_values = {\n new String[]{\"/xml.apache.org\", \"/xml.apache.org/foo.bar\", \"foo.bar\"},\n new String[]{\"/xml.apache.org\", \"/xml.apache.org/foo.bar\", \"foo.bar\"},\n new String[]{\"/xml.apache.org\", \"/xml.apache.org/foo.bar\", \"foo.bar\"},\n };\n for (int i = 0; i < test_values.length; i++) {\n String tests[] = (String[]) test_values[i];\n String test_path = tests[0];\n String test_abs_resource = tests[1];\n String expected = tests[2];\n\n String result = NetUtils.relativize(test_path, test_abs_resource);\n String message = \"Test \" +\n \" path \" + \"'\" + test_path + \"'\" +\n \" absoluteResource \" + \"'\" + test_abs_resource;\n assertEquals(message, expected, result);\n }\n }",
"public ICase retourneLaCase() ;",
"private String cleanPath(String path) {\n if(path == null)\n return path;\n if(path.equals(\"\") || path.equals(\"/\"))\n return path;\n\n if(!path.startsWith(\"/\"))\n path = \"/\" + path;\n path = path.replaceAll(\"/+\", \"/\");\n if(path.endsWith(\"/\"))\n path = path.substring(0,path.length()-1);\n return path;\n }",
"static char[][] solveTask2(char[][] board) {\n for(int i=0; i<board.length; i++){\n for(int j=0; j<board[0].length; j++){\n if(board[i][j]== '.'){\n board = updateBoard(board, i, j);\n }\n }\n }\n\n return board;\n }",
"String getRealPath(String path);",
"public void testConjunctionFailsToResolveWhenFirstPathFails() throws Exception\n {\n resolveAndAssertFailure(new String[] { \"h\", \"f :- g, h\" }, \"?- f\");\n }",
"private void correctConflictingNames(final List<DataObject> sourceDataObjects, final ObjectIdentity<?> targetLocationIdentity, final DmsOperation operation) throws ServiceException {\n final Map<ObjectIdentity<?>, String> originalNames = newHashMap();\n Map<String, DataObject> unresolvedDataObjects = newHashMap();\n final Set<String> resolvedNamesLowercased = newHashSet();\n\n for (final DataObject dataObject : sourceDataObjects) {\n final String objectName = getObjectNameProperty(dataObject);\n originalNames.put(dataObject.getIdentity(), objectName);\n unresolvedDataObjects.put(objectName.toLowerCase(), dataObject);\n }\n\n // Loop until all names are resolved (i.e. no more conflicts)\n int attempt = 0;\n while (!unresolvedDataObjects.isEmpty()) {\n ++attempt;\n\n // Get names conflicting with objects in repository\n final Collection<String> conflictingNamesInRepository = getConflictingNamesInRepository(unresolvedDataObjects.keySet(), targetLocationIdentity);\n\n // Move non-conflicting objects to resolved\n final Iterator<Entry<String, DataObject>> unresolvedDataObjectsIterator = unresolvedDataObjects.entrySet().iterator();\n while (unresolvedDataObjectsIterator.hasNext()) {\n final Entry<String, DataObject> unresolvedDataObjectsEntry = unresolvedDataObjectsIterator.next();\n final String nameLowercased = unresolvedDataObjectsEntry.getKey();\n if (!conflictingNamesInRepository.contains(nameLowercased)) {\n resolvedNamesLowercased.add(nameLowercased);\n unresolvedDataObjectsIterator.remove();\n }\n }\n\n // For conflicting objects, apply name correction template and rebuild map of unresolved objects\n final Map<String, DataObject> newUnresolvedDataObjects = newHashMap();\n for (final Entry<String, DataObject> unresolvedDataObjectsEntry : unresolvedDataObjects.entrySet()) {\n final DataObject unresolvedDataObject = unresolvedDataObjectsEntry.getValue();\n final String currentName = getObjectNameProperty(unresolvedDataObject);\n final String originalName = originalNames.get(unresolvedDataObject.getIdentity());\n final String originalBaseName = removeExtension(originalName);\n final String originalExtensionSuffix = originalName.substring(originalBaseName.length()); // extension including dot (if any)\n\n final String correctedBaseName = String.format(\n getConfig().getConflictingNameTemplate(operation, attempt),\n originalBaseName, attempt, attempt + 1\n );\n final String correctedName = correctedBaseName + originalExtensionSuffix;\n\n if (correctedName.equalsIgnoreCase(currentName)) {\n throw new InsightConfigurationException(String.format(\n \"Failed resolving name conflict for '%s'. Please check '%s' configuration setting\",\n originalName, String.format(\"dataObject.%s.conflictingNameTemplate\", operation.name().toLowerCase()) // TODO(): think how to avoid duplicating property name here and in config class\n ));\n }\n\n final String correctedNameLowercased = correctedName.toLowerCase();\n if (!resolvedNamesLowercased.contains(correctedNameLowercased)) {\n // No conflict with previously resolved names ==> apply name correction\n unresolvedDataObject.getProperties().set(\"object_name\", correctedName);\n newUnresolvedDataObjects.put(correctedNameLowercased, unresolvedDataObject);\n } else {\n // Conflict with a previously resolved name ==> do not apply name correction\n newUnresolvedDataObjects.put(unresolvedDataObjectsEntry.getKey(), unresolvedDataObject);\n }\n }\n unresolvedDataObjects = newUnresolvedDataObjects;\n }\n }",
"private static String cup(String str) {\n\t\treturn str.substring(0,1).toLowerCase() + str.substring(1); \n\t}",
"String getCaseSensitive();",
"@Override\r\n\tpublic void solve() {\n\t\t\r\n\t}",
"protected void foundGoal( Path pathToGoal ) {\n\t\t/* A dummy implementation that does nothing with this\n\t\t exciting news. */\n\t}",
"private String relativize(String p) {\n return Paths.get(\"\").toAbsolutePath().relativize(Paths.get(p).toAbsolutePath()).toString();\n }",
"public ArrayList<String> cleanUpPath(ArrayList<String> path) {\n if (path.size() > 1) {\n for (int i = 0; i < path.size() - 2; i++) {\n if ((path.get(i).equals(\"L\") && path.get(i + 1).equals(\"R\")) || (path.get(i).equals(\"R\") && path.get(i + 1).equals(\"L\"))) {\n path.remove(i + 1);\n path.remove(i);\n } else if ((path.get(i).equals(\"U\") && path.get(i + 1).equals(\"D\")) || (path.get(i).equals(\"D\") && path.get(i + 1).equals(\"U\"))) {\n path.remove(i + 1);\n path.remove(i);\n }\n }\n }\n return path;\n }",
"public void firstToUpperCase() {\n \n }",
"public void finalizePath(){\n\t\tif(getCompletePath()||temp.isEmpty())\n\t\t\treturn;//path has already been finalized or there is no path defined\n\t\telse{\n\t\t\tint LastPos=temp.peekLast().getPos();\n\t\t\tint d = currentPath.getDirection(LastPos);\n\t\t\tPathType type = Map.createPathTileOfType(d,caseEdge);\n\t\t\tPath p = PathFactory.makePath(type,currentPos);\n\t\t\t\n\t\t\tif(p.getEntry()!= LastPos)\n\t\t\t\tp.rotate();\n\t\t\tp.setEnd();\n\t\t\tsetExitPoint(p);\n\t\t\tp.storePathTile();\n\t\t\t\n\t\t\tsetCompletePath(true);\n\t\t\tsetRemainingToScenery();\n\t\t}\n\t\t\n\t\t\n\t}",
"public void testConjunctionFailsToResolveWhenSecondPathFails() throws Exception\n {\n resolveAndAssertFailure(new String[] { \"g\", \"f :- g, h\" }, \"?- f\");\n }",
"public static String getProperLocation(String location) {\n switch (location) {\n case \"newjersey\":\n return \"New Jersey\";\n case \"cnj\":\n return \"Central Jersey\";\n case \"southjersey\":\n return \"South Jersey\";\n case \"longisland\":\n return \"Long Island\";\n default:\n return location;\n }\n }",
"public void fix2() {\n\t\tBufferedReader br;\n\t\tString filename;\n\t\tString[] ar = new String[5];\n\t\t\n\t\ttry {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tSystem.out.println(\"Enter the file name to fix:\\n\");\n\t\t\tfilename = br.readLine();\n\t\t\tSystem.out.println(\"Enter the make:\\n\");\n\t\t\tar[1] = br.readLine();\n\t\t\tSystem.out.println(\"Enter the model:\\n\");\n\t\t\tar[2] = br.readLine();\n\t\t\tSystem.out.println(\"Enter the baseprice:\\n\");\n\t\t\tar[3] = br.readLine();\n\t\t\tSystem.out.println(\"Enter the number of optionsets:\\n\");\n\t\t\tar[4] = br.readLine();\n\t\t\tar[0] = ar[1] + \" \" + ar[2]; //full name\n\t\t\treplaceFirstLine(filename, ar);\n\t\t} catch (Exception e) {\n\t return;\n\t }\n\t}",
"private void upPath() {\n if (!path.equals(FilePathUtil.getRootPath())) {\n onPathChanged(path, new File(path.getParent()));\n path = new File(path.getParent());\n load(null);\n }\n }",
"private String upperCaseFL(String in) {\n\t\treturn in.substring(0,1).toUpperCase() + in.substring(1,in.length());\n\t}",
"protected abstract URL resolve(NamespaceId namesapace, String resource) throws IOException;",
"@Test\n\tpublic void testSortStringsCapital() throws SortException {\n\t\tString[] inputArr = new String[] { \"NICHOLAS\", \"JERRY\", \"ZACKARY\", \"ARTHUR\", \"BENNY\" };\n\t\tList<String> arrayList = sortApplication.sortStringsCapital(inputArr);\n\t\tassertEquals(\"ARTHUR\", arrayList.get(0));\n\t\tassertEquals(\"BENNY\", arrayList.get(1));\n\t\tassertEquals(\"JERRY\", arrayList.get(2));\n\t\tassertEquals(\"NICHOLAS\", arrayList.get(3));\n\t\tassertEquals(\"ZACKARY\", arrayList.get(4));\n\t}",
"public static void updateStrings() {\n String pathName;\n switch (Parameters.getLanguage()) {\n case ENGLISH:\n default:\n pathName = englishStringPath;\n break;\n case SPANISH:\n pathName = spanishStringPath;\n break;\n case CATALAN:\n pathName = catalanStringPath;\n break;\n }\n updateStrings(pathName);\n }",
"protected Node<T> removeFixupCase1(Node<T> u) {\n\t\tflipRight(u.parent);\n\t\treturn u;\n\t}",
"public String simplifyPath(String path) {\n String resString=\"\";\n String[] steRes=path.split(\"/|\\\\.\");\n if (steRes.length==0)\n return \"/\";\n return '/'+steRes[steRes.length-1];\n }",
"private String toCompletePath(String fullRequest) {\n \n///Parse request for file path\nString requestLine[] = new String[] {\" \", \" \", \" \"};\n requestLine = fullRequest.split(\" \");\nString partialPath = requestLine[1];\n \n//If requested path is just \"/\" or \"\", don't return any path\n if(partialPath.length() <= 1) {\n noFileRequested = true;\n return null;\n }\n \nString completePath;\n//If using my Windows machine, the path is different than the school Linux machines\nif (Windows)\n completePath = \"C:/Users/Michelle/eclipse-workspace/P1\" + partialPath;\nelse\n completePath = \".\" + partialPath;\n \n return completePath;\n}",
"private final static String toTitleCase( String s ) {\n\n char[] ca = s.toCharArray();\n\n boolean changed = false;\n boolean capitalise = true;\n\n for ( int i=0; i<ca.length; i++ ) {\n char oldLetter = ca[i];\n if ( oldLetter <= '/'\n || ':' <= oldLetter && oldLetter <= '?'\n || ']' <= oldLetter && oldLetter <= '`' ) {\n /* whitespace, control chars or punctuation */\n /* Next normal char should be capitalized */\n capitalise = true;\n } else {\n char newLetter = capitalise\n ? Character.toUpperCase(oldLetter)\n : Character.toLowerCase(oldLetter);\n ca[i] = newLetter;\n changed |= (newLetter != oldLetter);\n capitalise = false;\n }\n } // end for\n\n return new String (ca);\n\n }",
"private static String capitalize(String s) {\n if (s == null || s.length() == 0) {\n return \"\";\n }\n char first = s.charAt(0);\n if (Character.isUpperCase(first)) {\n return s;\n } else {\n return Character.toUpperCase(first) + s.substring(1);\n }\n }",
"private static String capitalize(String s) {\n if (s == null || s.length() == 0) {\n return \"\";\n }\n\n char first = s.charAt(0);\n if (Character.isUpperCase(first)) {\n return s;\n } else {\n return Character.toUpperCase(first) + s.substring(1);\n }\n }",
"private void findPath(int[][] path){\n int row = rows-1;\n int col = cols-1;\n int count = 1;\n int[][] newpath = new int[row+1][col+1];\n while(row>0 && col> 0){\n if(path[row-1][col-1]+1 == path[row][col]){\n newpath[row][col] = path[row][col];\n System.out.println(\"edit distance: \" + count + \"--> replace '\" + oriString.charAt(row-1) + \"' with '\" + fixString.charAt(col-1)+\"'\");\n count++;\n row--;\n col--;\n }else if(path [row-1][col]+1 == path[row][col]){\n newpath[row][col] = path[row][col];\n System.out.println(\"edit distance: \" + count + \"--> remove '\" + oriString.charAt(row-1) + \"' from str1\");\n row--;\n count++;\n\n }else if(path [row][col-1]+1 == path[row][col]){\n newpath[row][col] = path[row][col];\n System.out.println(\"edit distance: \" + count + \"--> add '\" + fixString.charAt(col-1) + \"' to str1\");\n count++;\n col--;\n }else if(path [row-1][col-1] == path[row][col]){\n newpath[row][col] = path[row][col];\n row--;\n col--;\n }\n }\n if( row != 0){\n while(row > 0){\n if(path[row][col] == path[row-1][col]+1){\n newpath[row][col] = path[row][col];\n System.out.println(\"edit distance: \" + count + \"--> remove '\" + oriString.charAt(row-1) + \"' to str1\");\n count++;\n row--;\n }\n }\n }\n if( col != 0){\n while(col > 0){\n if(path[row][col] == path[row][col-1]+1){\n newpath[row][col] = path[row][col];\n System.out.println(\"edit distance: \" + count + \"--> add '\" + fixString.charAt(col-1) + \"' to str1\");\n count++;\n col--;\n }\n }\n }\n // printPath(newpath);\n }",
"protected Node<T> removeFixupCase2(Node<T> u) {\n\t\tNode<T> w = u.parent;\n\t\tNode<T> v = w.right;\n\t\tpullBlack(w); // w.left\n\t\tflipLeft(w); // w is now red\n\t\tNode<T> q = w.right;\n\t\tif (q.colour == red) { // q-w is red-red\n\t\t\trotateLeft(w);\n\t\t\tflipRight(v);\n\t\t\tpushBlack(q);\n\t\t\tif (v.right.colour == red)\n\t\t\t\tflipLeft(v);\n\t\t\treturn q;\n\t\t} else {\n\t\t\treturn v;\n\t\t}\n\t}",
"public static String getNormalizedServerPath(final String serverPath) {\n ArgumentHelper.checkNotEmptyString(serverPath, \"serverPath\");\n if (isOneLevelMapping(serverPath)) {\n return serverPath.substring(0, serverPath.length() - 1).toLowerCase();\n }\n return serverPath.toLowerCase();\n }",
"private String fixCapsOnlyLines(final String line) {\n if (line.matches(\"^[0-9A-Zl\\\\[\\\\]:'\\\"\\\\(\\\\)\\\\- ]*$\")) {\n return line.replaceAll(\"l\", \"I\");\n }\n return line;\n }",
"@Override\n\tpublic String solveCase(RawInput inCase) {\n\t\treturn solveQuadratic(inCase);\n\t}",
"public void fix3() {\n\t\tBufferedReader br;\n\t\tString filename;\n\t\t\n\t\ttry {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tSystem.out.println(\"Enter the correct file name:\\n\");\n\t\t\tfilename = br.readLine();\n\t\t\treturnStr = filename;\n\t\t} catch (Exception e) {\n\t //return null;\n\t }\n\t}",
"public void testPROPER2() throws Exception {\n\t\tObject retval = execLexer(\"PROPER\", 150, \"or\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"PROPER\", expecting, actual);\n\t}",
"private void helper(String s, int index, List<String> path){\n //base condition to stop recursion\n //when there is no substring to process, add the path to output\n if(index == s.length()){\n output.add(new ArrayList<String>(path));\n return;\n }\n \n //logic\n for(int i=index+1; i <= s.length(); i++){\n /* Generate all possible substrings that start from the current index\n * For each substring, check if it is a palindrome. \n * For each palindromic substring, call the helper function recursively to generate substrings for rest of the string\n */\n String substr = s.substring(index, i);\n if(isPalindrome(substr)){\n path.add(substr);\n helper(s, i, path);\n path.remove(path.size()-1);\n }\n }\n }",
"public ArrayList<String> shortenPath(ArrayList<String> path){\n int currentX = testFunction.startingX;\n int currentY = testFunction.startingY;\n ArrayList<ArrayList<Integer>> board = testFunction.board;\n for (int i = 0; i < path.size(); i++) {\n if(path.get(i).equals(\"U\")) currentY++;\n if(path.get(i).equals(\"D\")) currentY--;\n if(path.get(i).equals(\"L\")) currentX--;\n if(path.get(i).equals(\"R\")) currentX++;\n if(currentX < board.size() && currentY < board.get(0).size() && currentX >= 0 && currentY >= 0) {\n if (board.get(currentX).get(currentY) == 8) {\n ArrayList<String> shortPath = new ArrayList<>();\n for (int j = 0; j <= i; j++) {\n shortPath.add(path.get(j));\n }\n return shortPath;\n }\n }\n }\n return path;\n }",
"public String simplifyPath2(String path) {\n\t\tString[] strs = path.split(\"/\");\n\t\tLinkedList<String> l = new LinkedList<String>();\n\n\t\tfor (String s : strs) {\n\t\t\tif (s.equals(\"..\")) {\n\t\t\t\tif (!l.isEmpty())\n\t\t\t\t\tl.removeLast();\n\t\t\t} else if (s.equals(\"\") || s.equals(\".\"))\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\tl.addLast(s);\n\n\t\t}\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (String s : l) {\n\t\t\tsb.append('/');\n\t\t\tsb.append(s);\n\t\t}\n\t\tif (l.size() == 0)\n\t\t\tsb.append('/');\n\t\treturn sb.toString();\n\t}",
"private String upFirstLetter(){\n\t\tString firstLetter = nameField.substring(0,1);\n\t\tfirstLetter = firstLetter.toUpperCase();\n\t\treturn firstLetter + nameField.substring(1,nameField.length());\n\t}",
"@Override\n\t\tpublic String getRealPath(String path) {\n\t\t\treturn null;\n\t\t}",
"void solve(String result);",
"public static String findPath(String CHAR1, String CHAR2,CampusRouteFindingModel campusModel) {\n\t\t graph<String, Float> g = campusModel.getGraph();\n\t\t Map<String, String> idFirst = campusModel.getName();\n\t\t Map<String,String> nameFirst = campusModel.getID();\n\t\t Map<String, XYLocation> locations = campusModel.getLocations();\n\t\t if(!(nameFirst.containsKey(CHAR1))&&(!(idFirst.containsKey(CHAR1)))) { \n\t\t\t if(!(nameFirst.containsKey(CHAR2))&&(!(idFirst.containsKey(CHAR2)))) {\n\t\t\t\t if (CHAR1.equals(CHAR2)) {\n\t\t\t\t\t return \"Unknown building: [\"+CHAR1+\"]\\n\";\n\t\t\t\t }\n\t\t\t\t return \"Unknown building: [\"+CHAR1+\"]\\n\"+\"Unknown building: [\"+CHAR2+\"]\\n\";\n\t\t\t }\n\t\t\t\treturn \"Unknown building: [\"+CHAR1+\"]\\n\";\n\t\t\t}\n\t\t\tif(!(nameFirst.containsKey(CHAR2))&&(!(idFirst.containsKey(CHAR2)))) {\n\t\t\t\treturn \"Unknown building: [\"+CHAR2+\"]\\n\";\n\t\t\t}\n\t\tif (nameFirst.containsKey(CHAR1)) {\n\t\t\tCHAR1 = nameFirst.get(CHAR1);\n\t\t}\n\t\tif (nameFirst.containsKey(CHAR2)) {\n\t\t\tCHAR2 = nameFirst.get(CHAR2);\n\t\t}\n\t\tString retrn = \"Path from \"+idFirst.get(CHAR1)+\" to \"+idFirst.get(CHAR2)+\":\\n\";\n\t\tdouble fin = 0;\n\t\tString prev = CHAR1;\n\t\tif (Integer.valueOf(CHAR1) > 92) {\n\t\t\tif (Integer.valueOf(CHAR2) > 92) {\n\t\t\t\tif (CHAR1.equals(CHAR2)) {\n\t\t\t\t\t return \"Unknown building: [\"+CHAR1+\"]\\n\";\n\t\t\t\t }\n\t\t\t\treturn \"Unknown building: [\"+CHAR1+\"]\\n\"+\"Unknown building: [\"+CHAR2+\"]\\n\";\n\t\t\t}\n\t\t\treturn \"Unknown building: [\"+CHAR1+\"]\\n\";\n\t\t}\n\t\tif (Integer.valueOf(CHAR2) > 92) {\n\t\t\treturn \"Unknown building: [\"+CHAR2+\"]\\n\";\n\t\t}\n\t\tif (!(CHAR1.equals(CHAR2))) {\n\t\t\tArrayList<edges<String, Double>> tmp = Dijkstra(CHAR1,CHAR2,g);\n\t\t\tif (tmp==null) {\n\t\t\t\treturn \"There is no path from \"+idFirst.get(CHAR1)+\" to \"+idFirst.get(CHAR2)+\".\\n\";\n\t\t\t}\n\t\t\tIterator<edges<String, Double>> print = tmp.iterator();\n\t\t\tprint.next();\n\t\t\twhile (print.hasNext()) {\n\t\t\t\tedges<String, Double> temp = print.next();\n\t\t\t\tString direction = findDirection(locations.get(prev),locations.get(temp.getDest()));\n\t\t\t\tretrn = retrn+\"\\tWalk \"+direction+\" to (\"+ idFirst.get(temp.getDest())+\")\\n\";\n\t\t\t\tprev = temp.getDest();\n\t\t\t\tfin = temp.getLabel();\n\t\t\t}\n\t\t}\n\t\tretrn = retrn+String.format(\"Total distance: %.3f pixel units.\\n\", fin);\n\t\treturn retrn;\n\t}",
"public static String decodePath(String href) {\r\n\t\t// For IPv6\r\n\t\thref = href.replace(\"[\", \"%5B\").replace(\"]\", \"%5D\");\r\n\r\n\t\t// Seems that some client apps send spaces.. maybe..\r\n\t\thref = href.replace(\" \", \"%20\");\r\n\t\ttry {\r\n\t\t\tif (href.startsWith(\"/\")) {\r\n\t\t\t\tURI uri = new URI(\"http://anything.com\" + href);\r\n\t\t\t\treturn uri.getPath();\r\n\t\t\t} else {\r\n\t\t\t\tURI uri = new URI(\"http://anything.com/\" + href);\r\n\t\t\t\tString s = uri.getPath();\r\n\t\t\t\treturn s.substring(1);\r\n\t\t\t}\r\n\t\t} catch (URISyntaxException ex) {\r\n\t\t\tthrow new RuntimeException(ex);\r\n\t\t}\r\n\t}",
"protected Path resolveDfsPath(String attribute) throws SmartFrogException, RemoteException {\n String pathName = sfResolve(attribute, \"\", true);\n try {\n return new Path(pathName);\n } catch (IllegalArgumentException e) {\n throw new SmartFrogLifecycleException(\"Failed to create the path defined by attribute \" + attribute\n + \" with value \\\"\" + pathName\n + \"\\\" : \" + e,\n e,\n this);\n }\n }",
"private static String normalizeDN(String subOrgName, String orgDN) {\n // Return orgDN if subOrgName is either null or empty\n if (subOrgName == null || subOrgName.length() == 0) {\n return (orgDN);\n }\n if (SMSEntry.debug.messageEnabled()) {\n SMSEntry.debug.message(\"OrganizationConfigManager.\"\n + \"normalizeDN()-subOrgName \" + subOrgName);\n }\n String subOrgDN = null;\n if (DN.isDN(subOrgName) && (!subOrgName.startsWith(\"///\"))) {\n int ndx = subOrgName.lastIndexOf(DNMapper.serviceDN);\n if (ndx == -1) {\n // Check for baseDN\n ndx = subOrgName.lastIndexOf(SMSEntry.getRootSuffix());\n }\n if (ndx > 0) {\n subOrgName = subOrgName.substring(0, ndx - 1);\n }\n subOrgDN = DNMapper.normalizeDN(subOrgName) + orgDN;\n } else if (subOrgName.indexOf('/') != -1) {\n String tmp = DNMapper.convertToDN(subOrgName).toString();\n if (SMSEntry.debug.messageEnabled()) {\n SMSEntry.debug.message(\"OrganizationConfigManager.\"\n + \"normalizeDN()-slashConvertedString: \" + tmp);\n }\n if (tmp != null && tmp.length() > 0) {\n if (tmp.charAt(tmp.length() - 1) == ',') {\n subOrgDN = tmp + DNMapper.serviceDN;\n } else {\n int dx = tmp.indexOf(SMSEntry.COMMA);\n if (dx >= 0) {\n subOrgDN = tmp + SMSEntry.COMMA + DNMapper.serviceDN;\n } else {\n subOrgDN = tmp + SMSEntry.COMMA + orgDN;\n }\n }\n } else {\n subOrgDN = orgDN;\n }\n } else if (subOrgName.startsWith(SMSEntry.SUN_INTERNAL_REALM_NAME)) {\n subOrgDN = SMSEntry.ORG_PLACEHOLDER_RDN + subOrgName\n + SMSEntry.COMMA + DNMapper.serviceDN;\n } else {\n if (coexistMode) {\n subOrgDN = orgNamingAttrInLegacyMode + SMSEntry.EQUALS\n + subOrgName + SMSEntry.COMMA\n + DNMapper.realmNameToAMSDKName(orgDN);\n } else {\n subOrgDN = SMSEntry.ORG_PLACEHOLDER_RDN + subOrgName\n + SMSEntry.COMMA + orgDN;\n }\n }\n if (SMSEntry.debug.messageEnabled()) {\n SMSEntry.debug.message(\"OrganizationConfigManager::\"\n + \"normalizeDN() suborgdn \" + subOrgDN);\n }\n return (subOrgDN);\n }"
] |
[
"0.5563999",
"0.5361611",
"0.53389657",
"0.5315151",
"0.52392286",
"0.5182649",
"0.5141884",
"0.5129766",
"0.5039421",
"0.50347334",
"0.50136757",
"0.5009644",
"0.50079894",
"0.49862367",
"0.49757147",
"0.49520633",
"0.4935482",
"0.4930875",
"0.49209857",
"0.48852056",
"0.48618403",
"0.4832243",
"0.48275295",
"0.48149672",
"0.4795874",
"0.47953045",
"0.47920585",
"0.47820663",
"0.47706863",
"0.47611278",
"0.47607684",
"0.4752409",
"0.4703414",
"0.4700164",
"0.46889782",
"0.46821538",
"0.46756762",
"0.467535",
"0.46713036",
"0.46397835",
"0.46369058",
"0.4629578",
"0.46292815",
"0.46124294",
"0.4606379",
"0.45693085",
"0.45515954",
"0.45504758",
"0.4534032",
"0.4533589",
"0.45296967",
"0.4528738",
"0.45223787",
"0.45169777",
"0.45166934",
"0.45130268",
"0.45102778",
"0.4509319",
"0.45060942",
"0.44989616",
"0.44772375",
"0.44572383",
"0.4450372",
"0.4441822",
"0.4440388",
"0.44393912",
"0.44208148",
"0.44129172",
"0.44127342",
"0.4406603",
"0.44023684",
"0.43972105",
"0.43956977",
"0.4389105",
"0.43874958",
"0.4377399",
"0.43669006",
"0.43668717",
"0.4346855",
"0.43400565",
"0.43367448",
"0.43299788",
"0.4316121",
"0.43151647",
"0.43143514",
"0.43123627",
"0.43072745",
"0.43010578",
"0.429696",
"0.42968556",
"0.42957687",
"0.42913833",
"0.4286451",
"0.42861563",
"0.42824903",
"0.42824784",
"0.42715022",
"0.42661166",
"0.42638162",
"0.42607778"
] |
0.5344576
|
2
|
This is an analogue to new Path(String) but avoids some problems in the implementation when pathString is a relative path.
|
public static IPath createPossiblyRelativePath(String pathString) {
// canonicalize slashes
char[] pathChars = pathString.toCharArray();
int offset = 0;
for (int i = 0; i < pathChars.length; i++) {
if (pathChars[i] == '\\')
pathChars[i] = '/';
}
// The problem is, if "./" appears, then "../"'s after it are dropped,
// so get rid of "./" early. The result will still be relative.
while (offset + 2 <= pathChars.length) {
if (pathChars[offset] == '.' && pathChars[offset+1] == '/') {
offset += 2;
} else {
break;
}
}
return PathUtils.createPath(new String(pathChars, offset, pathChars.length - offset));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public Path(String path) {\n this(null, path);\n }",
"Path createPath();",
"public ElementDefinitionDt setPath( String theString) {\n\t\tmyPath = new StringDt(theString); \n\t\treturn this; \n\t}",
"void path(String path);",
"void path(String path);",
"@Nonnull\n Path getPath();",
"Path getPath();",
"public Builder setPath(final String value) {\n _path = value;\n return self();\n }",
"public Path getPath();",
"public Path getPath(String path,String nombreArchivo);",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"public Path(Path parent, String path) {\n this.parts = (parent == null) ? ArrayUtils.EMPTY_STRING_ARRAY : parent.parts;\n path = StringUtils.stripStart(path, \"/\");\n this.index = path.equals(\"\") || path.endsWith(\"/\");\n path = StringUtils.stripEnd(path, \"/\");\n if (!path.equals(\"\")) {\n String[] child = path.split(\"/\");\n String[] res = new String[this.parts.length + child.length];\n for (int i = 0; i < this.parts.length; i ++) {\n res[i] = this.parts[i];\n }\n for (int i = 0; i < child.length; i++) {\n res[this.parts.length + i] = child[i];\n }\n this.parts = res;\n }\n }",
"public abstract String getPath();",
"public abstract String getPath();",
"String getRealPath(String path);",
"public String path(String path1, String path2);",
"Path getPath(String name) throws IOException;",
"IPath getPath();",
"public static String getPath(String file_path)\n {\n String file_separator = System.getProperty(\"file.separator\"); //Bug Id 81741\n if (file_path == null)\n return null;\n else if (file_path.substring(file_path.length() - 1).equals(file_separator))//Bug Id 81741, substitute file_separator to System.getProperty(\"file.separator\")\n return file_path;\n else\n {\n \t //Bug Id 81741, Start \n\t if (\"/\".equals(file_separator) && (file_path.indexOf(file_separator) == -1))\n\t {\n\t file_path = file_path.replaceAll(\"\\\\\\\\\", \"/\");\n\t return ((new File(file_path)).getParent()).replaceAll(\"/\",\"\\\\\\\\\");\n\t }\n\t //Bug Id 81741, End\n\t else\n return (new File(file_path)).getParent();\n }\n }",
"public Builder addPath(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensurePathIsMutable();\n path_.add(value);\n onChanged();\n return this;\n }",
"public ElementDefinitionDt setPath(StringDt theValue) {\n\t\tmyPath = theValue;\n\t\treturn this;\n\t}",
"public String getPath();",
"public String getPath();",
"public String getPath();",
"CtPath getPath();",
"public static String toFilePath(String path) {\n return !isNullOrEmpty(path) && isDirectoryPath(path)\n ? path.substring(0, path.length() - 1)\n : path;\n }",
"public abstract boolean isPath();",
"public String resolvePath();",
"@SuppressWarnings(\"unused\")\n\tpublic static void main(String[] args) throws URISyntaxException {\n\t\tSystem.out.println(\"Creating \\\"Path\\\" instances:\");\n\t\tSystem.out.println(\" p1 = d:/Temp/E53Z/Archives/\");\n\t\tSystem.out.println(\" p2 = /tmp/foo\");\n\t\tSystem.out.println(\" p3 = file:///Users/joe/FileTest.java\");\n\t\tPath p1 = Paths.get(\"d:/Temp/E53Z/Archives/\");\n\t\tPath p2 = Paths.get(\"/tmp/foo\");\n\t\tPath p3 = Paths.get(URI.create(\"file:///Users/joe/FileTest.java\"));\n\n\t\t/* Retrieving Information about a Path */\n\t\tSystem.out.println(\"\\nRetrieving information about a Path\");\n\t\tSystem.out.format(\" p1.toString: %s%n\", p1.toString() );\n\t\tSystem.out.format(\" p1.getFileName: %s%n\", p1.getFileName() );\n\t\tSystem.out.format(\" p1.getName(0): %s%n\", p1.getName(0) );\n\t\tSystem.out.format(\" p1.getNameCount: %d%n\", p1.getNameCount());\n\t\tSystem.out.format(\" p1.subpath(0,2): %s%n\", p1.subpath(0,2) );\n\t\tSystem.out.format(\" p1.getParent: %s%n\", p1.getParent() );\n\t\tSystem.out.format(\" p1.getRoot: %s%n\", p1.getRoot() );\n\t\t\n\t\t/* Removing Redundancies From a Path */\n\t\tSystem.out.println(\"\\nRemoving redundancies From a Path\");\n\t\tPath p4 = Paths.get(\"/home/sally/../joe/foo\");\n\t\tSystem.out.println(\" Ful path: \" + p4);\n\t\tSystem.out.println(\" Normalized path: \" + p4.normalize());\n\n\t\t/* Converting a Path */\n\t\tSystem.out.println(\"\\nConverting a Path\");\n\t\tPath p5 = Paths.get(\"/Home/logFile/\");\n\t\tSystem.out.println(\" p5.toUri: \" + p5.toUri());\n\t\tSystem.out.println(\" p5.toAbsolutePath: \" + p5.toAbsolutePath());\n\t\ttry {\n\t\t\tSystem.out.println(\" p5.toRealPath: \" + p5.toRealPath(LinkOption.NOFOLLOW_LINKS));\n\t\t} catch (NoSuchFileException x) {\n\t\t System.out.format(\" Exception: p5 = %s: no such\" + \" file or directory%n\", p5);\n\t\t // Logic for case when file doesn't exist.\n\t\t} catch (IOException x) {\n\t\t System.out.format(\" Exception: %s%n\", x);\n\t\t // Logic for other sort of file error.\n\t\t}\n\t\t\n\t\t/* Joining two paths */\n\t\tSystem.out.println(\"\\nJoining two paths\");\n\t\tPath p6 = Paths.get(\"/Home/logFile/\");\n\t\tPath p7 = Paths.get(\"log.txt\");\n\t\tSystem.out.println(\" p6 = \" + p6);\n\t\tSystem.out.println(\" p7 = \" + p7);\n\t\tSystem.out.println(\" p6.resolve(p7) = \" + p6.resolve(p7));\n\t\t\n\t\t/* Creating a path between two paths */\n\t\tSystem.out.println(\"\\nCreating a path between two paths\");\n\t\tPath p8 = Paths.get(\"D:/Home/logFileS/\");\n\t\tPath p9 = Paths.get(\"D:/Home/TextFiles/\");\n\t\tSystem.out.println(\" p8 = \" + p8);\n\t\tSystem.out.println(\" p9 = \" + p9);\n\t\tSystem.out.println(\" p8.relativize(p9) = \" + p8.relativize(p9));\n\t\tSystem.out.println(\" !!! Paths.get(\\\"\\\").toAbsolutePath().toString(); = \" + Paths.get(\"\").toAbsolutePath().toString());\n\t\tSystem.out.println(\" !!! p8.relativize(p9).toAbsolutePath() = \" + p8.relativize(p9).toAbsolutePath());\n\t\t\n\t\t/* Comparing Two Paths */\n\t\tSystem.out.println(\"\\nComparing two paths\");\n\t\tPath p10 = Paths.get(\"D:/Home/logFiles\");\n\t\tPath p11 = Paths.get(\"D:/Home\");\n\t\tPath p12 = Paths.get(\"logFiles\");\n\t\tPath p13 = Paths.get(\"D:/Home/logFiles\");\n\t\tPath p14 = Paths.get(\"D:/Home/TextFiles/../logFiles\");\n\t\tSystem.out.println(\" p10 = \" + p10);\n\t\tSystem.out.println(\" p11 = \" + p11);\n\t\tSystem.out.println(\" p12 = \" + p12);\n\t\tSystem.out.println(\" p13 = \" + p13);\n\t\tSystem.out.println(\" p14 = \" + p14);\n\t\tSystem.out.println(\" p10.equils(p13) = \" + p10.equals(p13));\n\t\tSystem.out.println(\" p10.startsWith(p11) = \" + p10.startsWith(p11));\n\t\tSystem.out.println(\" p10.endsWith(p12) = \" + p10.endsWith(p12));\n\t\tSystem.out.println(\" p10.equils(p14) = \" + p10.equals(p14));\n\t\ttry {\n\t\t\tSystem.out.println(\" Files.isSameFile(p10, p14) = \" + Files.isSameFile(p10, p14)); // It is true if both files(folders) exist.\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t/* Iterating over Path \"p10\") */\n\t\tSystem.out.print(\"\\nIterating over Path \\\"p10\\\"\\n \");\n\t\tfor(Path name: p10){\n\t\t\tSystem.out.print(\"[\" + name + \"]\");\n\t\t}\n\t\t\n\t\t\n\t}",
"@Nullable String getPath();",
"public Builder setSrcPath(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n srcPath_ = value;\n onChanged();\n return this;\n }",
"public FilePath resolve(String relPath) {\n if (path.isEmpty()) {\n return FilePath.of(relPath);\n }\n return FilePath.of(path + \"/\" + relPath);\n }",
"public void initPath(Path p) {\r\n\tpath = new Path(p);\r\n}",
"public String getPath()\r\n/* 26: */ {\r\n/* 27:57 */ return this.path;\r\n/* 28: */ }",
"private static Path speculativeFastParsePath(String path) {\n String s = ConfigImplUtil.unicodeTrim(path);\n if (s.isEmpty())\n return null;\n if (hasUnsafeChars(s))\n return null;\n if (s.startsWith(\".\") || s.endsWith(\".\") || s.contains(\"..\"))\n return null; // let the full parser throw the error\n\n PathBuilder pb = new PathBuilder();\n appendPathString(pb, s);\n return pb.result();\n }",
"String getExternalPath(String path);",
"public static Path<?> getPath(Path<?> path, String propertyPath) {\n\tif (StringUtils.isEmpty(propertyPath))\n\t return path;\n\n\tString name = StringUtils.substringBefore(propertyPath, PropertyUtils.PROPERTY_SEPARATOR);\n\tPath<?> p = path.get(name);\n\n\treturn getPath(p,\n\t\tStringUtils.substringAfter(propertyPath, PropertyUtils.PROPERTY_SEPARATOR));\n\n }",
"public String getPath(String from, String to, String pathAlgo);",
"public String getPath(String strPathName) {\t\t\n\t\tPathproperties = new Properties();\n\t try {\n\t FileInputStream Master = new FileInputStream(filePath);\n\t Pathproperties.load(Master);\n\t Master.close();\n\t }catch (IOException e) {\n\t System.out.println(e.getMessage());\n\t }\n\t return Pathproperties.getProperty(strPathName);\n\t}",
"public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }",
"public Builder setCurrentPath(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n currentPath_ = value;\n onChanged();\n return this;\n }",
"public interface Pathable<T> {\n\n T forPath(String path);\n\n}",
"public void initPath() {\r\n\t\tpath = new Path();\r\n\t}",
"private String makePathAbsolute(String pathString, IPath root) {\n IPath path = new Path(pathString.trim());\n if (!path.isEmpty() && !path.isAbsolute()) {\n IPath filePath = root.append(path);\n return filePath.toOSString();\n }\n return path.toOSString();\n }",
"public IPathItem getPath(String path){\r\n return pathsMap.get(path);\r\n }",
"private static File parsePath(String path) {\n\t\tpath = (path == null ? \"\" : path.trim());\n\t\tif (path.startsWith(\"file://\")) {\n\t\t\tpath = path.substring(\"file://\".length());\n\t\t} else if (path.startsWith(\"file:\")) { \n\t\t\tpath = path.substring(\"file:\".length());\t\n\t\t}\n\t\t\n\t\tif (path.length() == 0 || path.equals(\".\")) {\n\t\t\tpath = System.getProperty(\"user.dir\", \".\"); // CWD\n\t\t} else {\t\n\t\t\t// convert separators to native format\n\t\t\tpath = path.replace('\\\\', File.separatorChar);\n\t\t\tpath = path.replace('/', File.separatorChar);\n\t\t\t\n\t\t\tif (path.startsWith(\"~\")) {\n\t\t\t\t// substitute Unix style home dir: ~ --> user.home\n\t\t\t\tString home = System.getProperty(\"user.home\", \"~\");\n\t\t\t\tpath = home + path.substring(1);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new File(path);\n\t}",
"public String getPath() {\n\t\treturn getString(\"path\");\n\t}",
"public Builder addPaths(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensurePathsIsMutable();\n paths_.add(value);\n onChanged();\n return this;\n }",
"public void setPath(String path)\r\n/* 21: */ {\r\n/* 22:53 */ this.path = path;\r\n/* 23: */ }",
"public void setPath(String path);",
"public static String getPath(String uri) {\n return createUri(uri).getPath();\n }",
"public Path resolve(String part) {\n return Paths.get(part);\n }",
"Path getHasPath();",
"String fullpath(String path) {\n return fullpath(path, null);\n }",
"public ResourcePathIterator(String path) {\n\n if (path == null || path.length() == 0) {\n\n // null or empty path, there is nothing to return\n nextPath = null;\n\n } else {\n\n // find last non-slash character\n int i = path.length() - 1;\n while (i >= 0 && path.charAt(i) == '/') {\n i--;\n }\n\n if (i < 0) {\n // only slashes, assume root node\n nextPath = \"/\";\n\n } else if (i < path.length() - 1) {\n // cut off slash\n nextPath = path.substring(0, i + 1);\n\n } else {\n // no trailing slash\n nextPath = path;\n }\n }\n }",
"@Override\n\t\t\tprotected URI toUriImpl(String path) throws URISyntaxException {\n\t\t\t\treturn toFileToURI(path);\n\t\t\t}",
"public Path parsePath(final String s) {\n setString(s);\n p = preparePath();\n\n setString(s);\n\n currentX = 0;\n currentY = 0;\n smoothQCenterX = 0;\n smoothQCenterY = 0;\n smoothCCenterX = 0;\n smoothCCenterY = 0;\n\n current = read();\n skipSpaces();\n\n // Multiple coordinate pairs after a moveto\n // are like a moveto followed by lineto\n switch(current) {\n case 'm':\n parsem();\n parsel();\n break;\n case 'M':\n parseM();\n parseL();\n break;\n\tcase -1:\n \t //an empty path is valid.\n \t break; \n default:\n throw new IllegalArgumentException();\n }\n\n loop: for (;;) {\n switch (current) {\n case 0xD:\n case 0xA: \n case 0x20:\n case 0x9:\n current = read();\n break;\n case 'z':\n case 'Z':\n current = read();\n p.close();\n currentX = lastMoveToX;\n currentY = lastMoveToY;\n break;\n case 'm':\n parsem();\n case 'l':\n parsel();\n break;\n case 'M':\n parseM();\n case 'L':\n parseL();\n break;\n case 'h':\n parseh();\n break;\n case 'H':\n parseH();\n break;\n case 'v':\n parsev();\n break;\n case 'V':\n parseV();\n break;\n case 'c':\n parsec();\n break;\n case 'C':\n parseC();\n break;\n case 'q':\n parseq();\n break;\n case 'Q':\n parseQ();\n break;\n case 's':\n parses();\n break;\n case 'S':\n parseS();\n break;\n case 't':\n parset();\n break;\n case 'T':\n parseT();\n break;\n case -1:\n break loop;\n default:\n throw new IllegalArgumentException();\n }\n \n }\n\n skipSpaces();\n if (current != -1) {\n throw new IllegalArgumentException();\n }\n\n return p;\n }",
"public Builder setFilePath(\n java.lang.String value) {\n copyOnWrite();\n instance.setFilePath(value);\n return this;\n }",
"@Override\n public Path getPath() {\n throw new RuntimeException( \"Not yet implemented.\" );\n }",
"public void setPath(String path)\n {\n try\n {\n // Tokenize the path\n pathArray = getPathResolved(path);\n \n // Set path property\n this.path = path;\n }\n catch (NumberFormatException nfe)\n {\n // Reset path property\n this.path = \"\";\n }\n }",
"public Builder setPath(\n int index, java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensurePathIsMutable();\n path_.set(index, value);\n onChanged();\n return this;\n }",
"void setPath(String path);",
"@Override\n\t\tpublic String getRealPath(String path) {\n\t\t\treturn null;\n\t\t}",
"public final String getPath()\n {\n return path;\n }",
"public abstract String getFullPath(final String resourcePath);",
"public abstract String getFullPath();",
"public java.lang.String getPath(int index) {\n return path_.get(index);\n }",
"public DPath(String path)\n throws Exception {\n if (!setUpDpath(path)) {\n throw new Exception();\n }\n doSpesificationPart(path);\n }",
"public Builder setTargetPath(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n targetPath_ = value;\n onChanged();\n return this;\n }",
"PathSegments getPath();",
"protected String getPath ()\n\t{\n\t\treturn path;\n\t}",
"public java.lang.String getPath(int index) {\n return path_.get(index);\n }",
"public String path() {\n return filesystem().pathString(path);\n }",
"public static String path(final String fileName) {\n final int sep = fileName.lastIndexOf(File.separatorChar);\n return fileName.substring(0, sep);\n }",
"public String toPathString() {\n return path();\n }",
"public void setPath(String path) {\r\n this.path = path;\r\n }",
"public final String getPath() {\n\t return m_path;\n\t}",
"public static Path getFile(final String path) throws URISyntaxException {\n final URL resource = classLoader.getResource(path);\n checkIfFound(resource, path);\n final URI uri = resource.toURI();\n checkIfFound(uri, path);\n File file = new File(uri);\n checkIfFound(file, path);\n return file.toPath();\n }",
"private static String normalize(String pathString) {\n if (pathString.contains(\"//\") || pathString.indexOf('\\\\') >= 0) {\n pathString = pathString.replaceAll(\"[\\\\\\\\/]+\", \"/\");\n }\n\n // Strip leading './'\n if (pathString.startsWith(\"./\")) {\n pathString = pathString.substring(2);\n }\n\n // Strip trailing '/.', '/'\n if (pathString.endsWith(\"/.\")) {\n pathString = pathString.substring(0, pathString.length() - 2);\n } else if (pathString.endsWith(\"/\")) {\n pathString = pathString.substring(0, pathString.length() - 1);\n }\n\n return pathString;\n }",
"@Override\n\tpublic String getRealPath(String path) {\n\t\treturn null;\n\t}",
"public static IPath getComparablePath(IPath path) {\r\n\t\tif (path == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tif (HostOS.IS_WIN32) {\r\n\t\t\treturn new Path(path.toOSString().toLowerCase());\r\n\t\t}\r\n\t\t\r\n\t\treturn path;\r\n\t}",
"public void setPath(String path){\n mPath = path;\n }",
"public void setPath(String path) {\r\n\t\tthis.path = path;\r\n\t}",
"public void setPath(String path) {\r\n\t\tthis.path = path;\r\n\t}",
"public void setPath(String path) {\r\n\t\tthis.path = path;\r\n\t}",
"public void setPath(String path)\n {\n this.path = path;\n }",
"public StringDt getPathElement() { \n\t\tif (myPath == null) {\n\t\t\tmyPath = new StringDt();\n\t\t}\n\t\treturn myPath;\n\t}",
"public static String getPath(String fn) {\n\t\tif (fn == null) {\n\t\t\treturn null;\n\t\t}\n\t\tint i = fn.lastIndexOf(File.separator);\n\t\treturn (i > -1) ? fn.substring(0, i) : fn;\n\t}",
"public URIBuilder setPath(final String path) {\n this.path = path;\n this.encodedSchemeSpecificPart = null;\n this.encodedPath = null;\n return this;\n }",
"public void setPath(String path) {\n this.path = path;\n }",
"@Override\r\n public String getPathDecoded() throws FileSystemException {\r\n if (decodedAbsPath == null) {\r\n decodedAbsPath = UriParser.decode(getPath());\r\n }\r\n\r\n return decodedAbsPath;\r\n }",
"public void setPath(String path) {\n this.path = path;\n }",
"public void setPath(String path) {\n this.path = path;\n }",
"public void setPath(String path) {\n this.path = path;\n }",
"public void setPath(String path) {\n this.path = path;\n }",
"public void setPath(String path) {\n this.path = path;\n }"
] |
[
"0.64360666",
"0.62951124",
"0.6180512",
"0.6078494",
"0.6078494",
"0.6072257",
"0.6070854",
"0.6061382",
"0.6025599",
"0.5936771",
"0.5900771",
"0.5900771",
"0.5900771",
"0.5900771",
"0.5900771",
"0.5900281",
"0.5842119",
"0.5842119",
"0.58265996",
"0.57964855",
"0.57878846",
"0.5766705",
"0.5759615",
"0.56800157",
"0.5661063",
"0.56068325",
"0.56068325",
"0.56068325",
"0.55843997",
"0.5565253",
"0.5544083",
"0.54967475",
"0.54949766",
"0.54845643",
"0.54788214",
"0.5451885",
"0.5431864",
"0.5429909",
"0.54169494",
"0.540636",
"0.53998876",
"0.5372063",
"0.53154445",
"0.53127474",
"0.53122085",
"0.53065187",
"0.5281937",
"0.52814156",
"0.5275889",
"0.5274506",
"0.52602005",
"0.5259304",
"0.52557737",
"0.521633",
"0.52127576",
"0.5208372",
"0.51967186",
"0.51907873",
"0.51739717",
"0.51733744",
"0.5172635",
"0.5168033",
"0.5167285",
"0.5148307",
"0.51471907",
"0.51442146",
"0.51435655",
"0.5140264",
"0.514026",
"0.5139675",
"0.51262087",
"0.5125204",
"0.5120161",
"0.51201546",
"0.5119391",
"0.5113097",
"0.5103799",
"0.5103003",
"0.5100492",
"0.509326",
"0.5084612",
"0.50788456",
"0.5075564",
"0.50737864",
"0.506873",
"0.5059563",
"0.5059277",
"0.5059277",
"0.5059277",
"0.50568867",
"0.5054022",
"0.50473416",
"0.50453496",
"0.5042106",
"0.5035508",
"0.502959",
"0.502959",
"0.502959",
"0.502959",
"0.502959"
] |
0.66776127
|
0
|
Tell if the given path refers to a parent directory (e.g. contains ".." entries)
|
public static boolean isPathInParent(IPath path) {
// first see if any segments are ".." at all
for (int i = 0; i < path.segmentCount(); i++) {
if (path.segment(i).equals("..")) { //$NON-NLS-1$
// comprehensive check, canonicalizing
path = new Path(path.toString());
if (path.segmentCount() > 0 && path.segment(0).equals("..")) { //$NON-NLS-1$
return true;
} else {
return false;
}
}
}
return false;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public boolean isParent() { return _file.isDir(); }",
"public boolean isDirectory(String path);",
"private String getParentPath(String path) {\n int slash = path.lastIndexOf('/');\n if (slash == -1) {\n return null;\n } else {\n if (slash == 0) {\n // return \"root\" if parent path is empty string\n return \"/\";\n } else {\n return path.substring(0, slash);\n }\n }\n }",
"public Boolean isDirectory(IDirectory parentDirectory, String path) {\r\n // Get the item given by the path\r\n DirectoryTreeNode item = this.getItemGivenPath(parentDirectory, path);\r\n return item != null && item instanceof IDirectory;\r\n }",
"public Boolean isGrandParent(DirectoryTreeNode dirMove,\r\n DirectoryTreeNode newParentDir) {\r\n if (dirMove.equals(this.rootDir)) {\r\n // this directory does not exist\r\n return true;\r\n } else if (newParentDir.equals(this.rootDir)) {\r\n return false;\r\n } else {\r\n // Get the parent directory of currentDirectory\r\n Directory parent = (Directory) newParentDir.getParentDirectory();\r\n // Loop until parent is not the root\r\n while (!parent.equals(this.rootDir)) {\r\n // Check if the parent is equal to the dirOne\r\n if (parent.equals(dirMove)) {\r\n return true;\r\n }\r\n // Set parent to the parent directory of the parent\r\n parent = (Directory) parent.getParentDirectory();\r\n }\r\n // If loop terminates that means it is not a grandparent\r\n return false;\r\n }\r\n }",
"private static String getParentPath(String path) {\n return path.contains(\".\") ? path.substring(0, path.lastIndexOf('.')) : \"\";\n }",
"public boolean isParent(File child) {\n\t\tboolean result = false;\n\t\t\n\t\tif (child != null && this != null) {\n\t\t\tif (child.getParentFile() == null) {\n\t\t\t\tresult = false;\n\t\t\t} else {\n\t\t\t\tif (child.getParentFile().getAbsolutePath().equals(this.getAbsolutePath())) {\n\t\t\t\t\tresult = true;\n\t\t\t\t} else {\n\t\t\t\t\tresult = isParent((File) child.getParentFile());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public boolean isParent(String child) {\n\t\treturn this.isParent(new File(child));\n\t}",
"private Path safeGetParentsParent(Path path) {\n if (path.getParent() != null && path.getParent().getParent() != null\n && path.getParent().getParent().getParent() != null) {\n return path.getParent().getParent().getParent();\n }\n return null;\n }",
"public static boolean parentFolderExists(@NotNull File file, boolean createIfNot) throws IOException {\n File parentFile = file.getParentFile();\n if (parentFile == null) {\n throw new IOException(\"Cannot create a file in root folder: \" + file.getAbsolutePath());\n }\n boolean alreadyExists = parentFile.exists();\n if (!alreadyExists && createIfNot) {\n boolean createdPath = parentFile.mkdirs();\n if (!createdPath) {\n throw new IOException(\"Cannot create a path to file: \" + file.getAbsolutePath());\n }\n alreadyExists = true;\n }\n return alreadyExists;\n }",
"private boolean isChild(String parentPath, String path) throws IOException\n {\n return IOUtil.isChild(createMockFile(parentPath), createMockFile(path));\n }",
"public boolean isParent(AppFile anItem) { return anItem.isParent(); }",
"final Path toParent(final Path path) throws QueryException {\n if(Files.isDirectory(path)) throw FILE_IS_DIR_X.get(info, path.toAbsolutePath());\n final Path parent = path.getParent();\n if(parent != null && !Files.exists(parent))\n throw FILE_NO_DIR_X.get(info, parent.toAbsolutePath());\n return path;\n }",
"public boolean existsPathForParent(String siteId)\n\t\t{\n\t\t\tint count = 0;\n\t\t\tif(siteId != null)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tString sqlWhere = \"WHERE PARENTSITE = '\" + siteId + \"'\";\n\t\t\t\t\tcount = super.countSelectedResourcesWhere(sqlWhere);\n\t\t\t\t}\n\t\t\t\tcatch(Exception e)\n\t\t\t\t{\n\t\t\t\t\tm_logger.warn(this + \".existsPathForParent siteId = \" + siteId + \" Exception \" + e);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(count==0) return false;\n\t\t\treturn true;\n\t\t}",
"@Override\n public boolean isItFolder(String path) {\n Path file = new File(path).toPath();\n boolean isDirectory = Files.isDirectory(file); // Check if it's a directory\n return isDirectory;\n }",
"public boolean isDirectory();",
"public boolean isDirectory(String path) throws Exception {\n Path destionationPath = new Path(path);\n\n if (hdfs.isDirectory(destionationPath))\n return true;\n else if (hdfs.isFile(destionationPath))\n return false;\n else throw new Exception(\"What is it else?!\");\n }",
"public boolean IsParent(KDNode parent) {\n\t\t\n\t\tKDNode ptr = this;\n\t\twhile(ptr != null) {\n\t\t\tif(ptr == parent) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tptr = ptr.parent_ptr;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic boolean isDir(String path) {\n\t\treturn false;\r\n\t}",
"protected final int findParentDirectoryId(DBDeviceContext ctx, String path, boolean filePath) {\n\n // Split the path\n \n String[] paths = null;\n \n if ( path != null && path.startsWith(\"\\\\\")) {\n\n // Split the path\n \n paths = FileName.splitPath(path);\n }\n else {\n \n // Add a leading slash to the path before parsing\n \n paths = FileName.splitPath(\"\\\\\" + path);\n }\n \n if ( paths[0] != null && paths[0].compareTo(\"\\\\\") == 0 || paths[0].startsWith(\"\\\\\") == false)\n return 0;\n \n // Check if the file is in the cache\n \n FileStateCache cache = ctx.getStateCache();\n FileState state = null;\n \n if ( cache != null) {\n \n // Search for the file state\n \n state = cache.findFileState(paths[0]);\n if ( state != null && state.getFileId() != -1) {\n \n // Debug\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"@@ Cache hit - findParentDirectoryId() path=\" + paths[0]);\n \n // Return the file id\n \n return state.getFileId();\n }\n }\n\n // Get the directory id list\n \n int[] ids = findParentDirectoryIdList(ctx,path,filePath);\n if ( ids == null)\n return -1;\n \n // Check for the root directory id only\n \n if ( ids.length == 1)\n return ids[0];\n \n // Return the directory id of the last directory\n \n int idx = ids.length - 1;\n if ( filePath == true && ids[ids.length - 1] == -1)\n idx--;\n \n return ids[idx];\n }",
"private void checkCreateParentDirs(Path file) throws IOException {\n if (!Files.exists(file.getParent())) {\n Files.createDirectories(file.getParent());\n }\n }",
"public boolean isParent(String anItem) { return anItem.equals(\"TreeView\"); }",
"public static boolean hasPath(Path path) {\n DirectoryHandler directoryHandler = DirectoryHandler.getDirectoryHandler();\n return directoryHandler.contains(directoryHandler.getDataDirectories(), path);\n }",
"public static boolean isChildOfOrEquals(File parent, File child){\n // doing a single comparison is likely cheaper than walking up to the root\n try {\n String parentPath = parent.getCanonicalPath();\n String childPath = child.getCanonicalPath();\n if(parentPath.equals(childPath))\n return true;\n // make sure we compare with a separator, otherwise /foo would be considered a parent of /foo-bar\n if(!parentPath.endsWith(File.separator))\n parentPath += File.separator;\n return childPath.startsWith(parentPath);\n } catch (IOException e) {\n return false;\n }\n }",
"boolean directoryExists(String path) throws IOException;",
"public boolean isParent();",
"public boolean hasParent() {\r\n if (parent == null) \r\n return false;\r\n \r\n return true;\r\n }",
"public static boolean isDirectoryPath(String path) {\n return !isNullOrEmpty(path) && path.endsWith(PATH_DELIMITER);\n }",
"public boolean hasFolders(@NonNull DocumentFile parent) {\n return countDocumentFiles(parent, null, true, false, true) > 0;\n }",
"private boolean isValidPath(String path) {\n File file = new File(path);\n return file.exists() && file.isDirectory();\n }",
"private String preferredSubFolder(final String path) {\n final File file = new File(path);\n if (file.isDirectory()) {\n for (final String subdir : SUBDIRS) {\n final File sd = new File(file, subdir);\n if (sd.isDirectory()) {\n return path + File.separator + subdir;\n }\n }\n }\n return path;\n }",
"public static boolean isFolder(Path path) {\n\t\treturn Files.isDirectory(path, LinkOption.NOFOLLOW_LINKS);\n\t}",
"boolean isDirectory() throws IOException;",
"protected boolean parentExists() {\n\n\t\tIRodinElement parentElement = getParent();\n\t\tif (parentElement == null)\n\t\t\treturn true;\n\t\treturn parentElement.exists();\n\t}",
"boolean hasDirName();",
"public boolean isNoDirs(String path) {\r\n\t\t// We setup the path to search.\r\n\t\tFile file = new File(path);\r\n\t\tFile[] files = file.listFiles(File::isDirectory);\r\n\r\n\t\t// We check how many directories we find.\r\n\t\tif (files.length == 0) {\r\n\t\t\t// We find 0, so we return true.\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\t// We find some, so we return false.\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"Path getHasPath();",
"public static String getParentDirPath(String file) {\n Path path = Paths.get(file);\n String dirPath = path.getParent().toString();\n dirPath = formatDirectoryPath(dirPath);\n return dirPath;\n }",
"public void gotoParentDir() {\n boolean z;\n if (!isRootDir() && this.mCurrentDir != null && this.mBox.hasAuthenticated()) {\n String sb = new StringBuilder(getCurrentDirPath()).toString();\n if (sb.endsWith(File.separator)) {\n sb = sb.substring(0, sb.lastIndexOf(File.separator));\n }\n String substring = sb.substring(0, sb.lastIndexOf(File.separator) + 1);\n if (!substring.equals(getCurrentDirName())) {\n if (!substring.equals(File.separator) && substring.endsWith(File.separator)) {\n substring = substring.substring(0, substring.length() - 1);\n }\n BoxFileObject boxFileObject = null;\n if (this.mDirCached.containsKey(substring)) {\n boxFileObject = (BoxFileObject) this.mDirCached.get(substring);\n }\n if (boxFileObject == null) {\n z = this.mBox.asyncLoadDir(substring, this.mLoadFolderListener);\n } else {\n z = this.mBox.asyncLoadDir(boxFileObject, this.mLoadFolderListener);\n }\n if (z) {\n showWaitingDialog(this.mActivity.getString(C4538R.string.zm_msg_loading), this.mWaitingDialogCancelListener);\n }\n }\n }\n }",
"boolean hasParent();",
"boolean hasParent();",
"@NotNull\n\t\t\tprivate File getParent(@NotNull Path path)\n\t\t\t\t\tthrows FileNotFoundException {\n\t\t\t\tPathParts pathParts = path.splitAtExistingFile();\n\t\t\t\t\n\t\t\t\tif (pathParts.getRight().isEmpty()) // Existing ordinary file\n\t\t\t\t\treturn Util.getParentFile(path.getCanonicalFile());\n\t\t\t\t\n\t\t\t\tFile leftFile = pathParts.getLeft().getCanonicalFile();\n\t\t\t\tif (leftFile.isDirectory())\n\t\t\t\t\t// File, archive entry or PST item does not exist\n\t\t\t\t\tthrow new FileNotFoundException();\n\t\t\t\t\n\t\t\t\t// Existing PST item\n\t\t\t\tif (Util.hasExtension(pathParts.getLeft().getName(), \"pst\"))\n\t\t\t\t\treturn Util.getParentFile(leftFile);\n\t\t\t\t\n\t\t\t\t// Existing archive entry -> return the archive\n\t\t\t\treturn leftFile;\n\t\t\t}",
"public abstract boolean isPath();",
"public String getPath()\n\t{\n\t\tString previousPath = File.separator;\n\t\t\n\t\t//if there is a parent\n\t\tif(getParentDirectory() != null)\n\t\t{\n\t\t\t//write over the previous path with the parent's path and a slash\n\t\t\t// /path/to/parent\n\t\t\tpreviousPath = getParentDirectory().getPath() + File.separator;\n\t\t}\n\t\t//else- no parent, this is the root \"/\"\n\t\t\n\t\t//add the name, /path/to/parent/thisdir \n\t\treturn previousPath + getName();\t\t\n\t}",
"public boolean hasParent() {\n return getParent() != null;\n }",
"public static void insurePathToFileExists(File f) {\r\n File p = f.getParentFile();\r\n //System.out.println(\"uu.iPE: parent of \"+filename+\" is \"+parent);\r\n\r\n if (!p.exists()) {\r\n // parent doesn't exist, create it:\r\n if (!p.mkdirs()) {\r\n throw new IllegalStateException(\"Unable to make directory \" + p.getPath());\r\n } // endif -- second mkdir unsuc\r\n } // endif -- parent exists\r\n }",
"public boolean isHaveParent(List source, String treeid) {\n\t\tboolean result = false;\r\n\t\tif (source == null || source.size() < 1) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\tMap currentTree = this.getTree(source, treeid);\r\n\t\tif (currentTree.get(StringPool.TREE_PARENTID) == null) {\r\n\t\t\tresult = false;\r\n\t\t} else {\r\n\t\t\tMap parentTree = this.getTree(source, currentTree.get(\r\n\t\t\t\t\tStringPool.TREE_PARENTID).toString());\r\n\t\t\tif (parentTree == null) {\r\n\t\t\t\tresult = false;\r\n\t\t\t} else {\r\n\t\t\t\tif (source.contains(parentTree)) {\r\n\t\t\t\t\tresult = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}",
"public boolean isDir() { return false; }",
"public boolean isHaveParent(List source, Map transedTree) {\n\t\tboolean result = false;\r\n\t\tif (source.isEmpty() || source.size() < 1 || source == null\r\n\t\t\t\t|| transedTree.isEmpty() || transedTree == null) {\r\n\t\t\treturn result;\r\n\t\t} else {\r\n\t\t\tif (transedTree.get(StringPool.TREE_PARENTID) == null) {\r\n\t\t\t\tresult = false;\r\n\t\t\t} else {\r\n\t\t\t\tMap parentTree = this.getTree(source, transedTree.get(\r\n\t\t\t\t\t\tStringPool.TREE_PARENTID).toString());\r\n\t\t\t\tif (parentTree.isEmpty() || parentTree == null) {\r\n\t\t\t\t\tresult = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (source.contains(parentTree)) {\r\n\t\t\t\t\t\tresult = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tresult = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public boolean isHaveParent(List source, Tree tree) {\n\t\tboolean result = false;\r\n\t\tif (!source.contains(tree)) {\r\n\t\t\treturn result;\r\n\t\t} else {\r\n\t\t\tif (tree.getParentTree() != null) {\r\n\t\t\t\tresult = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public boolean isParent(AccessGroup group)\n {\n if (group == this)\n {\n return true;\n }\n if (group != null)\n {\n if (group.getExtendGroup() != null)\n {\n return group.getExtendGroup() == this || isParent(group.getExtendGroup());\n }\n }\n return false;\n }",
"boolean isFolder();",
"protected abstract boolean isDirectory(@NonNull String path, T context);",
"@Test\n public void testFileInDirectoryFileDoesNotExists() {\n\n assertFalse(parent.fileInDirectory(\"file1\"));\n }",
"@Test\r\n\tpublic void testRelativePath() {\r\n\t\t// Expected return from Cd\r\n\t\texpectedCd = null;\r\n\t\t// Expected current working directory\r\n\t\texpectedPath = \"/users\";\r\n\t\t// Actual return from Cd\r\n\t\tactualCd = cd.run(fs, \"users\".split(\" \"), \"cd users \", false);\r\n\t\t// Returns the current working directory\r\n\t\tactualPath = fs.getCurrentPath();\r\n\t\t// Checks if the values are equal or not\r\n\t\tassertTrue(actualCd == expectedCd && actualPath.equals(expectedPath));\r\n\t}",
"boolean haveToSkip(String path);",
"private boolean checkExecutable(File parent, String path) {\n File f = new File(parent, path);\n if (!f.isDirectory())\n return f.canExecute();\n return false;\n }",
"public Boolean isFile(IDirectory parentDirectory, String path) {\r\n // Get the item given by the path\r\n DirectoryTreeNode item = this.getItemGivenPath(parentDirectory, path);\r\n return item != null && item instanceof IFile;\r\n }",
"boolean parentIsRoot()\n {\n return this.parent != null && this.parent.isRoot();\n }",
"@Test\r\n\tpublic void testRelativeDir() {\r\n\t\t// Expected return from Cd\r\n\t\texpectedCd = null;\r\n\t\t// Expected current working directory\r\n\t\texpectedPath = \"/users/skeshavaa\";\r\n\t\t// Actual return from Cd\r\n\t\tactualCd = cd.run(fs, \"users/skeshavaa\".split(\" \"), \"cd users/skeshavaa\", false);\r\n\t\t// Returns the current working directory\r\n\t\tactualPath = fs.getCurrentPath();\r\n\t\t// Checks if the values are equal or not\r\n\t\tassertTrue(actualCd == expectedCd && actualPath.equals(expectedPath));\r\n\t}",
"@Test\n public void testCdRelativePathMultiDeepToOneDeeper() {\n FileTree myTree = new FileTree();\n String[] path1 = {\"directory2\" , \"/directory2/directory3\", \n \"/directory2/directory3/directory4\"};\n try {\n myTree.mkdir(path1);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"The directories could not be made.\");\n }\n try {\n myTree.cd(\"/directory2/directory3\");\n myTree.cd(\"directory4\");\n } catch (NotDirectoryException e) {\n fail(\"Could not change to the directory\");\n }\n assertEquals(\"/directory2/directory3/directory4\", myTree.pwd());\n }",
"public static File getNextExistingParentDirectory(File file) {\n\n file = file.getParentFile();\n\n while (file != null && !file.isDirectory()) {\n file = file.getParentFile();\n }\n\n return file;\n }",
"@Override\r\n public FileName getParent() {\r\n final String parentPath;\r\n final int idx = getPath().lastIndexOf(SEPARATOR_CHAR);\r\n if (idx == -1 || idx == getPath().length() - 1) {\r\n // No parent\r\n return null;\r\n }\r\n if (idx == 0) {\r\n // Root is the parent\r\n parentPath = SEPARATOR;\r\n } else {\r\n parentPath = getPath().substring(0, idx);\r\n }\r\n return createName(parentPath, FileType.FOLDER);\r\n }",
"private boolean isPathInModel(TreeTableModel model, TreePath path) {\n\n if (path.getPathCount() == 1) {\n return path.getLastPathComponent() == model.getRoot();\n }\n else {\n if (isPathInModel(model, path.getParentPath()) == false) {\n return false;\n }\n else {\n return model.getIndexOfChild(path.getPath()[path.getPathCount() - 2], path.getLastPathComponent()) != -1;\n }\n }\n }",
"protected boolean hasParentSteps(CoreOperation operation) {\n for (Expression exp : operation.getArguments()) {\n if (exp instanceof LocationPath) {\n return hasParentSteps((LocationPath) exp);\n } else if (exp instanceof CoreOperation) {\n return hasParentSteps((CoreOperation) exp);\n } else {\n logDebug(\"{} is not a location Path or a core operation to check for parent steps\", operation);\n }\n }\n return false;\n }",
"public boolean hasParent() {\n return internalGroup.hasParent();\n }",
"public boolean hasParent(ParentEntity arg0, boolean arg1)\n throws EntityPersistenceException {\n return false;\n }",
"private boolean pathHasValidTableName(String parent, String tableName) {\n String tableDirectory = \"/\" + tableName + \"/\";\n return !Strings.isNullOrEmpty(tableName) && parent.contains(tableDirectory) && !parent.endsWith(\"/\" + tableName);\n }",
"public boolean isDirectory()\n\t{\n\t\tFile temp = new File(this.path);\n\t\treturn temp.isDirectory();\n\t}",
"public static boolean isRoot(String path) {\n return path != null && path.equals(SHARE_ROOT);\n }",
"private static void createParents(String path) {\n\n File file = new File(path);\n if (!file.exists()) {\n file.mkdirs();\n }\n }",
"public boolean isDir() { return _entry==null; }",
"private String normalizePath(String path) {\n boolean absolute = path.startsWith(\"/\");\n int cwdl = cwd.length();\n \n // NOTE: This isn't just a fast path, it handles cases the code below doesn't\n if(!path.startsWith(\".\") && path.indexOf(\"./\") == -1 && path.indexOf(\"//\") == -1 && !path.endsWith(\".\"))\n return absolute ? path.substring(1) : cwdl == 0 ? path : path.length() == 0 ? cwd : cwd + \"/\" + path;\n \n char[] in = new char[path.length()+1];\n char[] out = new char[in.length + (absolute ? -1 : cwd.length())];\n path.getChars(0,path.length(),in,0);\n int inp=0, outp=0;\n \n if(absolute) {\n do { inp++; } while(in[inp] == '/');\n } else if(cwdl != 0) {\n cwd.getChars(0,cwdl,out,0);\n outp = cwdl;\n }\n\n while(in[inp] != 0) {\n if(inp != 0) {\n while(in[inp] != 0 && in[inp] != '/') { out[outp++] = in[inp++]; }\n if(in[inp] == '\\0') break;\n while(in[inp] == '/') inp++;\n }\n \n // Just read a /\n if(in[inp] == '\\0') break;\n if(in[inp] != '.') { out[outp++] = '/'; out[outp++] = in[inp++]; continue; }\n // Just read a /.\n if(in[inp+1] == '\\0' || in[inp+1] == '/') { inp++; continue; }\n if(in[inp+1] == '.' && (in[inp+2] == '\\0' || in[inp+2] == '/')) { // ..\n // Just read a /..{$,/}\n inp += 2;\n if(outp > 0) outp--;\n while(outp > 0 && out[outp] != '/') outp--;\n //System.err.println(\"After ..: \" + new String(out,0,outp));\n continue;\n }\n // Just read a /.[^.] or /..[^/$]\n inp++;\n out[outp++] = '/';\n out[outp++] = '.';\n }\n if(outp > 0 && out[outp-1] == '/') outp--;\n //System.err.println(\"normalize: \" + path + \" -> \" + new String(out,0,outp) + \" (cwd: \" + cwd + \")\");\n int outStart = out[0] == '/' ? 1 : 0;\n return new String(out,outStart,outp - outStart);\n }",
"private static boolean doesPathExist(final Path path, final FileContext context) throws AccessControlException, UnsupportedFileSystemException, IOException {\n\t\ttry {\n\t\t\tFileStatus status = context.getFileStatus(path);\n\t\t\treturn status.isFile() || status.isDirectory();\n\t\t} catch (FileNotFoundException e) {\n\t\t\treturn false; \n\t\t}\t\t\n\t}",
"public boolean isSetParentId() {\n return EncodingUtils.testBit(__isset_bitfield, __PARENTID_ISSET_ID);\n }",
"private boolean mustProcess(final IFile file) {\n\t\t// include paths?\n\t\tif (includePaths.isEmpty()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// paths\n\t\tfinal IPath path = file.getProjectRelativePath();\n\t\tfinal IPath parent = path.removeLastSegments(1);\n\n\t\t// check within the parent\n\t\tif (includePaths.contains(parent)) {\n\t\t\treturn true;\n\t\t} else if (excludePaths.contains(parent)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// check children\n\t\tfinal Predicate<IPath> predicate = p -> p.isPrefixOf(path);\n\t\treturn includePaths.stream().anyMatch(predicate);\n\t}",
"public boolean hasContainingParentId() {\n return fieldSetFlags()[1];\n }",
"@Test\n public void testCdRelativePathOneAway() {\n FileTree myTree = new FileTree();\n String[] path1 = {\"directory2\"};\n try {\n myTree.mkdir(path1);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"The directories could not be made.\");\n }\n try {\n myTree.cd(\"directory2\");\n } catch (NotDirectoryException e) {\n fail(\"Could not change to the directory\");\n }\n assertEquals(\"/directory2\", myTree.pwd());\n }",
"public static String getPath(String file_path)\n {\n String file_separator = System.getProperty(\"file.separator\"); //Bug Id 81741\n if (file_path == null)\n return null;\n else if (file_path.substring(file_path.length() - 1).equals(file_separator))//Bug Id 81741, substitute file_separator to System.getProperty(\"file.separator\")\n return file_path;\n else\n {\n \t //Bug Id 81741, Start \n\t if (\"/\".equals(file_separator) && (file_path.indexOf(file_separator) == -1))\n\t {\n\t file_path = file_path.replaceAll(\"\\\\\\\\\", \"/\");\n\t return ((new File(file_path)).getParent()).replaceAll(\"/\",\"\\\\\\\\\");\n\t }\n\t //Bug Id 81741, End\n\t else\n return (new File(file_path)).getParent();\n }\n }",
"protected final int[] findParentDirectoryIdList(DBDeviceContext ctx, String path, boolean filePath) {\n\n // Validate the paths and check for the root path\n \n String[] paths = FileName.splitAllPaths(path);\n \n if ( paths == null || paths.length == 0)\n return null;\n if ( paths[0].compareTo(\"*.*\") == 0 || paths[0].compareTo(\"*\") == 0 ||\n (filePath == true && paths.length == 1)) {\n int[] ids = { 0 };\n return ids;\n }\n if ( paths[0].startsWith(\"\\\\\")) {\n \n // Trim the leading slash from the first path\n \n paths[0] = paths[0].substring(1);\n }\n \n // Find the directory id by traversing the list of directories\n \n int endIdx = paths.length - 1;\n if ( filePath == true)\n endIdx--;\n \n // If there are no paths to check then return the root directory id\n \n if ( endIdx <= 1 && paths[0].length() == 0) {\n int[] ids = new int[1];\n ids[0] = 0;\n return ids;\n }\n\n // Allocate the directory id list\n \n int[] ids = new int[paths.length];\n for ( int i = 0; i < ids.length; i++)\n ids[i] = -1;\n \n // Build up the current path as we traverse the list\n \n StringBuffer pathStr = new StringBuffer(\"\\\\\");\n \n // Check for paths in the file state cache\n \n FileStateCache cache = ctx.getStateCache();\n FileState fstate = null;\n\n // Traverse the path list, initialize the directory id to the root id\n \n int dirId = 0;\n int parentId = -1;\n int idx = 0;\n\n try {\n \n // Loop until the end of the path list\n\n while ( idx <= endIdx) {\n \n // Get the current path, and add to the full path string\n \n String curPath = paths[idx];\n pathStr.append(curPath);\n \n // Check if there is a file state for the current path\n \n fstate = cache.findFileState(pathStr.toString());\n \n if ( fstate != null && fstate.getFileId() != -1) {\n \n // Get the file id from the cached information\n\n ids[idx] = fstate.getFileId();\n parentId = dirId;\n dirId = ids[idx];\n }\n else {\n \n // Search for the current directory in the database\n\n parentId = dirId;\n dirId = ctx.getDBInterface().getFileId(dirId, curPath, true, true);\n \n if ( dirId != -1) {\n \n // Get the next directory id\n\n ids[idx] = dirId;\n \n // Check if we have a file state, or create a new file state for the current path\n \n if ( fstate != null) {\n \n // Set the file id for the file state\n \n fstate.setFileId(dirId);\n }\n else {\n \n // Create a new file state for the current path\n \n fstate = cache.findFileState(pathStr.toString(), true);\n \n // Get the file information\n \n DBFileInfo finfo = ctx.getDBInterface().getFileInformation(parentId, dirId, DBInterface.FileAll);\n fstate.addAttribute(FileState.FileInformation, finfo);\n fstate.setFileStatus( finfo.isDirectory() ? FileStatus.DirectoryExists : FileStatus.FileExists);\n fstate.setFileId(dirId);\n }\n }\n else\n return null;\n }\n \n // Update the path index\n \n idx++;\n \n // Update the current path string\n \n pathStr.append(\"\\\\\");\n }\n }\n catch (DBException ex) {\n Debug.println(ex);\n return null;\n }\n \n // Return the directory id list\n \n return ids;\n }",
"@Override\n public boolean isDir() { return true; }",
"@Test\n public void testCdRelativePathMultiAway() {\n FileTree myTree = new FileTree();\n String[] path1 = {\"directory2\" , \"/directory2/directory3\", \n \"/directory2/directory3/directory4\"};\n try {\n myTree.mkdir(path1);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"The directories could not be made.\");\n }\n try {\n myTree.cd(\"directory2/directory3/directory4\");\n } catch (NotDirectoryException e) {\n fail(\"Could not change to the directory\");\n }\n assertEquals(\"/directory2/directory3/directory4\", myTree.pwd());\n }",
"public abstract boolean isDirectory() throws AccessException;",
"public static boolean isDir(SourceFile sourceFile) throws IOException {\n return isDir(sourceFile.getPath(), sourceFile.getSourceType());\n }",
"@Test\n public void testMkdirOneDirectoryRelativePathMultipleDeep() {\n FileTree myTree = new FileTree();\n String[] path = {\"directory1\", \"directory1/subDirectory1\"};\n try {\n myTree.mkdir(path);\n } catch (NotDirectoryException | AlreadyExistException e) {\n fail(\"A already exists or a path is invalid.\");\n }\n assertEquals(myTree.hasDirectory(\"/directory1/subDirectory1\"), true);\n }",
"public boolean currentDirectoryIsOnRoot() {\n\t\treturn getCurrentDirectory().equals(getVirtualRoot());\n\t}",
"public Boolean isParentable();",
"private boolean allSourcePathsExist(List<String> sourcePath) {\n\t\tfor (Iterator<String> ii = sourcePath.iterator(); ii.hasNext();) {\n\t\t\tString dirName = ii.next();\n\t\t\tFile dir = new File(getDirectory().getAbsolutePath() + \"/\"\n\t\t\t\t\t+ dirName);\n\t\t\tif (!dir.exists())\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean hasContainingParentLevel() {\n return fieldSetFlags()[3];\n }",
"private boolean isDir(String fileName) {\n return !fileName.contains(\".\");\n }",
"public static boolean deleteFolderContents(String path) {\n File currDirectory = new File(path);\n if (currDirectory.exists()) {\n try {\n for (File file : currDirectory.listFiles()) {\n if (file.isDirectory()) {\n if (!deleteFolder(file.getCanonicalPath())) {\n return false;\n }\n } else {\n if (!deleteFile(file.getCanonicalPath())) {\n return false;\n }\n }\n }\n } catch (IOException e) {\n return false;\n }\n return true;\n }\n return false;\n }",
"public static void main(String[] args) throws IOException {\r\n\t\tPath path = Paths.get(userHome+\"/Files/questions/animals\");\r\n\t\tboolean myBoolean = Files.walk(path)\r\n\t\t\t\t// will not compile\r\n\t\t\t\t// filter expect a Predicate and not a BiPredicate\r\n\t\t\t\t// and isDirectory belongs to Files not to Path\r\n\t\t\t\t//.filter((p,a) -> a.isDirectory() && !path.equals(p))//w1\r\n\t\t\t\t.findFirst().isPresent();//w2\r\n\t\tSystem.out.println(myBoolean ? \"No Sub-directory\" : \"Has Sub-directory\");\r\n\t\t\t\t\r\n\t}",
"public String simplifyPath(String path) {\n List<String> stack = new LinkedList<>();\n for (String dir : path.split(\"/\")) {\n if (dir.equals(\"..\")) {\n if (stack.size() > 0) stack.remove(stack.size()-1);\n }\n else if (dir.length() > 0 && !dir.equals(\".\")) \n stack.add(dir);\n }\n StringBuilder res = new StringBuilder();\n for (String dir : stack) res.append('/' + dir);\n return res.length() == 0 ? \"/\" : res.toString();\n}",
"static boolean sourceInProjectDirectories(LocationContext context) {\n return context.getImportRoots().containsWorkspacePath(context.workspacePath);\n }",
"private boolean hasParent(int index) {\n return index > 1;\n }",
"public static boolean isSigned_parent() {\n return false;\n }",
"public boolean isParentOf(FcgLevel other) {\n\t\tif (isSource()) {\n\t\t\treturn other.getDistance() == 1;\n\t\t}\n\n\t\tif (direction != other.direction) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// e.g., row 2 - row 1 = 1\n\t\treturn other.getDistance() - getDistance() == 1;\n\t}",
"@Override\r\n public String getRelativeName(final FileName name) throws FileSystemException {\r\n final String path = name.getPath();\r\n\r\n // Calculate the common prefix\r\n final int basePathLen = getPath().length();\r\n final int pathLen = path.length();\r\n\r\n // Deal with root\r\n if (basePathLen == 1 && pathLen == 1) {\r\n return \".\";\r\n }\r\n if (basePathLen == 1) {\r\n return path.substring(1);\r\n }\r\n\r\n final int maxlen = Math.min(basePathLen, pathLen);\r\n int pos = 0;\r\n while (pos < maxlen && getPath().charAt(pos) == path.charAt(pos)) {\r\n pos++;\r\n }\r\n\r\n if (pos == basePathLen && pos == pathLen) {\r\n // Same names\r\n return \".\";\r\n }\r\n if (pos == basePathLen && pos < pathLen && path.charAt(pos) == SEPARATOR_CHAR) {\r\n // A descendent of the base path\r\n return path.substring(pos + 1);\r\n }\r\n\r\n // Strip the common prefix off the path\r\n final StringBuilder buffer = new StringBuilder();\r\n if (pathLen > 1 && (pos < pathLen || getPath().charAt(pos) != SEPARATOR_CHAR)) {\r\n // Not a direct ancestor, need to back up\r\n pos = getPath().lastIndexOf(SEPARATOR_CHAR, pos);\r\n buffer.append(path.substring(pos));\r\n }\r\n\r\n // Prepend a '../' for each element in the base path past the common\r\n // prefix\r\n buffer.insert(0, \"..\");\r\n pos = getPath().indexOf(SEPARATOR_CHAR, pos + 1);\r\n while (pos != -1) {\r\n buffer.insert(0, \"../\");\r\n pos = getPath().indexOf(SEPARATOR_CHAR, pos + 1);\r\n }\r\n\r\n return buffer.toString();\r\n }",
"public boolean isRootLevel(\n )\n {return parentLevel == null;}",
"private static void judeDirExists(String myPath) {\n \tFile myDir = new File(Paths.get(myPath).getParent().toString());\n if (!myDir.exists()) {\n \tmyDir.mkdirs(); \n System.out.println(\"Create path:\"+ myDir.getPath());\n }\n }"
] |
[
"0.7153355",
"0.65457284",
"0.65002143",
"0.6205144",
"0.6085031",
"0.6074283",
"0.6071177",
"0.60349476",
"0.5987626",
"0.59284294",
"0.5806437",
"0.5792399",
"0.57737035",
"0.57628417",
"0.5757098",
"0.56842476",
"0.56261456",
"0.5613641",
"0.55761373",
"0.5572259",
"0.55261636",
"0.55242145",
"0.54999435",
"0.54991835",
"0.5491819",
"0.5484167",
"0.54704493",
"0.54691565",
"0.5442852",
"0.54257756",
"0.5422438",
"0.5412483",
"0.5400431",
"0.53744584",
"0.5354866",
"0.53544223",
"0.535384",
"0.53478557",
"0.5326236",
"0.52751774",
"0.52751774",
"0.5257885",
"0.5252626",
"0.52469915",
"0.52417004",
"0.52312094",
"0.5220861",
"0.519344",
"0.51768553",
"0.516919",
"0.516783",
"0.51436836",
"0.5132997",
"0.51128477",
"0.50968474",
"0.5085349",
"0.5069883",
"0.506387",
"0.5050637",
"0.50465155",
"0.50364584",
"0.50276566",
"0.5008824",
"0.50000083",
"0.4999797",
"0.49993268",
"0.49957988",
"0.4977638",
"0.49668232",
"0.49638012",
"0.4961642",
"0.49614128",
"0.49574628",
"0.49564457",
"0.4945313",
"0.4942052",
"0.49384442",
"0.49367493",
"0.49154755",
"0.4908103",
"0.49059084",
"0.48997685",
"0.48968226",
"0.48965687",
"0.48911104",
"0.488863",
"0.48873416",
"0.4884242",
"0.48811576",
"0.48795986",
"0.48654184",
"0.4857179",
"0.48495644",
"0.48471212",
"0.48360917",
"0.4835831",
"0.48319966",
"0.48299173",
"0.482465",
"0.48231125"
] |
0.786468
|
0
|
Recurse the directory, returning files that match the given filter. The directories "." and ".." are filtered out before the filter sees them. The filter is passed files and directories, and a directory must pass the filter to be recursed.
|
public static File[] listFilesInTree(File dir, FileFilter filter, boolean recordDirectories) {
List<File> files = new ArrayList<File>();
listFilesInTreeHelper(files, dir, filter, recordDirectories);
return (File[]) files.toArray(new File[files.size()]);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static List<File> listFilesRecurse(File dir, FileFilter filter) {\n\t\treturn listFileRecurse(new ArrayList<File>(), dir, filter);\n\t}",
"public static List<File> listFilesRecurse(File dir, FilenameFilter filter) {\n\t\treturn listFileRecurse(new ArrayList<File>(), dir, filter);\n\t}",
"private static Collection<File> listFiles(File directory, FilenameFilter filter, boolean recurse) {\n\t\tVector<File> files = new Vector<File>();\n\t\tFile[] entries = directory.listFiles();\n\n\t\tfor (File entry : entries) {\n\t\t\tif (filter == null || filter.accept(directory, entry.getName()))\n\t\t\t\tfiles.add(entry);\n\t\t\tif (recurse && entry.isDirectory())\n\t\t\t\tfiles.addAll(listFiles(entry, filter, recurse));\n\t\t}\n\t\treturn files;\n\t}",
"public static Set<File> getFiles(File dir, final FileFilter filter) {\n // Get files in this folder\n File[] files = dir.listFiles(new FileFilter() {\n @Override\n public boolean accept(File pathname) {\n return !pathname.isDirectory() && filter.accept(pathname);\n }\n });\n \n Set<File> allFiles = new HashSet<>(files.length);\n //if (files != null) {\n allFiles.addAll(Arrays.asList(files));\n //}\n\n // Get files in sub directories\n File[] directories = dir.listFiles(new FileFilter() {\n @Override\n public boolean accept(File pathname) {\n return pathname.isDirectory();\n }\n });\n \n //if (directories != null) {\n for (File directory : directories) {\n allFiles.addAll(getFiles(directory, filter));\n }\n //}\n\n return allFiles;\n }",
"public static void traversal(File root, FileFilter filter, Action<File> action) {\n if (root == null || !root.exists() || !filter.accept(root)) return;\n if (root.isDirectory()) {\n final File[] files = root.listFiles();\n if (files != null) {\n for (File file : files) {\n traversal(file, filter, action);\n }\n }\n } else {\n action.call(root);\n }\n }",
"public ScanResult getFilesRecursively() {\n\n final ScanResult scanResult = new ScanResult();\n try {\n Files.walkFileTree(this.basePath, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n if (!attrs.isDirectory() && PICTURE_MATCHER.accept(file.toFile())) {\n scanResult.addEntry(convert(file));\n System.out.println(file.toFile());\n }\n return FileVisitResult.CONTINUE;\n }\n });\n } catch (IOException e) {\n // intentional fallthrough\n }\n\n return new ScanResult();\n }",
"public static Enumeration applyFilter(String sFileSpec, boolean fRecurse)\n {\n // determine what the file filter is:\n // (1) the path or name of a file (e.g. \"Replace.java\")\n // (2) a path (implied *.*)\n // (3) a path and a filter (e.g. \"\\*.java\")\n // (4) a filter (e.g. \"*.java\")\n String sFilter = \"*\";\n String sDir = sFileSpec;\n File dir;\n\n // file spec may be a complete dir specification\n dir = new File(sDir).getAbsoluteFile();\n if (!dir.isDirectory())\n {\n // parse the file specification into a dir and a filter\n int of = sFileSpec.lastIndexOf(File.separatorChar);\n if (of < 0)\n {\n sDir = \"\";\n sFilter = sFileSpec;\n }\n else\n {\n sDir = sFileSpec.substring(0, ++of);\n sFilter = sFileSpec.substring(of);\n }\n\n // test the parsed directory name by itself\n dir = new File(sDir).getAbsoluteFile();\n if (!dir.isDirectory())\n {\n return null;\n }\n }\n\n // check filter, and determine if it denotes\n // (1) a specific file\n // (2) all files\n // (3) a subset (filtered set) of files\n Stack stackDirs = new Stack();\n FileFilter filter;\n\n if (sFilter.length() < 1)\n {\n sFilter = \"*\";\n }\n\n if (sFilter.indexOf('*') < 0 && sFilter.indexOf('?') < 0)\n {\n if (fRecurse)\n {\n // even though we are looking for a specific file, we still\n // have to recurse through sub-dirs\n filter = new ExactFilter(stackDirs, fRecurse, sFilter);\n }\n else\n {\n File file = new File(dir, sFilter);\n if (file.isFile() && file.exists())\n {\n return new SimpleEnumerator(new File[] {file});\n }\n else\n {\n return NullImplementation.getEnumeration();\n }\n }\n }\n else if (sFilter.equals(\"*\"))\n {\n filter = new AllFilter(stackDirs, fRecurse);\n }\n else\n {\n filter = new PatternFilter(stackDirs, fRecurse, sFilter);\n }\n\n stackDirs.push(dir);\n return applyFilter(stackDirs, filter);\n }",
"public interface FileObjectFilter {\n\n /** constant representing answer "do not traverse the folder" */\n public static final int DO_NOT_TRAVERSE = 0;\n /** constant representing answer "traverse the folder" */\n public static final int TRAVERSE = 1;\n /**\n * constant representing answer "traverse the folder and all its direct\n * and indirect children (both files and subfolders)"\n */\n public static final int TRAVERSE_ALL_SUBFOLDERS = 2;\n\n /**\n * Answers a question whether a given file should be searched.\n * The file must be a plain file (not folder).\n *\n * @return <code>true</code> if the given file should be searched;\n * <code>false</code> if not\n * @exception java.lang.IllegalArgumentException\n * if the passed <code>FileObject</code> is a folder\n */\n public boolean searchFile(FileObject file)\n throws IllegalArgumentException;\n\n /**\n * Answers a questions whether a given folder should be traversed\n * (its contents searched).\n * The passed argument must be a folder.\n *\n * @return one of constants {@link #DO_NOT_TRAVERSE},\n * {@link #TRAVERSE},\n * {@link #TRAVERSE_ALL_SUBFOLDERS};\n * if <code>TRAVERSE_ALL_SUBFOLDERS</code> is returned,\n * this filter will not be applied on the folder's children\n * (both direct and indirect, both files and folders)\n * @exception java.lang.IllegalArgumentException\n * if the passed <code>FileObject</code> is not a folder\n */\n public int traverseFolder(FileObject folder)\n throws IllegalArgumentException;\n\n}",
"private void filter(TreeItem<FilePath> root, String filter, TreeItem<FilePath> filteredRoot) {\n\n for (TreeItem<FilePath> child : root.getChildren()) {\n\n TreeItem<FilePath> filteredChild = new TreeItem<>(child.getValue());\n filteredChild.setExpanded(true);\n\n filter(child, filter, filteredChild);\n\n if (!filteredChild.getChildren().isEmpty() || isMatch(filteredChild.getValue(),\n filter)) {\n filteredRoot.getChildren().add(filteredChild);\n }\n\n }\n }",
"public static void main(String[] args) throws IOException {\r\n\t\tPath path = Paths.get(userHome+\"/Files/questions/animals\");\r\n\t\tboolean myBoolean = Files.walk(path)\r\n\t\t\t\t// will not compile\r\n\t\t\t\t// filter expect a Predicate and not a BiPredicate\r\n\t\t\t\t// and isDirectory belongs to Files not to Path\r\n\t\t\t\t//.filter((p,a) -> a.isDirectory() && !path.equals(p))//w1\r\n\t\t\t\t.findFirst().isPresent();//w2\r\n\t\tSystem.out.println(myBoolean ? \"No Sub-directory\" : \"Has Sub-directory\");\r\n\t\t\t\t\r\n\t}",
"public static void processPath(File path, FileFilter filter, FileProcessor processor) {\r\n if (path.isDirectory()) {\r\n // if path is a directory, look into it\r\n File[] directoryListing = path.listFiles(filter);\r\n if (directoryListing == null) {\r\n throw new IllegalArgumentException(\"Directory access problem for: \" + path);\r\n }\r\n for (File file : directoryListing) {\r\n processPath(file, filter, processor);\r\n }\r\n } else {\r\n // it's already passed the filter or was uniquely specified\r\n // if (filter.accept(path))\r\n processor.processFile(path);\r\n }\r\n }",
"List<String> getDirectories(String path, String searchPattern, String searchOption) throws IOException;",
"protected static Enumeration applyFilter(Stack stackDirs, FileFilter filter)\n {\n Vector vectFiles = new Vector();\n\n while (!stackDirs.isEmpty())\n {\n File dir = (File) stackDirs.pop();\n if (!dir.isDirectory())\n {\n throw new IllegalArgumentException(\"Illegal directory: \\\"\" + dir.getPath() + \"\\\"\");\n }\n\n File[] aFiles = dir.listFiles(filter);\n int cFiles = aFiles.length;\n for (int i = 0; i < cFiles; ++i)\n {\n vectFiles.addElement(aFiles[i]);\n }\n }\n\n return vectFiles.elements();\n }",
"static Stream<File> allFilesIn(File folder) \r\n\t{\r\n\t\tFile[] children = folder.listFiles();\r\n\t\tStream<File> descendants = Arrays.stream(children).filter(File::isDirectory).flatMap(Program::allFilesIn);\r\n\t\treturn Stream.concat(descendants, Arrays.stream(children).filter(File::isFile));\r\n\t}",
"private ArrayList<File> getFilesInDirectory(String directoryPath, boolean omitHiddenFiles) {\n //---------- get all files in the provided directory ----------\n ArrayList<File> filesInFolder = new ArrayList<>();\n\n File folder = new File(directoryPath);\n for (File f : folder.listFiles()) {\n if (!f.isHidden() || !omitHiddenFiles)\n filesInFolder.add(f);\n }\n\n //sort the list of files\n Collections.sort(filesInFolder);\n return filesInFolder;\n }",
"AntiIterator<FsPath> listFilesAndDirectories(FsPath dir);",
"@Override\n\tpublic List<File> getListing(File directory, FileFilter filter) {\n\t\tfileIconMap = new HashMap<>();\n\n\t\tif (directory == null) {\n\t\t\treturn List.of();\n\t\t}\n\t\tFile[] files = directory.listFiles(filter);\n\t\treturn (files == null) ? List.of() : List.of(files);\n\t}",
"public void directorySearch(File dir, String target)\n\t{\n\t\tif(!(dir.isDirectory()))\n\t\t{\n\t\t\t//If file is not a directory, throw the exception.\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tif(count == maxFiles)\n\t\t{\n\t\t\t//If count is equal to maxFiles, throw the exception.\n\t\t\t//If it doesn't then this will act as a base case to\n\t\t\t//the recursion. \n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\t//Put all the sub directories in an array. \n\t\t\tFile[] file = dir.listFiles();\n\t\t\t\n\t\t\t//Print out the path and the file directory list \n\t\t\tSystem.out.println(dir.getPath() + \": \" + dir.listFiles());\n\t\t\t\n\t\t\t//Go through each of the file length\n\t\t\tfor(int i = 0; i < file.length; i++)\n\t\t\t{\n\t\t\t\t//Get the file name \n\t\t\t\tSystem.out.println(\" -- \" + file[i].getName());\n\t\t\t\t\n\t\t\t\t//If the file name is the target, then add it to the \n\t\t\t\t//stack and return\n\t\t\t\tif(file[i].getName().equals(target))\n\t\t\t\t{\n\t\t\t\t\t//If the item inside the file is the target.\n\t\t\t\t\tcount++;\n\t\t\t\t\tfileList.add(file[i].getPath());\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t//If its a directory, then recurse.\n\t\t\t\tif(file[i].isDirectory())\n\t\t\t\t{\n\t\t\t\t\tdirectorySearch(file[i], target);\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch (NullPointerException e)\n\t\t{\n\t\t\t//If the File[] is null then catch this exception.\n\t\t\treturn;\n\t\t}\n\t}",
"List<String> getDirectories(String path, String searchPattern) throws IOException;",
"public String[] getFilesFromFolder(String folder, String filter) {\n\t\ttry\n\t\t{\n\t\t\tfinal String f = filter;\n\t\t\tFilenameFilter filnameFilter = new FilenameFilter() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic boolean accept(File dir, String name) {\n\t\t\t\t\tif( name.toLowerCase().endsWith(f))\n\t\t\t\t\t\treturn true;\n\t\t\t\t\telse\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t};\n\t\t\tif(! folder.endsWith(\"/\"))\n\t\t\t\tfolder += \"/\";\n\t\t\t\n\t\t\tString[] files = FileIO.getFiles(this.getServletContext().getRealPath(folder), filnameFilter);\t\t\t\n\t\t\t\t\t\n\t\t\treturn files;\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"void generateFileList(File node, FileFilter filter) {\n\n //add file only\n if (node.isFile()) {\n fileList.add(generateZipEntry(node.getAbsoluteFile().toString()));\n }\n\n if (node.isDirectory()) {\n File[] subNote = node.listFiles(filter);\n assert subNote != null;\n for (File file : subNote) {\n generateFileList(new File(node, file.getName()), filter);\n }\n }\n\n }",
"public static List<File> listFilesRecursive(File fileOrDirectory) {\n\t\t// null input = null output\n\t\tif(fileOrDirectory == null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tList<File> result = new ArrayList<File>();\n\t\tif(!fileOrDirectory.isHidden()) {\n\t\t\tif(fileOrDirectory.isDirectory()) {\n\t\t\t\tfor (File aFile : fileOrDirectory.listFiles()) {\n\t\t\t\t\tresult.addAll(listFilesRecursive(aFile));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tresult.add(fileOrDirectory);\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\t// sort output\n\t\tCollections.sort(result, new Comparator<File>() {\n\t\t\t@Override\n\t\t\tpublic int compare(File o1, File o2) {\n\t\t\t\treturn o1.getAbsolutePath().compareTo(o2.getAbsolutePath());\n\t\t\t}\t\t\t\n\t\t});\n\t\t\n\t\treturn result;\n\t}",
"public DirectoryFileFilter() {\n\t\tthis(true);\n\t}",
"private ArrayList<File> getSubDirectories(String directoryPath, boolean omitHiddenDirs) {\n //---------- get all files in the provided directory ----------\n ArrayList<File> dirsInFolder = new ArrayList<>();\n\n File folder = new File(directoryPath);\n for (File f : folder.listFiles()) {\n if (f.isDirectory()) {\n if (!f.isHidden() || !omitHiddenDirs)\n dirsInFolder.add(f);\n }\n }\n return dirsInFolder;\n }",
"public void listFilesAndFilesSubDirectories(String directoryName) throws IOException{\n File directory = new File(directoryName);\n //get all the files from a directory\n System.out.println(\"List of Files and file subdirectories in: \" + directory.getCanonicalPath());\n File[] fList = directory.listFiles();\n for (File file : fList){\n if (file.isFile()){\n System.out.println(file.getAbsolutePath());\n } else if (file.isDirectory()){\n listFilesAndFilesSubDirectories(file.getAbsolutePath());\n }\n }\n }",
"public static void copyTreeNoParent(File from, File to, FileFilter filter) throws IOException {\r\n File[] files;\r\n \r\n Check.checkArg(from.isDirectory());\r\n \r\n files = from.listFiles(filter);\r\n to.mkdirs();\r\n \r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n //File curto = new File(to, files[i].getName());\r\n //curto.mkdirs();\r\n copyTree(files[i], to, filter);\r\n }\r\n else {\r\n File curto = new File(to, files[i].getName());\r\n copyFile(files[i], curto);\r\n }\r\n }\r\n \r\n }",
"public static File[] listFiles(File f, FilenameFilter filter) {\n return f.listFiles(filter);\n }",
"private static ArrayList<File> getFilesFromSubfolders(String directoryName, ArrayList<File> files) {\n\n File directory = new File(directoryName);\n\n // get all the files from a directory\n File[] fList = directory.listFiles();\n for (File file : fList) {\n if (file.isFile() && file.getName().endsWith(\".json\")) {\n files.add(file);\n } else if (file.isDirectory()) {\n getFilesFromSubfolders(file.getAbsolutePath(), files);\n }\n }\n return files;\n }",
"public static void main(String[] args) {\n\n File dir = new File(\"D:/test.txt\");\n FileFilter fr = (File f) -> f.isDirectory();\n File[] fs = dir.listFiles(fr);\n }",
"FeatureHolder filter(FeatureFilter fc, boolean recurse);",
"@Override\r\n\tpublic String globFilesDirectories(String[] args) {\r\n\t\treturn globHelper(args);\r\n\t}",
"public void filter(Filter filter) throws NoTestsRemainException {\n childrenLock.lock();\n try {\n List<T> children = new ArrayList<T>(getFilteredChildren());\n for (Iterator<T> iter = children.iterator(); iter.hasNext(); ) {\n T each = iter.next();\n if (shouldRun(filter, each)) {\n try {\n filter.apply(each);\n } catch (NoTestsRemainException e) {\n iter.remove();\n }\n } else {\n iter.remove();\n }\n }\n filteredChildren = Collections.unmodifiableCollection(children);\n if (filteredChildren.isEmpty()) {\n throw new NoTestsRemainException();\n }\n } finally {\n childrenLock.unlock();\n }\n }",
"private static void findAllFilesRecurse(File root, ArrayList<File> files, boolean recurse) {\n\t\tFile[] rootContents = root.listFiles();\n\t\tif (rootContents == null) {\n\t\t\tfiles.add(root);\n\t\t} else {\n\t\t\tfor (File f : rootContents) {\n\t\t\t\t// if it is a file or do not go deeper\n\t\t\t\tif (f.isFile() || !recurse) {\n\t\t\t\t\tfiles.add(f);\n\t\t\t\t} else if (recurse) { // directory\n\t\t\t\t\tfindAllFilesRecurse(f, files, true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private static Vector addFiles(ZipOutputStream out, String target, String filter, boolean usePath, boolean recurse, Vector includeList) throws IOException {\r\n byte[] buf = new byte[1024];\r\n File[] fileList = null;\r\n File targetFile = new File(target);\r\n if (targetFile.isDirectory()) {\r\n fileList = targetFile.listFiles(); \r\n } else {\r\n fileList = new File[1];\r\n fileList[0] = new File(target);\r\n }\r\n if (fileList != null && fileList.length > 0) {\r\n for (int i=0; i<fileList.length; i++) {\r\n if (fileList[i].isFile()) {\r\n if (filter != null && filter.length() == 0) {\r\n if (!fileList[i].getName().endsWith(filter))\r\n continue;\r\n }\r\n FileInputStream in = new FileInputStream(fileList[i].getAbsolutePath());\r\n if (!usePath) {\r\n out.putNextEntry(new ZipEntry(fileList[i].getName()));\r\n } else {\r\n out.putNextEntry(new ZipEntry(fileList[i].getAbsolutePath()));\r\n }\r\n int len;\r\n while ((len = in.read(buf)) > 0) {\r\n out.write(buf, 0, len);\r\n }\r\n out.closeEntry();\r\n in.close();\r\n includeList.add(fileList[i].getAbsolutePath());\r\n } else if (fileList[i].isDirectory() && recurse) {\r\n includeList = ZipUtil.addFiles(out, fileList[i].getAbsolutePath(), filter, true, true, includeList);\r\n }\r\n }\r\n }\r\n return includeList;\r\n }",
"public static List<File> goFolder(File file) {\n File[] files = file.listFiles();\n for (File f : files) {\n if (!f.isDirectory()) {\n if (isCondition(f)) {\n fileList.add(f);\n }\n } else {\n goFolder(f);\n }\n }\n return fileList;\n }",
"public static Enumeration applyZipFilter(ZipFile zip, String sFileSpec, boolean fRecurse)\n {\n // determine what the file filter is:\n // (1) the path or name of a file (e.g. \"Replace.java\")\n // (2) a path (implied *.*)\n // (3) a path and a filter (e.g. \"/*.java\")\n // (4) a filter (e.g. \"*.java\")\n\n // file spec may be a complete dir specification\n String sFilter = \"*\";\n String sDir = sFileSpec;\n if (sDir.length() > 0 && sDir.charAt(0) == '/')\n {\n sDir = sDir.substring(1);\n }\n // we know it is a directory if it ends with \"/\" ... but if it\n // does not, it could still be a directory\n if (sDir.length() > 0 && sDir.charAt(sDir.length()-1) != '/')\n {\n ZipEntry file = zip.getEntry(sDir);\n if (file == null)\n {\n ZipEntry dir = zip.getEntry(sDir + '/');\n if (dir == null)\n {\n int ofSlash = sDir.lastIndexOf('/') + 1;\n if (ofSlash > 0)\n {\n sFilter = sDir.substring(ofSlash);\n sDir = sDir.substring(0, ofSlash);\n }\n else\n {\n // assume it is a file name\n if (fRecurse)\n {\n // search for that file name in all dirs\n sFilter = sDir;\n sDir = \"\";\n }\n else\n {\n // file not found\n return NullImplementation.getEnumeration();\n }\n }\n }\n else\n {\n sDir += '/';\n }\n }\n else\n {\n // if a dir is specified as part of the name or if it is\n // the root directory of the zip and directory recursion\n // is not specified, then it is an exact file match (not\n // a directory)\n if (sDir.indexOf('/') >= 0 || !fRecurse)\n {\n return new SimpleEnumerator(new Object[] {file});\n }\n\n // otherwise look for that file in all directories\n sFilter = sDir;\n sDir = \"\";\n }\n }\n\n // check filter, and determine if it denotes\n // (1) all files\n // (2) a subset (filtered set) of files\n // (3) a specific file\n ZipFilter filter;\n\n if (sFilter.length() < 1 || sFilter.equals(\"*\"))\n {\n filter = new ZipFilter(sDir, fRecurse);\n }\n else if (sFilter.indexOf('*') >= 0 || sFilter.indexOf('?') >= 0)\n {\n filter = new ZipPatternFilter(sDir, fRecurse, sFilter);\n }\n else\n {\n filter = new ZipExactFilter(sDir, fRecurse, sFilter);\n }\n\n // build an ordered list of the entries\n StringTable tbl = new StringTable();\n for (Enumeration enmr = zip.entries(); enmr.hasMoreElements(); )\n {\n ZipEntry entry = (ZipEntry) enmr.nextElement();\n if (filter.accept(entry))\n {\n tbl.put(entry.getName(), entry);\n }\n }\n return tbl.elements();\n }",
"public List getFiles(HasMetricsFilter filter) {\n if (fileLookup == null) {\n buildFileLookupMap();\n }\n List<BaseFileInfo> result = newArrayList();\n for (BaseFileInfo fileInfo : fileLookup.values()) {\n if (filter.accept(fileInfo)) {\n result.add(fileInfo);\n }\n }\n return result;\n }",
"public DiffCollector<T> setPathFilters(final TreeFilter filter) {\r\n this.command.setPathFilter(filter);\r\n return this;\r\n }",
"public List<DocumentFile> listFiles(@NonNull Context context, @NonNull DocumentFile parent, final FileHelper.NameFilter filter) {\n return listDocumentFiles(context, parent, filter, false, true, false);\n }",
"private static List<File> listChildFiles(File dir) throws IOException {\n\t\t List<File> allFiles = new ArrayList<File>();\n\t\t \n\t\t File[] childFiles = dir.listFiles();\n\t\t for (File file : childFiles) {\n\t\t if (file.isFile()) {\n\t\t allFiles.add(file);\n\t\t } else {\n\t\t List<File> files = listChildFiles(file);\n\t\t allFiles.addAll(files);\n\t\t }\n\t\t }\n\t\t return allFiles;\n\t\t }",
"@Override\n public boolean accept(File f) {\n if (f.isDirectory()) {\n return true;\n } else {\n for (ExtensionFileFilter filter : filters) {\n if (filter.accept(f)) {\n return true;\n }\n }\n }\n return false;\n }",
"List<String> getFiles(String path, String searchPattern, String searchOption) throws IOException;",
"public static void searchForImageReferences(File rootDir, FilenameFilter fileFilter) {\n \t\tfor (File file : rootDir.listFiles()) {\n \t\t\tif (file.isDirectory()) {\n \t\t\t\tsearchForImageReferences(file, fileFilter);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\ttry {\n \t\t\t\tif (fileFilter.accept(rootDir, file.getName())) {\n \t\t\t\t\tif (MapTool.getFrame() != null) {\n \t\t\t\t\t\tMapTool.getFrame().setStatusMessage(\"Caching image reference: \" + file.getName());\n \t\t\t\t\t}\n \t\t\t\t\trememberLocalImageReference(file);\n \t\t\t\t}\n \t\t\t} catch (IOException ioe) {\n \t\t\t\tioe.printStackTrace();\n \t\t\t}\n \t\t}\n \t\t// Done\n \t\tif (MapTool.getFrame() != null) {\n \t\t\tMapTool.getFrame().setStatusMessage(\"\");\n \t\t}\n \t}",
"public static List<Path> getPackageFiles(\n Path directory, boolean recursive, Map<String, Documentation> pkgDocs)\n throws IOException, ShadowException {\n try (DirectoryStream<Path> stream = Files.newDirectoryStream(directory)) {\n List<Path> files = new ArrayList<>();\n\n for (Path filePath : stream) {\n // Capture all source files\n if (filePath.toString().endsWith(SRC_EXTENSION)) files.add(filePath);\n // Capture any package-info files\n else if (filePath.getFileName().toString().equals(PKG_INFO_FILE))\n processPackageInfo(filePath, pkgDocs);\n // Recurse into subdirectories if desired\n else if (recursive && Files.isDirectory(filePath))\n files.addAll(getPackageFiles(filePath, true, pkgDocs));\n }\n return files;\n }\n }",
"@Override\n public Iterable<File> list(File storageDirectory, FilenameFilter filter) {\n\treturn null;\n }",
"private File[] getFilesInDirectory() {\n\t\t//Show Directory Dialog\n\t\tDirectoryChooser dc = new DirectoryChooser();\n\t\tdc.setTitle(\"Select Menu File Directory\");\n\t\tString folderPath = dc.showDialog(menuItemImport.getParentPopup().getScene().getWindow()).toString();\n\t\t\n\t\t//Update Folder location text\n\t\ttxtFolderLocation.setText(\"Import Folder: \" + folderPath);\n\t\t//Now return a list of all the files in the directory\n\t\tFile targetFolder = new File(folderPath);\n\t\t\n\t\treturn targetFolder.listFiles(); //TODO: This returns the names of ALL files in a dir, including subfolders\n\t}",
"public Vector getTypedFilesForDirectory(File dir) {\r\n\tboolean useCache = dir.equals(getCurrentDirectory());\r\n\r\n\tif(useCache && currentFilesFresh) {\r\n\t return currentFiles;\r\n\t} else {\r\n\t Vector resultSet;\r\n\t if (useCache) {\r\n\t\tresultSet = currentFiles;\r\n\t\tresultSet.removeAllElements();\r\n\t } else {\r\n\t\tresultSet = new Vector();\r\n\t }\r\n\t \r\n\t String[] names = dir.list();\r\n\r\n\t int nameCount = names == null ? 0 : names.length;\r\n\t for (int i = 0; i < nameCount; i++) {\r\n\t\tTypedFile f;\r\n\t\tif (dir instanceof WindowsRootDir) {\r\n\t\t f = getTypedFile(names[i]);\r\n\t\t} else {\r\n\t\t f = getTypedFile(dir.getPath(), names[i]);\r\n\t\t}\r\n\r\n\t\tFileType t = f.getType();\r\n\t\tif ((shownType == null || t.isContainer() || shownType == t)\r\n\t\t && (hiddenRule == null || !hiddenRule.testFile(f))) {\r\n\t\t resultSet.addElement(f);\r\n\t\t}\r\n\t }\r\n\r\n\t // The fake windows root dir will get mangled by sorting\r\n\t if (!(dir instanceof DirectoryModel.WindowsRootDir)) {\r\n\t\tsort(resultSet);\r\n\t }\r\n\r\n\t if (useCache) {\r\n\t\tcurrentFilesFresh = true;\r\n\t }\r\n\r\n\t return resultSet;\r\n\t}\r\n }",
"private RecursiveFilesystemTraversalValue traverseAndAssertFiles(\n TraversalRequest params, ResolvedFile... expectedFilesIgnoringMetadata) throws Exception {\n RecursiveFilesystemTraversalValue result = evalTraversalRequest(params);\n Map<PathFragment, ResolvedFile> nameToActualResolvedFiles = new HashMap<>();\n for (ResolvedFile act : result.getTransitiveFiles().toList()) {\n // We can't compare directly, since metadata would be different, so we compare\n // by comparing the results of public method calls..\n nameToActualResolvedFiles.put(act.getNameInSymlinkTree(), act);\n }\n assertExpectedResolvedFilesPresent(nameToActualResolvedFiles, expectedFilesIgnoringMetadata);\n return result;\n }",
"private List<DMTFile> listFilesRecursive(String path) {\n\t\tList<DMTFile> list = new ArrayList<DMTFile>();\n\t\tDMTFile file = getFile(path); //Get the real file\n\t\t\n\t\tif (null != file ){ //It checks if the file exists\n\t\t\tif (! file.isDirectory()){\n\t\t\t\tlist.add(file);\n\t\t\t} else {\n\t\t\t\tDMTFile[] files = listFilesWithoutConsoleMessage(file.getPath());\n\t\t\t\tfor (int x = 0; x < files.length; x++) {\n\t\t\t\t\tDMTFile childFile = files[x];\t\t \n\t\t\t\t\tif (childFile.isDirectory()){\n\t\t\t\t\t\tlist.addAll(listFilesRecursive(childFile.getPath()));\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlist.add(childFile);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}",
"public final AstValidator.nested_filter_return nested_filter() throws RecognitionException {\n AstValidator.nested_filter_return retval = new AstValidator.nested_filter_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree FILTER372=null;\n AstValidator.nested_op_input_return nested_op_input373 =null;\n\n AstValidator.cond_return cond374 =null;\n\n\n CommonTree FILTER372_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:594:2: ( ^( FILTER nested_op_input cond ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:594:4: ^( FILTER nested_op_input cond )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n FILTER372=(CommonTree)match(input,FILTER,FOLLOW_FILTER_in_nested_filter3136); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n FILTER372_tree = (CommonTree)adaptor.dupNode(FILTER372);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(FILTER372_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_nested_op_input_in_nested_filter3138);\n nested_op_input373=nested_op_input();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, nested_op_input373.getTree());\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_cond_in_nested_filter3140);\n cond374=cond();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, cond374.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }",
"public void getSourceJavaFilesForOneRepository(File dir, FilenameFilter searchSuffix, ArrayList<File> al) {\n\n\t\tFile[] files = dir.listFiles();\t\t\n\t\tfor(File f : files) {\n\t\t\tString lowercaseName = f.getName().toLowerCase();\n\t\t\tif(lowercaseName.indexOf(\"test\")!=-1)\n\t\t\t{\n\t\t\t\t/* we do not consider test files in our study */\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t if(f.isDirectory()){\n\t\t\t\t /* iterate over every directory */\n\t\t\t\t getSourceJavaFilesForOneRepository(f, searchSuffix, al);\t\t\n\t\t\t } else {\n\t\t\t\t /* returns the desired java files */\n\t\t\t\t if(searchSuffix.accept(dir, f.getName())){\n\t\t\t\t\t al.add(f);\n\t\t\t\t }\n\t\t\t }\n\t\t\t}\n\t\t}\n\t}",
"private void getDirectoryContents() {\n\t File directory = Utilities.prepareDirectory(\"Filtering\");\n\t if(directory.exists()) {\n\t FilenameFilter filter = new FilenameFilter() {\n\t public boolean accept(File dir, String filename) {\n\t return filename.contains(\".pcm\") || filename.contains(\".wav\");\n\t }\n\t };\n\t fileList = directory.list(filter);\n\t }\n\t else {\n\t fileList = new String[0];\n\t }\n\t}",
"private static File[] filesMiner(String path) {\n try {\n File directoryPath = new File(path);\n FileFilter onlyFile = new FileFilter() {\n @Override\n public boolean accept(File pathname) {\n return pathname.isFile();\n }\n }; // filter directories\n return directoryPath.listFiles(onlyFile);\n } catch (Exception e) {\n System.err.println(UNKNOWN_ERROR_WHILE_ACCESSING_FILES);\n return null;\n }\n\n }",
"@Override\r\n public List<File> getValues(final String term) throws IOException {\n {\r\n File file = new File(term);\r\n // is a directory -> get all children\r\n if (file.exists() && file.isDirectory()) {\r\n return children(file, fileFilter);\r\n }\r\n File parent = file.getParentFile();\r\n // is not a directory but has parent -> get siblings\r\n if (parent != null && parent.exists()) {\r\n return children(parent, normalizedFilter(term));\r\n }\r\n }\r\n // case 2: relative path\r\n {\r\n for (File path : paths) {\r\n File file = new File(path, term);\r\n // is a directory -> get all children\r\n if (file.exists() && file.isDirectory()) {\r\n return toRelativeFiles(children(file, fileFilter), path);\r\n }\r\n File parent = file.getParentFile();\r\n // is not a directory but has parent -> get siblings\r\n if (parent != null && parent.exists()) {\r\n return toRelativeFiles(children(parent, normalizedFilter(file.getAbsolutePath())), path);\r\n }\r\n }\r\n }\r\n return Collections.emptyList();\r\n }",
"private ArrayList<File> findFilesByExtension(String directory, String[] fileExtensions) {\n //---------- create an empty list of files ----------\n ArrayList<File> programmingFiles = new ArrayList<File>();\n\n //---------- retrieve a list of all non-hidden files in the directory ----------\n ArrayList<File> progFiles = getFilesInDirectory(directory, true);\n\n //---------- go through each file in the directory ----------\n for (File f : progFiles) {\n //---------- we will ignore subdirectories ----------\n if (f.isFile()) {\n //---------- retrieve the extension on the file ----------\n String f_extension = getFileExtension(f).toLowerCase();\n //if fileExtensions.contains();\n if (Arrays.asList(fileExtensions).contains(f_extension))\n for (String ext : fileExtensions) {\n //---------- if the extension on the file matches\n // one of the extension in the extensions list, add\n // it to the programming files list. ----------\n if (f_extension.equals(ext.toLowerCase()))\n programmingFiles.add(f);\n }\n\n }\n }\n\n return programmingFiles;\n }",
"public static void listOfFiles(File dirPath){\n\t\tFile filesList[] = dirPath.listFiles();\r\n \r\n\t\t// For loop on each item in array \r\n for(File file : filesList) {\r\n if(file.isFile()) {\r\n System.out.println(file.getName());\r\n } else {\r\n \t // Run the method on each nested folder\r\n \t listOfFiles(file);\r\n }\r\n }\r\n }",
"List<File> list(String directory) throws FindException;",
"static void walkTheDir(){ \n\t try (Stream<Path> paths = Files.walk(Paths.get(\"/ownfiles/tullverketCert/source\"))) {\n\t \t paths\n\t \t .filter(Files::isRegularFile)\n\t \t //.forEach(System.out::println);\n\t \t .forEach( e ->{\n\t \t \t\tSystem.out.println(e);\n\t \t \t\tSystem.out.println(e.getParent());\n\t \t \t\t\n\t \t \t});\n\t \t \n \t}catch (Exception e) { \n\t System.out.println(\"Exception: \" + e); \n\t } \n\t }",
"List<String> getFiles(String path, String searchPattern) throws IOException;",
"public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\n\t\t\t\t\tif (currentWorkingPath.equals(dir)) {\r\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\r\n\t\t\t\t}",
"public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\n\t\t\t\t\tif (currentWorkingPath.equals(dir)) {\r\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\r\n\t\t\t\t}",
"public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\n\t\t\t\t\tif (currentWorkingPath.equals(dir)) {\r\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\r\n\t\t\t\t}",
"public static void zipFile(final Path path, final Path baseForName, final ZipOutputStream zio, \n\t\t\tfinal boolean recursive, final Predicate<Path> filter) throws IOException {\n\t\tif (Files.isRegularFile(path) && (filter == null || filter.test(path))) {\n\t\t\tString name = baseForName == null ? path.toString() : baseForName.relativize(path).toString() ;\n\t\t\tname = name.replace('\\\\', '/');\n\t\t\tfinal ZipEntry entry = new ZipEntry(name); \n\t\t\tzio.putNextEntry(entry);\n\t\t\tfinal byte[] buffer = new byte[4096];\n\t\t\tint length;\n\t\t\ttry (final InputStream in = Files.newInputStream(path)) {\n\t\t\t\twhile ((length = in.read(buffer)) >= 0) {\n\t\t\t\t\tzio.write(buffer, 0 , length);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!recursive || !Files.isDirectory(path))\n\t\t\treturn;\n\t\tFiles.walkFileTree(path, new java.nio.file.SimpleFileVisitor<Path>() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n\t\t\t\tif (filter != null && Files.isDirectory(file)) {\n\t\t\t\t\tif (!filter.test(file))\n\t\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\n\t\t\t\t\telse\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t\t}\n\t\t\t\tif (!Files.isRegularFile(file) || (filter != null && !filter.test(file)))\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t\tfinal Path relativeBase = baseForName != null ? baseForName : path;\n\t\t\t\tfinal Path relativePath = relativeBase.relativize(file);\n\t\t\t\tfinal ZipEntry entry = new ZipEntry(relativePath.toString().replace('\\\\', '/')); // TODO check\n\t\t\t\tzio.putNextEntry(entry);\n\t\t\t\tfinal byte[] buffer = new byte[4096];\n\t\t\t\tint length;\n\t\t\t\ttry (final InputStream in = Files.newInputStream(file)) {\n\t\t\t\t\twhile ((length = in.read(buffer)) >= 0) {\n\t\t\t\t\t\tzio.write(buffer, 0 , length);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\n\t\t\t\tLoggerFactory.getLogger(ZipUtils.class).warn(\"File visit failed: {}\"\n\t\t\t\t\t\t+ \". {}\", file, exc.toString());\n\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t}\n\t\t\t\n\t\t});\n\t}",
"private void getAllFiles(File dir, List<File> fileList) throws IOException {\r\n File[] files = dir.listFiles();\r\n if(files != null){\r\n for (File file : files) {\r\n // Do not add the directories that we need to skip\r\n if(!isDirectoryToSkip(file.getName())){\r\n fileList.add(file);\r\n if (file.isDirectory()) {\r\n getAllFiles(file, fileList);\r\n }\r\n }\r\n }\r\n }\r\n }",
"public JodeList search(Predicate<Jode> filter) {\n List<Node> ret = new ArrayList<>();\n if (filter.test(this)) {\n ret.add(this.extend());\n }\n for (Jode j : this.children()) {\n JodeList subResult = j.search(filter);\n for (Jode subJ : subResult) {\n ret.add(subJ.extend());\n }\n }\n return new JodeList(ret);\n }",
"@VTID(9)\n void treeFilter(\n IUIAutomationCondition filter);",
"public static ArrayList<String> listFilesInFolder(String pFolderPath, boolean pIncludeSubfolders,\n String pExtension) {\n ArrayList<String> list = new ArrayList<String>();\n\n /*\n * depth = 0 -> only the specified file/folder is returned. To get all\n * files inside a folder, depth must be set to 1.\n */\n int depth = 1;\n if (pIncludeSubfolders) {\n depth = Integer.MAX_VALUE;\n }\n\n String matcherString = \"glob:**\";\n if (!ObjectUtils.isObjectEmpty(pExtension)) {\n matcherString += \".\" + pExtension;\n }\n PathMatcher matcher = FileSystems.getDefault().getPathMatcher(matcherString);\n\n try (Stream<Path> paths = Files.walk(Paths.get(pFolderPath), depth)) {\n // paths.filter(Files::isRegularFile).filter(path ->\n // matcher.matches(path))\n // .forEach(path ->\n // System.out.println(path.normalize().toString()));\n paths.filter(Files::isRegularFile).filter(path -> matcher.matches(path))\n .forEach(path -> list.add(path.normalize().toString()));\n } catch (IOException e) {\n LogUtils.logError(DirectoryUtils.class, \"IOException while listing files in folder [\" + pFolderPath + \"]\",\n e);\n }\n\n return list;\n }",
"private void scanDirectory(final File directory) throws AnalyzerException {\n\t\tFile[] files = directory.listFiles();\n\t\tfor (File f : files) {\n\t\t\t// scan .class file\n\t\t\tif (f.isFile() && f.getName().toLowerCase().endsWith(\".class\")) {\n\t\t\t\tInputStream is = null;\n\t\t\t\ttry {\n\t\t\t\t\tis = new FileInputStream(f);\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\tthrow new AnalyzerException(\n\t\t\t\t\t\t\t\"Cannot read input stream from '\"\n\t\t\t\t\t\t\t\t\t+ f.getAbsolutePath() + \"'.\", e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tnew ClassReader(is).accept(scanVisitor,\n\t\t\t\t\t\t\tClassReader.SKIP_CODE);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new AnalyzerException(\n\t\t\t\t\t\t\t\"Cannot launch class visitor on the file '\"\n\t\t\t\t\t\t\t\t\t+ f.getAbsolutePath() + \"'.\", e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new AnalyzerException(\n\t\t\t\t\t\t\t\"Cannot close input stream on the file '\"\n\t\t\t\t\t\t\t\t\t+ f.getAbsolutePath() + \"'.\", e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// loop on childs\n\t\t\t\tif (f.isDirectory()) {\n\t\t\t\t\tscanDirectory(f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"void filterChanged(String filter) {\n if (filter.isEmpty()) {\n treeView.setRoot(rootTreeItem);\n } else {\n TreeItem<FilePath> filteredRoot = createTreeRoot();\n filter(rootTreeItem, filter, filteredRoot);\n treeView.setRoot(filteredRoot);\n }\n }",
"public GlobFileSet recurse()\n\t\t{\n\t\tm_recurse = true;\n\t\treturn (this);\n\t\t}",
"protected List <WebFile> getSourceDirChildFiles()\n{\n // Iterate over source dir and add child packages and files\n List children = new ArrayList();\n for(WebFile child : getFile().getFiles()) {\n if(child.isDir() && child.getType().length()==0)\n addPackageDirFiles(child, children);\n else children.add(child);\n }\n \n return children;\n}",
"public static void copyTree(File from, File to, FileFilter filter) throws IOException {\r\n File[] children;\r\n \r\n \tif (!from.exists()) {\r\n \t\tthrow new IOException (\"Source of copy \\'\" + from.getName() + \"\\' doesn't exist\");\r\n \t}\r\n \t\r\n \tif (to.getCanonicalPath().equals(from.getCanonicalPath())) {\r\n \t\tthrow new IOException (\"\\'\" + from.getName() + \"\\' cannot copy to itself\");\r\n \t}\r\n\r\n if (from.isDirectory()) {\r\n children = from.listFiles(filter);\r\n // just like cp command, if target exist, make a new folder into\r\n // the target, copy content into the target folder\r\n if (to.exists()) {\r\n \tif (to.isFile()) {\r\n \t\tthrow new IOException(\"Cannot overwrite non-directory \\'\" + to.getName() + \"\\' with directory \" + from.getName());\r\n \t}\r\n \t// copy into new directory name grafted after the existing one\r\n \tto = new File(to, from.getName());\r\n \tcopyTree(from, to, filter);\r\n \treturn;\r\n } else {\r\n \t// copy into new directory name\r\n \tto.mkdir(); \t\r\n for (int i = 0; i < children.length; i++) {\r\n File curto = new File(to, children[i].getName());\r\n \r\n copyTree(children[i], curto, filter);\r\n }\r\n return;\r\n }\r\n }\r\n else {\r\n \tif (to.isDirectory()) {\r\n \t\tto = new File (to, from.getName());\r\n \t}\r\n copyFile(from, to);\r\n return;\r\n }\r\n \r\n }",
"private List<Path> listSourceFiles(Path dir) throws IOException {\n\t\tList<Path> result = new ArrayList<>();\n\t\ttry (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, \"*.json\")) {\n\t\t\tfor (Path entry: stream) {\n\t\t\t\tresult.add(entry);\n\t\t\t}\n\t\t} catch (DirectoryIteratorException ex) {\n\t\t\t// I/O error encounted during the iteration, the cause is an IOException\n\t\t\tthrow ex.getCause();\n\t\t}\n\t\treturn result;\n\t}",
"public static File[] findAllFiles(File root, boolean recurse) {\n\t\tArrayList<File> files = new ArrayList<File>();\n\n\t\tfindAllFilesRecurse(root, files, recurse);\n\n\t\t// convert ArrayList to array\n\t\tFile[] result = new File[files.size()];\n\t\tfiles.toArray(result);\n\t\treturn result;\n\t}",
"public void performSearch() throws IOException {\n configuration();\n\n File fileDir = new File(queryFilePath);\n if (fileDir.isDirectory()) {\n File[] files = fileDir.listFiles();\n Arrays.stream(files).forEach(file -> performSearchUsingFileContents(file));\n }\n }",
"Enumeration<URL> findEntries(String path, String pattern, boolean recurse) throws IOException;",
"private static FileDiffDirectory fillDirectoryDiff(String directory, DiffState state) throws IOException {\n \t\n \t\tFile dir = new File(directory);\n \t\t\n\t\tFile[] files = dir.listFiles();\n\t\tArrays.sort(files);\n\t\t\n\t\tList<File> filesWithinDirectory = Arrays.asList(files);\n \t\t\n \t\tFileDiffDirectory diffDirectory = new FileDiffDirectory(directory, state);\n \t\t\n \t\tfor(File file : filesWithinDirectory) {\n \t\t\t\n \t\t\tif (file.isHidden()) {\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tif (file.isFile()) {\n \t\t\t\tif (state.equals(DiffState.DELETED)) {\n \t\t\t\t\tdiffDirectory.addFile(FileDiffFile.compareFile(file.getAbsolutePath(), null));\n \t\t\t\t} else {\n \t\t\t\t\tdiffDirectory.addFile(FileDiffFile.compareFile(null, file.getAbsolutePath()));\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tif (state.equals(DiffState.DELETED)) {\n \t\t\t\t\tdiffDirectory.addDirectory(FileDiffDirectory.compareDirectory(file.getAbsolutePath(), null));\n \t\t\t\t} else {\n \t\t\t\t\tdiffDirectory.addDirectory(FileDiffDirectory.compareDirectory(null, file.getAbsolutePath()));\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\treturn diffDirectory;\n \t}",
"public void process(File path) throws IOException {\n\t\tIterator<File> files = Arrays.asList(path.listFiles()).iterator();\n\t\twhile (files.hasNext()) {\n\t\t\tFile f = files.next();\n\t\t\tif (f.isDirectory()) {\n\t\t\t\tprocess(f);\n\t\t\t} else {\n\t\t\t\tif (startFile != null && startFile.equals(f.getName())) {\n\t\t\t\t\tstartFile = null;\n\t\t\t\t}\n\n\t\t\t\tif (startFile == null) {\n\t\t\t\t\tprocessFile(f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public List runFilter(String filter) {\n return runFilter(\"\", filter);\n }",
"public javax.swing.filechooser.FileFilter getFileFilter();",
"@SneakyThrows\n private Stream<Class<?>> findClasses(File directory, String packageName) {\n\n val lookForClasses =\n Function2.of(ReflectionUtils::lookForClasses)\n .apply(packageName);\n\n return Optional.of(directory)\n .filter(File::exists)\n .map(File::listFiles)\n .stream()\n .flatMap(Arrays::stream)\n .flatMap(lookForClasses);\n }",
"private void seekBy() {\n Queue<File> queue = new LinkedList<>();\n queue.offer(new File(root));\n while (!queue.isEmpty()) {\n File file = queue.poll();\n File[] list = file.listFiles();\n if (file.isDirectory() && list != null) {\n for (File tempFile : list) {\n queue.offer(tempFile);\n }\n } else {\n if (args.isFullMatch() && searchingFile.equalsIgnoreCase(file.getName())) {\n result.add(file);\n }\n if (args.isMask() && searchingFile.replaceAll(\"\\\\*\", \".*\").equalsIgnoreCase(file.getName())) {\n result.add(file);\n }\n if (args.isRegex() && file.getName().matches(args.getName())) {\n result.add(file);\n }\n }\n }\n this.writeLog(output, result);\n }",
"public WildcardFilenameFilter( String wildcard ) {\n\t\tpattern = Pattern.compile( wildcardAsRegex( wildcard ) );\n\t\tsetAcceptDirectories( true );\n\t}",
"private static Stream<Path> listRecur(Path p) {\n if (Files.isDirectory(p)) {\n try {\n return Files.list(p).flatMap(DirectoryClassPath::listRecur);\n } catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n } else {\n return Stream.of(p);\n }\n }",
"public static void findStructureFiles() {\n\t\tstructureFiles = new LinkedList<File>();\n\t\tLinkedList<File> unexploredDirectories = new LinkedList<File>();\n\t\tFile baseDir = new File(\"structures\");\n\t\t\n\t\tif (baseDir.exists() && baseDir.isDirectory()) {\n\t\t\t// load base directory's files\n\t\t\trecursiveFindStructureFiles(baseDir, unexploredDirectories);\n\t\t\t\n\t\t\t// load sub-directories' files, breadth-first\n\t\t\twhile (!unexploredDirectories.isEmpty()) {\n\t\t\t\trecursiveFindStructureFiles(unexploredDirectories.pop(), unexploredDirectories);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"Unable to locate structures folder.\");\n\t\t}\n\t}",
"public void should_read_files_in_directory() throws IOException {\n File tempDir = Files.createTempDir();\n tempDir.deleteOnExit();\n // json file\n File file1 = File.createTempFile(\"file1\", \".json\", tempDir);\n String content1 = \"content1\";\n Files.write(content1.getBytes(), file1);\n // n1ql file\n File file2 = File.createTempFile(\"file2\", \".N1QL\", tempDir);\n String content2 = \"content2\";\n Files.write(content2.getBytes(), file2);\n // txt file\n Files.write(getRandomString().getBytes(), File.createTempFile(getRandomString(), \".txt\", tempDir));\n\n // When we read files in this directory with extension filter\n Map<String, String> result = FileUtils.readFilesInDirectory(tempDir.toPath(), \"json\", \"n1ql\");\n\n // Then we should have file content matching this extension\n Assert.assertEquals(2, result.size());\n Assert.assertEquals(content1, result.get(file1.getName()));\n Assert.assertEquals(content2, result.get(file2.getName()));\n}",
"private static String[] getAllFiles(File directory, String extension) {\n // TODO: extension has to be .txt, .doc or .docx\n File[] files = directory.listFiles(File::isFile);\n String[] filepaths = new String[files.length];\n String regex = \"^.*\" + extension + \"$\";\n for (int i = 0; i < filepaths.length; i++) {\n if (files[i].getPath().matches(regex)) {\n filepaths[i] = files[i].getPath();\n }\n }\n writeOutput(\"The folder \" + directory + \" contains \" + filepaths.length + \" \" + extension + \" file(s).\" + \"\\n\");\n return filepaths;\n }",
"@Override\n public List<GEMFile> getLocalFiles(String directory) {\n File dir = new File(directory);\n List<GEMFile> resultList = Lists.newArrayList();\n File[] fList = dir.listFiles();\n if (fList != null) {\n for (File file : fList) {\n if (file.isFile()) {\n resultList.add(new GEMFile(file.getName(), file.getParent()));\n } else {\n resultList.addAll(getLocalFiles(file.getAbsolutePath()));\n }\n }\n gemFileState.put(STATE_SYNC_DIRECTORY, directory);\n }\n return resultList;\n }",
"public static DefaultMutableTreeNode createFileTree(String folder, String extension) {\n File f = new File(folder);\n DefaultMutableTreeNode top = new DefaultMutableTreeNode();\n top.setUserObject(f.getName());\n if (f.isDirectory()) {\n File fls[] = f.listFiles();\n for (int i = 0; i < fls.length; i++) {\n String name = fls[i].getName();\n if (name.endsWith(extension)\n || fls[i].isDirectory()) //skip non-csv files\n top.add(createFileTree(fls[i].getPath(), extension) );\n else\n System.out.println(\"Ignoring....\" + name);\n }\n }\n return (top);\n }",
"Results processFilter(FilterSpecifier filter) throws SearchServiceException;",
"private void FindFiles(Path findPath)\n {\n\n try (DirectoryStream<Path> stream = Files.newDirectoryStream(findPath))\n {\n\n for (Path thisPath : stream)\n {\n File file = new File(thisPath.toString());\n\n if (file.isDirectory())\n {\n dirCount++;\n\n if (HasMatch(thisPath.toString(), lineIncludePattern, lineExcludePattern))\n {\n dirLineMatchCount++;\n\n System.out.println(thisPath.toAbsolutePath().toString() + \",directory,none\");\n }\n\n if (HasMatch(thisPath.toString(), dirIncludePattern, dirExcludePattern))\n {\n dirMatchCount++;\n folderLevel++;\n //indentBuffer = String.join(\"\", Collections.nCopies(folderLevel * 3, \" \"));\n indentBuffer = \"\";\n\n //System.out.println(indentBuffer + thisPath.toString() + \" ...\");\n FindFiles(thisPath.toAbsolutePath());\n\n folderLevel--;\n //indentBuffer = String.join(\"\", Collections.nCopies(folderLevel * 3, \" \"));\n }\n }\n else\n {\n fileCount++;\n\n if (HasMatch(thisPath.getParent().toString(), lineIncludePattern, lineExcludePattern))\n {\n fileLineMatchCount++;\n\n System.out.println(thisPath.getParent().toString() + \",\" + thisPath.getFileName() + \",none\");\n }\n\n if (HasMatch(thisPath.toString(), fileIncludePattern, fileExcludePattern))\n {\n fileMatchCount++;\n\n File refFile;\n if (doReplace)\n {\n refFile = new File(thisPath.toString() + \"_bak\");\n file.renameTo(refFile);\n\n //System.out.println(indentBuffer + thisPath.toString());\n Scan(refFile.toPath().toAbsolutePath().toString(),thisPath.toAbsolutePath().toString());\n }\n else\n {\n //System.out.println(indentBuffer + thisPath.toString());\n Scan(file.toPath().toAbsolutePath().toString(),thisPath.toAbsolutePath().toString());\n }\n\n }\n }\n }\n }\n catch (Exception e)\n {\n System.err.format(\"Exception occurred trying to read '%s'.\", findPath);\n e.printStackTrace();\n }\n\n }",
"public static ArrayList<Path> traverse(Path directory) {\r\n ArrayList<Path> filenames = new ArrayList<Path>();\r\n traverse(directory, filenames);\r\n return filenames;\r\n }",
"@Override\n\t\t\tpublic ElementVisitResult preVisitDirectory(Element dir,\n\t\t\t\t\tInteger depth, Object[] depthToPass) {\n\t\t\t\tprettyPrintElement(dir);\n\t\t\t\tif (depth <= 0) return ElementVisitResult.SKIP_SIBLINGS;\n\t\t\t\t//if we continue, don't forget to pass the new depth\n\t\t\t\tdepthToPass[0] = new Integer(depth - 1);\n\t\t\t\treturn ElementVisitResult.CONTINUE;\n\t\t\t}",
"public abstract boolean doFilter(File file);",
"public static void compressFilteredRepository(Repository repo, boolean filter) {\n // Get a temporary root for the compressed repository\n RepoFile newRoot = RepoFile.make(new File(FileUtils.getTempDir(), \"newRoot\"));\n \n logger.info(\"Beginning filtered repository compression...\");\n int count = 0;\n int total = repo.getProjectCount();\n Random random = null;\n double max = REPO_SUBSET_RATE.getValue();\n if (filter) {\n random = new Random();\n }\n // Go through every project and compress it\n for (RepoProject project : repo.getProjects()) {\n // Make sure the project has at least one file\n IFileSet files = project.getFileSet();\n if (files.getJavaFileCount() > 0 && (!filter || (random.nextDouble() < max))) {\n logger.info(\"Processing project \" + ++count + \" of \" + total);\n ZipOutputStream zos = null;\n try {\n zos = new ZipOutputStream(new FileOutputStream(newRoot.rebaseFile(project.getProjectRoot()).getChildFile(\"project.zip\")));\n// zos.setLevel(9);\n // Add the properties file\n FileInputStream fis = null;\n // Messy, but only want the entire writing to fail if the output stream has issues\n try {\n fis = new FileInputStream(project.getProperties().toFile());\n } catch (IOException e) {\n logger.log(Level.SEVERE, \"Unable to open file: \" + project.getProperties().toString(), e);\n fis = null;\n }\n if (fis != null) {\n try {\n zos.putNextEntry(new ZipEntry(project.getProperties().getName()));\n FileUtils.writeStreamToStream(fis, zos);\n } finally {\n FileUtils.close(fis);\n }\n // Add the individual files\n for (IJavaFile file : files.getFilteredJavaFiles()) {\n RepoFile rFile = file.getFile();\n try {\n fis = new FileInputStream(rFile.toFile());\n } catch (IOException e) {\n logger.log(Level.SEVERE, \"Unable to open file: \" + rFile.toString());\n }\n if (fis != null) {\n try {\n zos.putNextEntry(new ZipEntry(\"content/\" + rFile.getRelativePath()));\n FileUtils.writeStreamToStream(fis, zos);\n } finally {\n FileUtils.close(fis);\n }\n }\n }\n }\n } catch (IOException e) {\n logger.log(Level.SEVERE, \"Unable to write project zip.\", e);\n } finally {\n FileUtils.close(zos);\n }\n } else {\n logger.info(\"Skipping project \" + ++count + \" of \" + total);\n }\n }\n \n // Compress the repository\n FileUtils.zipFile(newRoot.toFile(), COMPRESSED_FILTERED_REPO_FILE.asOutput());\n \n // Clean temp files\n FileUtils.cleanTempDir();\n }",
"public static void main(String[] args) {\n final FilenameFilter filter = new FilenameFilter() {\n @Override\n public boolean accept(File dir, String name) {\n return name.toLowerCase().endsWith(\".txt\");\n }\n };\n\n //use a lambda\n final FilenameFilter filterLambda1 = (File dir, String name) -> { return name.toLowerCase().endsWith(\".txt\");};\n\n //also you can not use the types anymore, let the compiler figure them out\n final FilenameFilter filterLambda2 = (dir, name) -> { return name.toLowerCase().endsWith(\".txt\"); };\n\n //lose the return and {}\n final FilenameFilter filterLambda3 = (dir, name) -> !dir.isDirectory()&&name.toLowerCase().endsWith(\".txt\");\n\n File homeDir = new File(System.getProperty(\"user.home\"));\n String[] files = homeDir.list(filterLambda3);\n for(String file:files){\n System.out.println(file);\n }\n\n }",
"public List<String> search(File file, String name) {\n\t\t\n\t\tif (file.isDirectory()) {\n\t\t\tlog.debug(\"Searching directory:[{}]\", file.getAbsoluteFile());\n\n\t\t\t// do you have permission to read this directory?\n\t\t\tif (file.canRead()) {\n\t\t\t\tfor (File temp : file.listFiles()) {\n\t\t\t\t\tif (temp.isDirectory()) {\n\t\t\t\t\t\tsearch(temp, name);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (name.equals(temp.getName())) {\n\t\t\t\t\t\t\tresult.add(temp.getAbsoluteFile().toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tlog.info(\"Permission Denied: [{}]\", file.getAbsoluteFile());\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}",
"public static void printListFilesRecursive(String startDir) {\n File dir = new File(startDir);\n File[] files = dir.listFiles();\n\n if (files != null && files.length > 0) {\n for (File file : files) {\n //Check if the file is a directory\n if (file.isDirectory()) {\n System.out.println(\"-- \" + file.getName());\n printListFilesRecursive(file.getAbsolutePath());\n } else {\n System.out.println(file.getName());\n }\n }\n }\n }",
"private ArrayList<char[]> subdirectoriesToFiles(String inputDir, ArrayList<char[]> fullFileList) throws IOException {\n\t\tArrayList<char[]> currentList =\n\t\t\t\tnew ArrayList<char[]>(Arrays.asList(new File(inputDir).listFiles()));\n\t\t\n\t\tfor (File file: currentList) {\n\t\t\tif (isJavaFile(file)) \n\t\t\t\tfullFileList.add(file);\n\t\t\t\n\t\t\telse if (file.isDirectory())\n\t\t\t\tsubdirectoriesToFiles(file.getPath(), fullFileList);\n\t\t\t\n\t\t\telse if (isJarFile(file))\n\t\t\t\tsubdirectoriesToFiles(jarToFile(file), fullFileList);\n\t\t}\n\t\treturn fullFileList;\n\t}",
"private List<File> getFileList(File root){\n\t List<File> returnable = new ArrayList<File>();\n\t if(root.exists()){\n\t\t for(File currentSubFile : root.listFiles()){\n\t\t\t if(currentSubFile.isDirectory()){\n\t\t\t\t returnable.addAll(getFileList(currentSubFile));\n\t\t\t } else {\n\t\t\t\t returnable.add(currentSubFile);\n\t\t\t }\n\t\t }\n\t }\n\t return returnable;\n }"
] |
[
"0.70562994",
"0.70519274",
"0.70512265",
"0.64236116",
"0.6421589",
"0.61343354",
"0.59475964",
"0.5869907",
"0.57541126",
"0.57379794",
"0.5554192",
"0.55473477",
"0.5535322",
"0.55268544",
"0.54901564",
"0.54749256",
"0.5454544",
"0.5445843",
"0.53704035",
"0.53661054",
"0.5365816",
"0.5330444",
"0.5304153",
"0.5300125",
"0.52791744",
"0.52496976",
"0.5240048",
"0.5162055",
"0.5152693",
"0.51518536",
"0.5144029",
"0.5117578",
"0.51035565",
"0.50937676",
"0.5082078",
"0.5080526",
"0.50776887",
"0.50702435",
"0.50491613",
"0.50452715",
"0.50225306",
"0.49595696",
"0.4949713",
"0.4947803",
"0.4941137",
"0.49109054",
"0.48909402",
"0.48781243",
"0.48775974",
"0.4873666",
"0.48445526",
"0.48406297",
"0.48048502",
"0.4802425",
"0.47991285",
"0.47968972",
"0.47920293",
"0.47728333",
"0.4771669",
"0.4750879",
"0.4750879",
"0.4750879",
"0.47339657",
"0.47301242",
"0.47245827",
"0.47209272",
"0.47145033",
"0.47118276",
"0.47019255",
"0.47004098",
"0.46996933",
"0.46947974",
"0.4678374",
"0.46770635",
"0.46750706",
"0.46732393",
"0.46605226",
"0.46341977",
"0.46194503",
"0.46146291",
"0.4610574",
"0.46062988",
"0.46056464",
"0.46009701",
"0.45917362",
"0.45810038",
"0.45807615",
"0.4578751",
"0.4562118",
"0.45614377",
"0.45417228",
"0.4539274",
"0.45371056",
"0.4525784",
"0.4515067",
"0.4506768",
"0.44930792",
"0.4490043",
"0.4482064",
"0.44782522"
] |
0.6731632
|
3
|
Get the directory used for temporary files.
|
public static File getTemporaryDirectory() {
File dir = new File(System.getProperty("java.io.tmpdir", //$NON-NLS-1$
System.getProperty("user.dir", "."))); //$NON-NLS-1$ //$NON-NLS-2$
try {
return dir.getCanonicalFile();
} catch (IOException e) {
return dir;
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static File getTempDirectory() {\r\n\t\tFile tempdir = new File(System.getProperty(\"java.io.tmpdir\"));\r\n\t\treturn tempdir;\r\n\t}",
"public static File getTempDirectory() {\r\n\t\treturn new File(System.getProperty(\"java.io.tmpdir\"));\r\n\t}",
"public static String getTempDirectoryPath()\n {\n return System.getProperty( \"java.io.tmpdir\" );\n }",
"private String getTmpPath() {\n return getExternalFilesDir(null).getAbsoluteFile() + \"/tmp/\";\n }",
"@Override\n public String getTempDir() {\n return Comm.getAppHost().getTempDirPath();\n }",
"public String getUserTempDir() throws IOException {\n\t\treturn \"/data/local/tmp/\";\n\t}",
"private File getTempFolder(String osBasePath) {\n File baseTempFolder = new File(osBasePath, \"temp\");\n return baseTempFolder;\n }",
"@Override\n public File getServletTempDirectory(String moduleContextPath) {\n ApplicationDescriptor desc = getApplicationDescriptor(moduleContextPath);\n if (desc == null) {\n return null;\n }\n String domainDir = deploymentManager.getInstanceProperties().getProperty(WLPluginProperties.DOMAIN_ROOT_ATTR);\n assert domainDir != null;\n\n // FIXME can we get this via JMX ?\n File tmpPath = new File(new File(domainDir), \"servers\" + File.separator + desc.getServerName() + File.separator + \"tmp\" // NOI18N\n + File.separator + \"_WL_user\" + File.separator + desc.getName()); // NOI18N\n if (tmpPath.exists() && tmpPath.isDirectory()) {\n File[] subDirs = tmpPath.listFiles();\n if (subDirs != null) {\n for (File subdir : subDirs) {\n // FIXME multiple subdirs - what does that mean\n File servletDir = new File(subdir, \"jsp_servlet\"); // NOI18N\n if (servletDir.exists() && servletDir.isDirectory()) {\n // FIXME make simpler\n return servletDir.getParentFile();\n }\n }\n }\n }\n return null;\n }",
"private static File createTempDir() {\n\t\tFile baseDir = new File(\"/opt/tomcat7/temp\");\r\n\t\tString baseName = \"omicseq-TempStorage\" + \"-\";\r\n\r\n\t\tfor (int counter = 0; counter < 10000; counter++) {\r\n\t\t\tFile tempDir = new File(baseDir, baseName + counter);\r\n\t\t\tif (!tempDir.exists()) {\r\n\t\t\t\tif (tempDir.mkdir())\r\n\t\t\t\t\treturn tempDir;\r\n\t\t\t} else\r\n\t\t\t\treturn tempDir;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private static File prepareTempFolder() {\n File result;\n try {\n result = java.nio.file.Files.createTempDirectory(\n DCOSService.class.getSimpleName()).toFile();\n System.out.println(result.toString());\n\n return result;\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"private String getDirTempDruida()\n\t\t\tthrows Exception\n {\t\t\t\t\n\t\t\tString dir = null;\n\t\t\tdir = Contexto.getPropiedad(\"TMP.UPLOAD\");\t\t\n\t\t\treturn dir;\n }",
"private String getWebTmpDir()\n\t\t\tthrows Exception\n\t{\n\t\t\treturn Contexto.getPropiedad(\"TMP.UPLOAD2\");\n }",
"private String getFilePath(){\n\t\tif(directoryPath==null){\n\t\t\treturn System.getProperty(tmpDirSystemProperty);\n\t\t}\n\t\treturn directoryPath;\n\t}",
"public String getTemporaryFilePath()\n {\n return callString(\"GetTemporaryFilePath\");\n }",
"public String getTempPath() {\n return tempPath;\n }",
"java.io.File getBaseDir();",
"public File getScratchDir();",
"public String getFileDirectory() {\n String storedDirectory = settings.get(\"fileDirectory\");\n \n // Default to the program files\n if (storedDirectory == null) {\n storedDirectory = System.getenv(\"ProgramFiles\");\n }\n \n return storedDirectory;\n }",
"public String getWorkDirectory(){\n String wd = \"\";\n try {\n wd = new File(\"test.txt\").getCanonicalPath().replace(\"/test.txt\",\"\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n return wd;\n }",
"public synchronized static String getCurrentDirectory() {\n if (currentDirectory == null)\n currentDirectory = canon(System.getProperty(\"user.home\"));\n return currentDirectory;\n }",
"public static String getWorkingDirectory(Context context) {\n String res;\n if (isSDCardMounted()) {\n String directory = \"For Happy\";\n res = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/\" + directory;\n } else {\n res = context.getFilesDir().getAbsolutePath() + \"/\";\n }\n if (!res.endsWith(\"/\")) {\n res += \"/\";\n }\n File f = new File(res);\n if (!f.exists()) {\n boolean success = f.mkdirs();\n if (!success) {\n LogUtil.e(\"FileUtils create file failed\");\n }\n }\n return res;\n }",
"public File getTmpFile() {\n return tmpFile;\n }",
"private static File getExternalCacheDir(Context context) {\n // TODO: This needs to be moved to a background thread to ensure no disk access on the\n // main/UI thread as unfortunately getExternalCacheDir() calls mkdirs() for us (even\n // though the Volley library will later try and call mkdirs() as well from a background\n // thread).\n return context.getExternalCacheDir();\n }",
"private String getInitialDirectory() {\n String lastSavedPath = controller.getLastSavePath();\n\n if (lastSavedPath == null) {\n return System.getProperty(Constants.JAVA_USER_HOME);\n }\n\n File lastSavedFile = new File(lastSavedPath);\n\n return lastSavedFile.getAbsoluteFile().getParent();\n }",
"public static String getBaseDir() {\r\n Path currentRelativePath = Paths.get(System.getProperty(\"user.dir\"));\r\n return currentRelativePath.toAbsolutePath().toString();\r\n }",
"protected File getDir() {\n return hasSubdirs ? DatanodeUtil.idToBlockDir(baseDir,\n getBlockId()) : baseDir;\n }",
"public String getDir();",
"public static String getUserDir() {\r\n\t\treturn userDir;\r\n\t}",
"public static Path getTaskAttemptPath(\n final TaskAttemptContext context) {\n Configuration config = context.getConfiguration();\n // Try to use the following base temporary directories, in this order:\n // 1. New-style option for task tmp dir\n // 2. Old-style option for task tmp dir\n // 3. Hadoop system-wide tmp dir\n // 4. /tmp\n // Hadoop Paths always use \"/\" as a directory separator.\n return new Path(\n String.format(\"%s/%s/%s/_out\",\n getTempDirectory(config),\n context.getTaskAttemptID().toString(), TEMP_DIR_NAME));\n }",
"public String workingDirectory() {\n\t\treturn workingDir.getAbsolutePath();\n\t}",
"public static File getBaseDir()\n {\n return fBaseDir;\n }",
"public final String getTemporaryFile() {\n\t\treturn m_tempFile;\n\t}",
"public static String getUserDir() {\n return System.getProperty(\"user.dir\");\n }",
"protected File getRootDir() {\r\n\t\tif (rootDir == null) {\r\n\t\t\trootDir = new File(getProperties().getString(\"rootDir\"));\r\n\t\t\tif (! rootDir.exists())\r\n\t\t\t\tif (! rootDir.mkdirs())\r\n\t\t\t\t\tthrow new RuntimeException(\"Could not create root dir\");\r\n\t\t}\r\n\t\treturn rootDir;\r\n\t}",
"public static String uploadDir() {\n\n String uploads = stringValue(\"treefs.uploads\");\n if(isNullOrEmpty(uploads)) {\n // default home location\n uploads = home() + File.separator + \"uploads\";\n } else {\n uploads = home() + File.separator + uploads;\n }\n\n System.out.println(\"uploadDir=\" + uploads);\n return uploads;\n }",
"private File getCameraTempFile() {\n\t\tFile dir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM);\n\t\tFile output = new File(dir, SmartConstants.CAMERA_CAPTURED_TEMP_FILE);\n\n\t\treturn output;\n\t}",
"File prepareTempSourceDirectory() throws FileNotFoundException, IOException{\n\t\tFile tempfile = null;\n\t\tFile tempdir = null;\n\t\ttempfile = File.createTempFile(\"temp\", \"Delete\");\n\t\ttempdir = tempfile.getParentFile();\n\t\ttempfile.delete();\n\t\ttempdir = new File(tempdir, \"SAFS_UPDATE\");\n\t\ttempdir.mkdir();\n\n\t\tFile[] files = tempdir.listFiles();\n\t\tif(files != null && files.length > 0){\n\t\t\tfor(File file:files){\n\t\t\t\tif(file.isDirectory()) {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tFileUtilities.deleteDirectoryRecursively(file.getAbsolutePath(), false);\n\t\t\t\t\t}catch(Throwable x){\n\t\t\t\t\t\t// java.lang.NoClassDefFoundError\n\t\t\t\t\t\terrors.println(x.getClass().getName()+\": \"+x.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\ttry{\n\t\t\t\t\t\tfile.delete();\n\t\t\t\t\t}catch(Throwable x){\n\t\t\t\t\t\terrors.println(x.getClass().getName()+\": \"+x.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(tempdir==null || !tempdir.isDirectory()) throw new IOException(\"Cannot deduce a root source directory for HTTP extraction.\");\n\t\treturn tempdir;\n\t}",
"public File getHomeDir() {\n\t\tFile f = new File(System.getProperty(\"user.home\"),MuViChatConstants.muviHomeDir);\t\t\n if (!f.isDirectory()) {\n\t f.mkdir();\t \n\t }\n return f;\n\t}",
"String getDir();",
"public static File getUserDir()\n {\n return fUserDir;\n }",
"Object getDir();",
"String getDirectoryPath();",
"@Override\n public String getCurrentDirectory() {\n return (String) gemFileState.get(STATE_SYNC_DIRECTORY);\n }",
"public String getCurrentProfiledir()\r\n {\r\n String res = null, aux = \"\";\r\n File dir;\r\n Vector<String> profiles = getProfiledirs();\r\n\r\n for (Enumeration<String> e = profiles.elements(); e.hasMoreElements();)\r\n {\r\n aux = e.nextElement();\r\n dir = new File(aux + File.separator + _lockFile);\r\n if (dir.exists())\r\n {\r\n res = aux + File.separator;\r\n }\r\n }\r\n return res;\r\n }",
"public static File getWorkspaceDir(BundleContext context)\n {\n return new File(getTargetDir(context), \"../../\");\n }",
"public File getFileChooserDirectory() {\n\n\t\tFile dir = null;\n\n\t\ttry {\n\t\t\tFile tmpDir = new File(diffuseBaseValueControl.getText());\n\t\t\tif (tmpDir.exists()) dir = tmpDir.getParentFile();\n\t\t} catch (Exception ex) {\n\t\t}\n\n\t\ttry {\n\t\t\tFile tmpDir = new File(specularBaseValueControl.getText());\n\t\t\tif (tmpDir.exists()) dir = tmpDir.getParentFile();\n\t\t} catch (Exception ex) {\n\t\t}\n\n\t\ttry {\n\t\t\tFile tmpDir = new File(((TextField) textureInputLayout.lookup(\"tex_path\")).getText());\n\t\t\tif (tmpDir.exists()) dir = tmpDir.getParentFile();\n\t\t} catch (Exception ex) {\n\t\t}\n\n\t\treturn dir;\n\t}",
"private static Path localTemp(Configuration conf, int taskId, int attemptId) {\n String localDirs = conf.get(\"mapreduce.cluster.local.dir\");\n Random rand = new Random(Objects.hashCode(taskId, attemptId));\n String[] dirs = localDirs.split(\",\");\n String dir = dirs[rand.nextInt(dirs.length)];\n\n try {\n return FileSystem.getLocal(conf).makeQualified(new Path(dir));\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to localize path: \" + dir, e);\n }\n }",
"public static File getRootDirectory() {\n\t\treturn ROOT_DIRECTORY;\n\t}",
"Path getBaseInputDir();",
"public java.io.File getBaseDir() {\n return baseDir;\n }",
"FsPath baseDir();",
"public static String rootDir()\n {\n read_if_needed_();\n \n return _root;\n }",
"private static String getRioHomeDirectory() {\n String rioHome = RioHome.get();\n if(!rioHome.endsWith(File.separator))\n rioHome = rioHome+File.separator;\n return rioHome;\n }",
"public static String findCurrentDirectory() {\n\t\tString absolutePath = new File(\"\").getAbsolutePath();\n\t return absolutePath;\n\t}",
"private File getDataDir(){\n\t\tFile file = new File(this.configManager.getConfigDirectory() +\n\t\t\t\tFile.separator + \n\t\t\t\tDATA_DIR);\n\t\t\n\t\tif(!file.exists()){\n\t\t\tfile.mkdirs();\n\t\t}\n\t\t\n\t\treturn file;\n\t}",
"public File getDefaultDiskCacheDir() {\n if (mContext == null)\n throw new FIllegalArgumentException(\"Context can not be null\");\n return DiskCacheUtil.getDiskLruCacheDir(mContext);\n }",
"public File getBasedir()\n {\n return basedir;\n }",
"public static File getLogDirectory() {\n\t\treturn LOG_DIRECTORY;\n\t}",
"public File getHomeDir() {\n return physicalHomeDir;\n }",
"public static File makeTempDir(String prefix){\n try {\n return Files.createTempDirectory(prefix).toFile();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"public File getBaseDir() {\n if (baseDir == null) {\n try {\n setBasedir(\".\");\n } catch (BuildException ex) {\n ex.printStackTrace();\n }\n }\n return baseDir;\n }",
"public File createTempDir(String prefix, String suffix) {\n try {\n // Create a tempfile, and delete it.\n File file = File.createTempFile(prefix, suffix, baseDir);\n\n if (!file.delete()) {\n throw new IOException(\"Unable to create temp file\");\n }\n\n // Create it as a directory.\n File dir = new File(file.getAbsolutePath());\n if (!dir.mkdirs()) {\n throw new UncheckedIOException(\n new IOException(\"Cannot create profile directory at \" + dir.getAbsolutePath()));\n }\n\n // Create the directory and mark it writable.\n FileHandler.createDir(dir);\n\n temporaryFiles.add(dir);\n return dir;\n } catch (IOException e) {\n throw new UncheckedIOException(\n new IOException(\"Unable to create temporary file at \" + baseDir.getAbsolutePath()));\n }\n }",
"public static String getOutputDir() {\n outputDir = getProperty(\"outputDir\");\n if (outputDir == null) outputDir = \"./\";\n return outputDir;\n }",
"private File getCacheDir(Context context, String uniqueName) {\n\t\tStringBuilder cachePath = new StringBuilder();\n\t\tif(Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) || !Environment.isExternalStorageRemovable()){//API9\n\t\t\tcachePath.append(context.getExternalCacheDir().getPath());\n\t\t} else {\n\t\t\tcachePath.append(context.getCacheDir().getPath());\n\t\t}\n\t return new File(cachePath.toString() + File.separator + uniqueName);\n\t}",
"public static String getWorkingDirectory() {\n // Since System.getProperty(\"user.dir\") and user.home etc. can be confusing\n // and I haven't quite figured out if they really are reliable on all systems,\n // I chose a little more complicated approach. This is exactly the same\n // like if a file is created relatively, like new File(\"testfile.txt\"), which\n // would be relative to the working directory.\n\n File f = new File(\".\");\n\n try {\n return addPathSeparator(f.getCanonicalPath());\n } catch (IOException e) {\n return null;\n }\n }",
"public static String getCurrentPath() {\n File file = new File(\"\");\n return file.getAbsolutePath();\n }",
"protected File getFlexHomeDirectory()\n\t{\n\t\tif (!m_initializedFlexHomeDirectory)\n\t\t{\n\t\t\tm_initializedFlexHomeDirectory = true;\n\t\t\tm_flexHomeDirectory = new File(\".\"); // default in case the following logic fails //$NON-NLS-1$\n\t\t\tString flexHome = System.getProperty(\"application.home\"); //$NON-NLS-1$\n\t\t\tif (flexHome != null && flexHome.length() > 0)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tm_flexHomeDirectory = new File(flexHome).getCanonicalFile();\n\t\t\t\t}\n\t\t\t\tcatch (IOException e)\n\t\t\t\t{\n\t\t\t\t\t// ignore\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn m_flexHomeDirectory;\n\t}",
"public File getRootDir() {\n return rootDir;\n }",
"public static File getExternalCacheDir(Context context) {\n\t\t// if (hasExternalCacheDir()) {\n\t\t// return context.getExternalCacheDir();\n\t\t// }\n\t\t// Before Froyo we need to construct the external cache dir ourselves\n\t\tfinal String cacheDir = FileUtils.sdPath + \"/pic_cache/\";\n\t\treturn new File(cacheDir);\n\t}",
"Optional<Path> getTempPath()\n {\n return tempPath;\n }",
"private Step createLocalWorkingDir() {\n return stepBuilderFactory.get(STEP_CREATE_LOCAL_WORK_DIR)\n .tasklet(createLocalWorkingDir)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n public ExitStatus afterStep(StepExecution stepExecution) {\n ExecutionContext stepContext = stepExecution.getExecutionContext();\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n // Share local working directory with other tasks\n String stepContextKey = STEP_CREATE_LOCAL_WORK_DIR +\n Constants.PARAMETER_NAME_DELIMITER +\n CreateDirectoryTask.EnumOutParameter.NEW_DIRECTORY.getValue();\n String localWorkingDir = (String) stepContext.get(stepContextKey);\n\n // Configure export meter serial task\n String jobContextKey = STEP_CREATE_SCENARIO_METER_FILE +\n Constants.PARAMETER_NAME_DELIMITER +\n ExportMeterDataToFileTask.EnumInParameter.WORKING_DIRECTORY.getValue();\n jobContext.put(jobContextKey, localWorkingDir);\n\n // Configure export meter data task\n jobContextKey = STEP_EXPORT_METER_DATA +\n Constants.PARAMETER_NAME_DELIMITER +\n ExportMeterDataToFileTask.EnumInParameter.WORKING_DIRECTORY.getValue();\n jobContext.put(jobContextKey, localWorkingDir);\n\n // Configure copy HDFS files task\n jobContextKey = STEP_COPY_REMOTE_FILES +\n Constants.PARAMETER_NAME_DELIMITER +\n CopyFileTask.EnumInParameter.SOURCE_PATH.getValue();\n jobContext.put(jobContextKey, localWorkingDir);\n\n // Configure delete local files task\n jobContextKey = STEP_DELETE_LOCAL_WORK_DIR +\n Constants.PARAMETER_NAME_DELIMITER +\n DeleteDirectoryTask.EnumInParameter.INPUT_DIRECTORY.getValue();\n jobContext.put(jobContextKey, localWorkingDir);\n\n return null;\n }\n\n })\n .build();\n }",
"public static File getRegistrationDirectory() {\n\t\t\n\t\tFile home = ApplicationRuntime.getInstance().getApplicationHomeDir();\n\n\t\tFile registrationDirectory = new File(home,REGISTRATION_DIRECTORY_NAME);\n\t\tif (!registrationDirectory.exists()) {\n\t\t\tregistrationDirectory.mkdir();\n\t\t}\n\t\treturn registrationDirectory;\n\t}",
"protected File getCacheDirectory() {\n \t\treturn Activator.getDefault().getStateLocation().append(\"cache\").toFile(); //$NON-NLS-1$\n \t}",
"public File getLocalCacheDirectory() {\n return pathsProvider.getLocalAcmCacheDir();\n }",
"static File getRootFile() {\n File root = new File(Constant.CONFIG_DIRECTORY_NAME);\n boolean directoryCreated = true;\n if (!root.exists()) {\n directoryCreated = root.mkdirs();\n }\n if (directoryCreated) {\n return root;\n } else {\n return null;\n }\n }",
"private String getTempFileString() {\n final File path = new File(getFlagStoreDir() + String.valueOf(lJobId) + File.separator);\n // // If this does not exist, we can create it here.\n if (!path.exists()) {\n path.mkdirs();\n }\n //\n return new File(path, Utils.getDeviceUUID(this)+ \".jpeg\")\n .getPath();\n }",
"private File getHomeDirectory() {\n String brunelDir = System.getProperty(\"brunel.home\");\n File home = brunelDir != null ? new File(brunelDir) :\n new File(System.getProperty(\"user.home\"), \"brunel\");\n return ensureWritable(home);\n }",
"public File getStoreDir();",
"public static Builder usingTempDir() throws IOException {\n File systemTempDir = FileUtils.getTempDirectory();\n return usingNewTempDirUnder(systemTempDir.toPath());\n }",
"public static String getWorkingDirectory() {\r\n try {\r\n // get working directory as File\r\n String path = DBLIS.class.getProtectionDomain().getCodeSource()\r\n .getLocation().toURI().getPath();\r\n File folder = new File(path);\r\n folder = folder.getParentFile().getParentFile(); // 2x .getParentFile() for debug, 1x for normal\r\n\r\n // directory as String\r\n return folder.getPath() + \"/\"; // /dist/ for debug, / for normal\r\n } catch (URISyntaxException ex) {\r\n return \"./\";\r\n }\r\n }",
"public static String getWorkingDirectory() {\n\n return System.getProperty(\"user.dir\");\n }",
"public File getWorkingDir() {\n return workingDir;\n }",
"public File getWorkingDir() {\n return workingDir;\n }",
"public static String getBaseDir() {\n // 'basedir' is set by Maven Surefire. It always points to the current subproject,\n // even in reactor builds.\n String baseDir = System.getProperty(\"basedir\");\n\n // if 'basedir' is not set, try the current directory\n if (baseDir == null) {\n baseDir = System.getProperty(\"user.dir\");\n }\n return baseDir;\n }",
"public File getRootDir() {\r\n\t\treturn rootDir;\r\n\t}",
"public String directory () {\n\t\treturn directory;\n\t}",
"public String getBundleDir()\n {\n if ( bundleDir != null )\n {\n bundleDir = cleanBundleDir( bundleDir );\n }\n return bundleDir;\n }",
"public File getDirectory() {\n\t\treturn file.getParentFile();\n\t}",
"public static File getDataDirectory() {\n\t\treturn DATA_DIRECTORY;\n\t}",
"private static File createReserveDiskCacheDir(Context context) {\n\t\tFile cacheDir = StorageUtils.getCacheDirectory(context, false);\n\t\tFile individualDir = new File(cacheDir, \"lazy-cache\");\n\t\tif (individualDir.exists() || individualDir.mkdir()) {\n\t\t\tcacheDir = individualDir;\n\t\t}\n\t\treturn cacheDir;\n\t}",
"@Override\r\n\tpublic File getCacheDir() {\r\n\t\treturn CommonUtil.getCacheDir();\r\n\t}",
"String getScratchDirectoryPath(String name);",
"public static File getExternalCacheDir(Context context) {\n\n\t\tif (VersionUtils.hasFroyo()) {\n\t\t\treturn context.getExternalCacheDir();\n\n\t\t}\n\t\t// Before Froyo we need to construct the external cache dir ourselves\n\n\t\tfinal String cacheDir = \"/Android/data/\" + context.getPackageName() + \"/cache/\";\n\n\t\treturn new File(Environment.getExternalStorageDirectory().getPath() + cacheDir);\n\n\t}",
"@Test\n public void testTempDirectory() {\n assertTrue(getTempDirPath().indexOf(File.separator\n\t+ \"TestSpringLockssTestCase\") > -1);\n assertTrue(getTempDirPath().endsWith(\".tmp\"));\n }",
"@Override\r\n\t\tpublic String getDir()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"public String outputFileDir() {\n return outputFileDir;\n }",
"public String getDirectoryPath() { return DirectoryManager.OUTPUT_RESULTAT + \"/\" + directoryName;}",
"public String getTestsuiteDirectory() {\n\t\treturn props.getProperty(ARGUMENT_TESTSUITE_DIRECTORY);\n\t}",
"public String getBaseDirectory()\n {\n return m_baseDirectory;\n }",
"private static File getTestDataDir() {\n File ancestor = new File(\".\");\n try {\n ancestor = ancestor.getCanonicalFile();\n } catch (IOException e) {\n throw new RuntimeException(\n \"Couldn't get canonical name of working directory.\", e);\n }\n while (ancestor != null && ancestor.exists()) {\n if (new File(ancestor, \"src/google/protobuf\").exists()) {\n return new File(ancestor, \"src/google/protobuf/testdata\");\n }\n ancestor = ancestor.getParentFile();\n }\n\n throw new RuntimeException(\n \"Could not find golden files. This test must be run from within the \" +\n \"protobuf source package so that it can read test data files from the \" +\n \"C++ source tree.\");\n }"
] |
[
"0.84345824",
"0.8434069",
"0.8188324",
"0.8024957",
"0.7467586",
"0.72452253",
"0.717578",
"0.7105387",
"0.6927717",
"0.69228673",
"0.6859015",
"0.6764331",
"0.6695612",
"0.66916263",
"0.6652084",
"0.6587926",
"0.6528948",
"0.6497207",
"0.64501315",
"0.6420641",
"0.6386753",
"0.63753825",
"0.6363181",
"0.6355456",
"0.63455486",
"0.63282233",
"0.63256055",
"0.63113713",
"0.6303035",
"0.6299024",
"0.6274548",
"0.6273721",
"0.6267869",
"0.6253534",
"0.62490946",
"0.624907",
"0.62462825",
"0.6221569",
"0.62189424",
"0.6214486",
"0.62014145",
"0.61825925",
"0.6169166",
"0.6169153",
"0.6166813",
"0.615513",
"0.6154604",
"0.6150801",
"0.6142444",
"0.6130054",
"0.6128867",
"0.61097914",
"0.61029744",
"0.6090973",
"0.6072996",
"0.6067768",
"0.60385495",
"0.60371274",
"0.6014111",
"0.60082394",
"0.60027844",
"0.5985913",
"0.5985814",
"0.5981683",
"0.59751636",
"0.5972168",
"0.5948298",
"0.5942266",
"0.5939638",
"0.59393436",
"0.5937887",
"0.5937691",
"0.5935034",
"0.59344864",
"0.5933651",
"0.59271485",
"0.592187",
"0.5916733",
"0.59051734",
"0.5904295",
"0.58739066",
"0.5872453",
"0.5872453",
"0.58692026",
"0.58663803",
"0.5859881",
"0.58595324",
"0.5859375",
"0.5834179",
"0.5831406",
"0.5830265",
"0.5817718",
"0.5816153",
"0.5808914",
"0.5777171",
"0.57757133",
"0.5775067",
"0.5772268",
"0.57700753",
"0.57678425"
] |
0.8608079
|
0
|
Get the path in a form amenable to comparing with another path. On Win32 hosts, this lowercases the path. On other hosts, the path is unmodified.
|
public static IPath getComparablePath(IPath path) {
if (path == null)
return null;
if (HostOS.IS_WIN32) {
return new Path(path.toOSString().toLowerCase());
}
return path;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static String normalizePath(String path)\r\n {\r\n StringBuilder result = new StringBuilder();\r\n char nextChar;\r\n for(int i = 0; i < path.length(); i++)\r\n {\r\n nextChar = path.charAt(i);\r\n if((nextChar == '\\\\'))\r\n {\r\n // Convert the Windows style path separator to the standard path separator\r\n result.append('/');\r\n }\r\n else\r\n {\r\n result.append(nextChar);\r\n }\r\n }\r\n \r\n return result.toString();\r\n }",
"public final static String normalizePath(String path) { \n return normalizePath( path, true);\n }",
"private String normalizePath(String path)\n {\n return path.replaceAll(\"\\\\\\\\{1,}\", \"/\");\n }",
"public static String localizePath(String path)\r\n {\r\n StringBuilder result = new StringBuilder();\r\n char nextChar;\r\n for(int i = 0; i < path.length(); i++)\r\n {\r\n nextChar = path.charAt(i);\r\n if((nextChar == '/') || (nextChar == '\\\\'))\r\n {\r\n // Convert the URI separator to the system dependent path separator\r\n result.append(File.separatorChar);\r\n }\r\n else\r\n {\r\n result.append(nextChar);\r\n }\r\n }\r\n \r\n return result.toString();\r\n }",
"protected StringBuilder convertPath(final String path) {\n\t\tStringBuilder pathBuffer = new StringBuilder(\"/app:company_home\");\n\t\tString[] parts = path.split(\"/\");\n\n\t\tString subpath;\n\n\t\tfor(String part : parts) {\n\t\t\tsubpath = part.trim();\n\n\t\t\tif(subpath.length() > 0) {\n\t\t\t\tpathBuffer.append(\"/cm:\").append(ISO9075.encode(subpath));\n\t\t\t}\n\t\t}\n\n\t\treturn pathBuffer;\n\t}",
"private String sanitizePath(String path)\r\n\t{\r\n\t\tif (path == null)\r\n\t\t\treturn \"\";\r\n\t\telse if (path.startsWith(\"/\"))\r\n\t\t\tpath = path.substring(1);\r\n\r\n\t\treturn path.endsWith(\"/\") ? path : path + \"/\";\r\n\t}",
"private static String normalizePathString(String path) {\n String noUnion = removePrefix(path, \"union:/\");\n // Remove scheme marker\n String noScheme = removeAndBefore(noUnion, \"//\");\n // Remove '%2370!' that forge has, example:\n // union:/C:/Users/natan/.gradle/caches/fabric-loom/1.17.1/net.fabricmc.yarn.1_17_1.1.17.1+build.61-v2-forge-1.17.1-37.0.69/forge-1.17.1-37.0.69-minecraft-mapped.jar%2371!\n // We use 'removeLastPercentSymbol' instead of removing everything after last occurrence of '%' so it works with spaces as well\n // (the last space will be 'deleted', but that doesn't matter for our purposes)\n String noPercent = removeLastPercentSymbol(noScheme);\n // Remove trailing '/' and '!'\n return removeSuffix(removeSuffix(noPercent, \"/\"), \"!\");\n }",
"String getRealPath(String path);",
"public static final String normalizePath(String path) {\n\t\t// Normalize the slashes and add leading slash if necessary\n\t\tString normalized = path;\n\t\tif (normalized.indexOf('\\\\') >= 0) {\n\t\t\tnormalized = normalized.replace('\\\\', '/');\n\t\t}\n\n\t\tif (!normalized.startsWith(\"/\")) {\n\t\t\tnormalized = \"/\" + normalized;\n\t\t}\n\n\t\t// Resolve occurrences of \"//\" in the normalized path\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"//\");\n\t\t\tif (index < 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnormalized = normalized.substring(0, index)\n\t\t\t\t\t+ normalized.substring(index + 1);\n\t\t}\n\n\t\t// Resolve occurrences of \"%20\" in the normalized path\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"%20\");\n\t\t\tif (index < 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnormalized = normalized.substring(0, index) + \" \"\n\t\t\t\t\t+ normalized.substring(index + 3);\n\t\t}\n\n\t\t// Resolve occurrences of \"/./\" in the normalized path\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"/./\");\n\t\t\tif (index < 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnormalized = normalized.substring(0, index)\n\t\t\t\t\t+ normalized.substring(index + 2);\n\t\t}\n\n\t\twhile (true) {\n\t\t\tint index = normalized.indexOf(\"/../\");\n\t\t\tif (index < 0)\n\t\t\t\tbreak;\n\t\t\tif (index == 0) {\n\t\t\t\treturn (null); // Trying to go outside our context\n\t\t\t}\n\t\t\tint index2 = normalized.lastIndexOf('/', index - 1);\n\t\t\tnormalized = normalized.substring(0, index2)\n\t\t\t\t\t+ normalized.substring(index + 3);\n\t\t}\n\n\t\t// Return the normalized path that we have completed\n\t\treturn (normalized);\n\t}",
"public void testCanonicalize() {\n \tassertEquals(\"//\", new Path(\"///////\").toString());\r\n \tassertEquals(\"/a/b/c\", new Path(\"/a/b//c\").toString());\r\n \tassertEquals(\"//a/b/c\", new Path(\"//a/b//c\").toString());\r\n \tassertEquals(\"a/b/c/\", new Path(\"a/b//c//\").toString());\r\n \r\n \t// Test collapsing single dots\r\n \tassertEquals(\"2.0\", \"/\", new Path(\"/./././.\").toString());\r\n \tassertEquals(\"2.1\", \"/a/b/c\", new Path(\"/a/./././b/c\").toString());\r\n \tassertEquals(\"2.2\", \"/a/b/c\", new Path(\"/a/./b/c/.\").toString());\r\n \tassertEquals(\"2.3\", \"a/b/c\", new Path(\"a/./b/./c\").toString());\r\n \r\n \t// Test collapsing double dots\r\n \tassertEquals(\"3.0\", \"/a/b\", new Path(\"/a/b/c/..\").toString());\r\n \tassertEquals(\"3.1\", \"/\", new Path(\"/a/./b/../..\").toString());\r\n }",
"public static String convertToWindowsPath(String path) {\n\t\treturn \"E:\" + path;\n\t}",
"public static String getNormalizedServerPath(final String serverPath) {\n ArgumentHelper.checkNotEmptyString(serverPath, \"serverPath\");\n if (isOneLevelMapping(serverPath)) {\n return serverPath.substring(0, serverPath.length() - 1).toLowerCase();\n }\n return serverPath.toLowerCase();\n }",
"public String normalizePathName( final String name );",
"private String getEclipsePathFromWindowsPath(String path) {\n StringBuilder sbPath = new StringBuilder();\n char [] chars = path.toCharArray();\n for (int i = 0; i < chars.length; i++) {\n char c = chars[i];\n if (c == '\\\\') {\n sbPath.append('/');\n } else {\n sbPath.append(c);\n }\n }\n path = sbPath.toString();\n return path;\n }",
"private String fixPath(String Path) {\n\n // Nothing to do if we're running the plugin on a Windows machine.\n if (Global.IsWindowsOS()) {\n return Path;\n }\n\n // Replace all of the Windows separator characters with linux separator characters.\n String NewPath = Path.replaceAll(\"\\\\\\\\\", File.separator);\n\n Log.getInstance().write(Log.LOGLEVEL_TRACE, \"RecordingEpisode.fixPath: \" + Path + \"->\" + NewPath);\n \n return NewPath;\n }",
"Uri encryptedPath();",
"private String normalizePath(String path) {\n boolean absolute = path.startsWith(\"/\");\n int cwdl = cwd.length();\n \n // NOTE: This isn't just a fast path, it handles cases the code below doesn't\n if(!path.startsWith(\".\") && path.indexOf(\"./\") == -1 && path.indexOf(\"//\") == -1 && !path.endsWith(\".\"))\n return absolute ? path.substring(1) : cwdl == 0 ? path : path.length() == 0 ? cwd : cwd + \"/\" + path;\n \n char[] in = new char[path.length()+1];\n char[] out = new char[in.length + (absolute ? -1 : cwd.length())];\n path.getChars(0,path.length(),in,0);\n int inp=0, outp=0;\n \n if(absolute) {\n do { inp++; } while(in[inp] == '/');\n } else if(cwdl != 0) {\n cwd.getChars(0,cwdl,out,0);\n outp = cwdl;\n }\n\n while(in[inp] != 0) {\n if(inp != 0) {\n while(in[inp] != 0 && in[inp] != '/') { out[outp++] = in[inp++]; }\n if(in[inp] == '\\0') break;\n while(in[inp] == '/') inp++;\n }\n \n // Just read a /\n if(in[inp] == '\\0') break;\n if(in[inp] != '.') { out[outp++] = '/'; out[outp++] = in[inp++]; continue; }\n // Just read a /.\n if(in[inp+1] == '\\0' || in[inp+1] == '/') { inp++; continue; }\n if(in[inp+1] == '.' && (in[inp+2] == '\\0' || in[inp+2] == '/')) { // ..\n // Just read a /..{$,/}\n inp += 2;\n if(outp > 0) outp--;\n while(outp > 0 && out[outp] != '/') outp--;\n //System.err.println(\"After ..: \" + new String(out,0,outp));\n continue;\n }\n // Just read a /.[^.] or /..[^/$]\n inp++;\n out[outp++] = '/';\n out[outp++] = '.';\n }\n if(outp > 0 && out[outp-1] == '/') outp--;\n //System.err.println(\"normalize: \" + path + \" -> \" + new String(out,0,outp) + \" (cwd: \" + cwd + \")\");\n int outStart = out[0] == '/' ? 1 : 0;\n return new String(out,outStart,outp - outStart);\n }",
"static String localPath(String name) {\n\t\tchar c = File.separatorChar;\n\t\treturn name.replace((char) (c ^ '/' ^ '\\\\'), c);\n\t}",
"private static String normalize(String pathString) {\n if (pathString.contains(\"//\") || pathString.indexOf('\\\\') >= 0) {\n pathString = pathString.replaceAll(\"[\\\\\\\\/]+\", \"/\");\n }\n\n // Strip leading './'\n if (pathString.startsWith(\"./\")) {\n pathString = pathString.substring(2);\n }\n\n // Strip trailing '/.', '/'\n if (pathString.endsWith(\"/.\")) {\n pathString = pathString.substring(0, pathString.length() - 2);\n } else if (pathString.endsWith(\"/\")) {\n pathString = pathString.substring(0, pathString.length() - 1);\n }\n\n return pathString;\n }",
"public String getEncodedPath() {\n return getEncodedPath(false);\n }",
"Uri decryptedPath();",
"public static IPath findExistingPathIfCaseSensitive(IPath path) {\r\n\t\t// PathUtils (shared with EDC) has the stock implementation \r\n\t\treturn PathUtils.findExistingPathIfCaseSensitive(path);\r\n\t}",
"public String simplifyPath(String path) {\n String resString=\"\";\n String[] steRes=path.split(\"/|\\\\.\");\n if (steRes.length==0)\n return \"/\";\n return '/'+steRes[steRes.length-1];\n }",
"public static String convertToLinuxPath(String path) {\n\t\t// just remove E: drive letter from path\n\t\treturn path.replaceFirst(\"E:\", \"\");\n\t}",
"private String cleanPath(String path) {\n if(path == null)\n return path;\n if(path.equals(\"\") || path.equals(\"/\"))\n return path;\n\n if(!path.startsWith(\"/\"))\n path = \"/\" + path;\n path = path.replaceAll(\"/+\", \"/\");\n if(path.endsWith(\"/\"))\n path = path.substring(0,path.length()-1);\n return path;\n }",
"@Override\n\t\tpublic String getRealPath(String path) {\n\t\t\treturn null;\n\t\t}",
"String getExternalPath(String path);",
"public static String convertPath(String path) {\n String clean = path.replaceAll(\"[^a-zA-Z0-9.-\\\\/]\", \"_\");\n String convert = clean.replace(\"\\\\\", \"/\");\n return convert;\n }",
"public String platformSpecificLocator(String ResLoc){\n\t\tif (httpServer.ThreadExecutor.getPlatform().equalsIgnoreCase(\"WIN32\"))\n\t\t\treturn ResLoc.replace(\"/\", \"\\\\\");\n\t\telse\n\t\t\treturn ResLoc;\n\t}",
"@Test\n public void testPathParsing_withAlternateSeparator() {\n PathService windowsPathService = PathServiceTest.fakeWindowsPathService();\n assertEquals(\n windowsPathService.parsePath(\"foo\\\\bar\\\\baz\"), windowsPathService.parsePath(\"foo/bar/baz\"));\n assertEquals(\n windowsPathService.parsePath(\"C:\\\\foo\\\\bar\"), windowsPathService.parsePath(\"C:\\\\foo/bar\"));\n assertEquals(\n windowsPathService.parsePath(\"c:\\\\foo\\\\bar\\\\baz\"),\n windowsPathService.parsePath(\"c:\", \"foo/\", \"bar/baz\"));\n }",
"public static IPath getCanonicalWorkspacePath(IPath wsPath) {\r\n\t\tIPath resolvedPath = new Path(\"\"); //$NON-NLS-1$\r\n\t\tIContainer container = ResourcesPlugin.getWorkspace().getRoot();\r\n\t\t// flag to consume the rest of the path without lookup\r\n\t\tboolean failed = false;\r\n\t\tfor (String segment : wsPath.segments()) {\r\n\t\t\tif (failed || container == null) {\r\n\t\t\t\tresolvedPath = resolvedPath.append(segment);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tIResource child = container.findMember(segment);\r\n\t\t\tif (child != null) {\r\n\t\t\t\t// found, so correct caps\r\n\t\t\t\tresolvedPath = resolvedPath.append(segment);\r\n\t\t\t\tif (child instanceof IContainer) {\r\n\t\t\t\t\tcontainer = (IContainer) child;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontainer = null;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// not found: manually search\r\n\t\t\t\tboolean found = false;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfor (IResource member : container.members()) {\r\n\t\t\t\t\t\tif (member.getName().equalsIgnoreCase(segment)) {\r\n\t\t\t\t\t\t\tresolvedPath = resolvedPath.append(member.getName());\r\n\t\t\t\t\t\t\tfound = true;\r\n\t\t\t\t\t\t\tif (member instanceof IContainer) {\r\n\t\t\t\t\t\t\t\tcontainer = (IContainer) member;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tcontainer = null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (CoreException e) {\r\n\t\t\t\t\t// just fail\r\n\t\t\t\t}\r\n\t\t\t\tif (!found) {\r\n\t\t\t\t\tfailed = true;\r\n\t\t\t\t\tresolvedPath = resolvedPath.append(segment);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn resolvedPath;\r\n\t}",
"public String getOriginalFileName() {\n if (originalFilePath==null) {\n return null;\n }\n // the path passed is in the client system's format,\n // so test all known path separator chars ('/', '\\' and \"::\" )\n // and pick the one which would create the smallest filename\n // Using Math is rather ugly but at least it is shorter and performs better\n // than Stringtokenizer, regexp, or sorting collections\n int last = Math.max(Math.max(\n originalFilePath.lastIndexOf(':'), // old mac path (::)\n originalFilePath.lastIndexOf('/')), // unix path\n originalFilePath.lastIndexOf('\\\\')); // windows path\n if (last > -1) {\n return originalFilePath.substring(last+1);\n }\n return originalFilePath;\n }",
"public static String unixPath(String path) {\n String convert = path.replace(\"\\\\\", \"/\");\n return convert;\n }",
"public static String convertWinFilePathToLinux(String inputFilePath) {\n\n\t\tif (inputFilePath == null) return null;\n\t\tif (inputFilePath.isEmpty()) return \"\";\n\n\t\t// Only convert file path if OS is NOT Windows\n\t\tif(!System.getProperty(\"os.name\").toLowerCase().contains(\"win\")) \n\t\t{\n\t\t\t// Only convert file path if OS is NOT Windows\n\t\t\tinputFilePath = inputFilePath.trim();\n\n\t\t\t// Only convert file path if it starts with \\\\\n\t\t\tif (!inputFilePath.startsWith(\"\\\\\\\\\")) return inputFilePath;\n\n\t\t\t// Remove leading \\\\ from inputFilePath\n\t\t\tinputFilePath = inputFilePath.substring(2);\n\n\t\t\t// Extract server name from inputFilePath\n\t\t\tString server_name = inputFilePath.substring(0,inputFilePath.indexOf(\"\\\\\"));\n\t\t\tinputFilePath = inputFilePath.substring(inputFilePath.indexOf(\"\\\\\")+1,inputFilePath.length());\n\t\t\tint index = server_name.indexOf(\".\");\n\t\t\tif (index > 0) {\n\t\t\t\tserver_name = server_name.substring(0,index);\n\t\t\t}\n\t\t\tserver_name = server_name.toLowerCase(); // all lower case in server name\n\n\t\t\t// Replace all \\ with /\n\t\t\tinputFilePath = inputFilePath.replace('\\\\', '/');\n\n\t\t\t// SPECIAL CASE: Remove \"gnem\" from thummper paths\n\t\t\tif (server_name.equals(\"thummper\") || server_name.equals(\"tonto2\")) {\n\t\t\t\tString gnem_string = inputFilePath.substring(0,inputFilePath.indexOf(\"/\"));\n\t\t\t\tif (gnem_string.equalsIgnoreCase(\"gnem\")) {\n\t\t\t\t\tinputFilePath = inputFilePath.substring(inputFilePath.indexOf(\"/\")+1,inputFilePath.length());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Prepend /nfs/ -- where all of our network shares are mounted\n\t\t\tinputFilePath = \"/nfs/\" + server_name + \"/\" + inputFilePath;\n\n\t\t\treturn inputFilePath;\n\n\n\t\t\t/* OLD\n // find index of third \"\\\" by finding first instance of \"\\\" after \n // skipping the first 2 characters (\"\\\\\")\n int thirdSlashIndex = inputFilePath.indexOf('\\\\', 2);\n\n // only convert if the first part of the string also contains \n // a \".\" character. This is necessary as this function may\n // get called more than once for the same string, and we only\n // want to modify it if the first portion contains\n // \"server.floobee.com or \"123.456.789.yyy\".\n if(inputFilePath.startsWith(\"\\\\\\\\\") && thirdSlashIndex >= 2\n && inputFilePath.substring(0,thirdSlashIndex).contains(\".\")){\n // create substring starting from the third slash \n // (this drops \"\\\\server\" from the string)\n inputFilePath = inputFilePath.substring(thirdSlashIndex);\n }\n\n // replace all \"\\\" with \"/\"\n inputFilePath = inputFilePath.replace('\\\\', '/'); \n\t\t\t */\n\t\t}\n\n\t\treturn inputFilePath; \n\t}",
"private static String toAbsPathStr(String relPath, FileSystem fs) {\n String retPath = \"\";\n Directory tmpDir = (Directory) fs.checkPath(relPath, \"directory\");\n while (!tmpDir.equals(fs.getRoot())) {\n retPath = \"/\" + tmpDir.getName() + retPath;\n tmpDir = tmpDir.getParentDirectory();\n }\n return retPath;\n }",
"@Override\n\tpublic String getRealPath(String path) {\n\t\treturn null;\n\t}",
"String fullpath(String path) {\n return fullpath(path, null);\n }",
"public void testEncodePath() throws Exception {\n\n Object[] test_values = {\n new String[]{\"abc def\", \"abc%20def\"},\n new String[]{\"foo/bar?n=v&N=V\", \"foo/bar%3Fn=v&N=V\"}\n };\n for (int i = 0; i < test_values.length; i++) {\n String tests[] = (String[]) test_values[i];\n String original = tests[0];\n String expected = tests[1];\n\n String result = NetUtils.encodePath(original);\n String message = \"Test \" +\n \" original \" + \"'\" + original + \"'\";\n assertEquals(message, expected, result);\n }\n }",
"private String toCompletePath(String fullRequest) {\n \n///Parse request for file path\nString requestLine[] = new String[] {\" \", \" \", \" \"};\n requestLine = fullRequest.split(\" \");\nString partialPath = requestLine[1];\n \n//If requested path is just \"/\" or \"\", don't return any path\n if(partialPath.length() <= 1) {\n noFileRequested = true;\n return null;\n }\n \nString completePath;\n//If using my Windows machine, the path is different than the school Linux machines\nif (Windows)\n completePath = \"C:/Users/Michelle/eclipse-workspace/P1\" + partialPath;\nelse\n completePath = \".\" + partialPath;\n \n return completePath;\n}",
"public final String getCanonicalPath()\n {\n return FileUtilities.getCanonicalPath(getLocalFile());\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tfor (String str : this) {\r\n\t\t\tif (sb.length() > 0) {\r\n\t\t\t\tsb.append(PATH_SEPARATOR);\r\n\t\t\t}\r\n\t\t\tsb.append(str);\r\n\t\t}\r\n\t\treturn sb.toString().toLowerCase();\r\n\t}",
"public String getAbsPath();",
"public String path(String path1, String path2);",
"public static void main(String[] args) {\n Path currentDir = Paths.get(\".\");\n System.out.println(currentDir.toAbsolutePath());\n Path parentDir = Paths.get(\"..\");\n System.out.println(parentDir.toAbsolutePath());\n Path currentDir2 = Paths.get(\"d:\\\\data\\\\projects\\\\.\\\\a-project\");\n System.out.println(currentDir2);\n String path = \"d:\\\\data\\\\projects\\\\a-project\\\\..\\\\another-project\";\n Path parentDir2 = Paths.get(path);\n System.out.println(parentDir2);\n\n String originalPath =\n \"d:\\\\data\\\\projects\\\\a-project\\\\..\\\\another-project\";\n\n Path path1 = Paths.get(originalPath);\n System.out.println(\"path1 = \" + path1);\n\n Path path2 = path1.normalize();\n System.out.println(\"path2 = \" + path2);\n }",
"@Test\n public void testRelativize_bothAbsolute() {\n assertRelativizedPathEquals(\"b/c\", pathService.parsePath(\"/a\"), \"/a/b/c\");\n assertRelativizedPathEquals(\"c/d\", pathService.parsePath(\"/a/b\"), \"/a/b/c/d\");\n }",
"public String resolvePath();",
"private static String windowsPathToRegex(String windowsPath)\n\t{\n\t\tif(windowsPath == null)\n\t\t\treturn null;\n\t\t\n\t\t// Escape special characters\n\t\tString regex = windowsPath.replaceAll(\"([\\\\\\\"\\\\+\\\\(\\\\)\\\\^\\\\$\\\\.\\\\{\\\\}\\\\[\\\\]\\\\|\\\\\\\\])\", \"\\\\\\\\$1\");\n\t\t\n\t\t// Replace wildcards\n\t\treturn regex.replace(\"*\", \".*\").replace(\"?\", \".\");\n\t}",
"private String getHttpPath(String httpPath) {\n if(httpPath == null || httpPath.equals(\"\")) {\n httpPath = \"/*\";\n }\n else {\n if(!httpPath.startsWith(\"/\")) {\n httpPath = \"/\" + httpPath;\n }\n if(httpPath.endsWith(\"/\")) {\n httpPath = httpPath + \"*\";\n }\n if(!httpPath.endsWith(\"/*\")) {\n httpPath = httpPath + \"/*\";\n }\n }\n return httpPath;\n }",
"public static byte[] preparePath(final byte[] path) {\n String p = MetaData.normPath(string(path));\n if(Strings.endsWith(p, '/')) p = p.substring(0, p.length() - 1);\n return concat(SLASH, token(p));\n }",
"public final static String normalizePath(String path, boolean caseSensitive) {\t\n\t\t\n\t // Check if the file state names should be case sensitive, if not then just uppercase the whole\n\t // path\n\t \n String normPath = path;\n \n\t if ( caseSensitive == true) {\n\t \n \t\t//\tSplit the path into directories and file name, only uppercase the directories to normalize\n \t\t//\tthe path.\n \n \t\tif ( path.length() > 3) {\n \t\t\t\n \t\t\t//\tSplit the path to seperate the folders/file name\n \t\t\t\n \t\t\tint pos = path.lastIndexOf(FileName.DOS_SEPERATOR);\n \t\t\tif ( pos != -1) {\n \t\t\t\t\n \t\t\t\t//\tGet the path and file name parts, normalize the path\n \t\t\t\t\n \t\t\t\tString pathPart = path.substring(0, pos).toUpperCase();\n \t\t\t\tString namePart = path.substring(pos);\n \t\t\t\t\n \t\t\t\t//\tRebuild the path string\n \t\t\t\t\n \t\t\t\tnormPath = pathPart + namePart;\n \t\t\t}\n \t\t}\n\t }\n\t else {\n\n\t // Uppercase the whole path\n\t \n\t normPath = path.toUpperCase();\n\t }\n\t \n\t\t//\tReturn the normalized path\n\t\t\n\t\treturn normPath;\n\t}",
"private static String getCanonicalizedResourceName(Reference resourceRef) {\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(resourceRef.getPath());\r\n \r\n Form query = resourceRef.getQueryAsForm();\r\n if (query.getFirst(\"acl\", true) != null) {\r\n sb.append(\"?acl\");\r\n } else if (query.getFirst(\"torrent\", true) != null) {\r\n sb.append(\"?torrent\");\r\n }\r\n \r\n return sb.toString();\r\n }",
"public String simplifyPath2(String path) {\n\t\tString[] strs = path.split(\"/\");\n\t\tLinkedList<String> l = new LinkedList<String>();\n\n\t\tfor (String s : strs) {\n\t\t\tif (s.equals(\"..\")) {\n\t\t\t\tif (!l.isEmpty())\n\t\t\t\t\tl.removeLast();\n\t\t\t} else if (s.equals(\"\") || s.equals(\".\"))\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\tl.addLast(s);\n\n\t\t}\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (String s : l) {\n\t\t\tsb.append('/');\n\t\t\tsb.append(s);\n\t\t}\n\t\tif (l.size() == 0)\n\t\t\tsb.append('/');\n\t\treturn sb.toString();\n\t}",
"private static boolean isIgnorePath(String aPath)\n {\n if (aPath.startsWith(\"/sun\")) return true;\n if (aPath.startsWith(\"/apple\")) return true;\n if (aPath.startsWith(\"/com/sun\")) return true;\n if (aPath.startsWith(\"/com/apple\")) return true;\n if (aPath.startsWith(\"/com/oracle\")) return true;\n if (aPath.startsWith(\"/java/applet\")) return true;\n if (aPath.startsWith(\"/java/awt/dnd\")) return true;\n if (aPath.startsWith(\"/java/awt/im\")) return true;\n if (aPath.startsWith(\"/java/awt/peer\")) return true;\n if (aPath.startsWith(\"/java/beans\")) return true;\n if (aPath.startsWith(\"/java/lang/model\")) return true;\n if (aPath.startsWith(\"/java/nio/channels\")) return true;\n if (aPath.startsWith(\"/java/security\")) return true;\n if (aPath.startsWith(\"/java/util/concurrent\")) return true;\n if (aPath.startsWith(\"/java/util/Spliterators\")) return true;\n if (aPath.startsWith(\"/javax/crypto\")) return true;\n if (aPath.startsWith(\"/javax/net\")) return true;\n if (aPath.startsWith(\"/javax/security\")) return true;\n if (aPath.startsWith(\"/javax/accessibility\")) return true;\n if (aPath.startsWith(\"/javax/imageio\")) return true;\n if (aPath.startsWith(\"/javax/print\")) return true;\n if (aPath.startsWith(\"/javax/sound\")) return true;\n if (aPath.startsWith(\"/javax/swing/b\")) return true;\n if (aPath.startsWith(\"/javax/swing/colorchooser\")) return true;\n if (aPath.startsWith(\"/javax/swing/event\")) return true;\n if (aPath.startsWith(\"/javax/swing/filechooser\")) return true;\n if (aPath.startsWith(\"/javax/swing/plaf\")) return true;\n if (aPath.startsWith(\"/javax/swing/text\")) return true;\n if (aPath.startsWith(\"/javax/swing/tree\")) return true;\n if (aPath.startsWith(\"/javax/swing/undo\")) return true;\n if (aPath.startsWith(\"/jdk\")) return true;\n if (aPath.startsWith(\"/org/omg\")) return true;\n if (aPath.startsWith(\"/org/w3c\")) return true;\n if (aPath.startsWith(\"/META-INF\")) return true;\n\n // If inner class, return false\n if (aPath.contains(\"$\"))\n return true;\n\n // Return true\n return false;\n }",
"static String escapePathName(String path) {\n if (path == null || path.length() == 0) {\n throw new RuntimeException(\"Path should not be null or empty: \" + path);\n }\n\n StringBuilder sb = null;\n for (int i = 0; i < path.length(); i++) {\n char c = path.charAt(i);\n if (needsEscaping(c)) {\n if (sb == null) {\n sb = new StringBuilder(path.length() + 2);\n for (int j = 0; j < i; j++) {\n sb.append(path.charAt(j));\n }\n }\n escapeChar(c, sb);\n } else if (sb != null) {\n sb.append(c);\n }\n }\n if (sb == null) {\n return path;\n }\n return sb.toString();\n }",
"public String getAbsoluteApplicationPath()\r\n {\r\n String res = null;\r\n\r\n if (_windows)\r\n {\r\n RegQuery r = new RegQuery();\r\n res = r.getAbsoluteApplicationPath(_execName);\r\n if (res != null)\r\n {\r\n return res;\r\n }\r\n String progFiles = System.getenv(\"ProgramFiles\");\r\n String dirs[] = { \"\\\\Mozilla\\\\ Firefox\\\\\", \"\\\\Mozilla\", \"\\\\Firefox\", \"\\\\SeaMonkey\",\r\n \"\\\\mozilla.org\\\\SeaMonkey\" };\r\n\r\n for (int i = 0; i < dirs.length; i++)\r\n {\r\n File f = new File(progFiles + dirs[i]);\r\n if (f.exists())\r\n {\r\n return progFiles + dirs[i];\r\n }\r\n }\r\n }\r\n\r\n else if (_linux)\r\n {\r\n try\r\n {\r\n File f;\r\n Properties env = new Properties();\r\n env.load(Runtime.getRuntime().exec(\"env\").getInputStream());\r\n String userPath = (String) env.get(\"PATH\");\r\n String[] pathDirs = userPath.split(\":\");\r\n\r\n for (int i = 0; i < pathDirs.length; i++)\r\n {\r\n f = new File(pathDirs[i] + File.separator + _execName);\r\n\r\n if (f.exists())\r\n {\r\n return f.getCanonicalPath().substring(0,\r\n f.getCanonicalPath().length() - _execName.length());\r\n }\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n return res;\r\n }",
"protected String path(final FileName vfsFileName) {\n return FilenameUtils.normalize(vfsFileName.getPath());\n }",
"private String transformPath(String pathStr, String pathPrefix) {\n String result = pathStr;\n if (DEBUG) {\n System.out.println(\" IN pathStr : \" + result);\n }\n Matcher m;\n for (int i = 0; i < LdmlConvertRules.PATH_TRANSFORMATIONS.length; i++) {\n m = LdmlConvertRules.PATH_TRANSFORMATIONS[i].pattern.matcher(pathStr);\n if (m.matches()) {\n result = m.replaceFirst(LdmlConvertRules.PATH_TRANSFORMATIONS[i].replacement);\n break;\n }\n }\n result = result.replaceFirst(\"/ldml/\", pathPrefix);\n result = result.replaceFirst(\"/supplementalData/\", pathPrefix);\n\n if (DEBUG) {\n System.out.println(\"OUT pathStr : \" + result);\n }\n return result;\n }",
"public static String formatPath(ServletContext context, Document dom, String application, Hashtable hash, String pathSrc, char separator) throws IOException {\n String ret = null;\r\n try\r\n {\r\n String listPathSrc[] = UtilString.split(pathSrc, separator);\r\n int len = UtilSafe.safeListSize(listPathSrc);\r\n // Trace.DEBUG(getInstance(), (new StringBuilder(\"formatPath listPathSrc:\")).append(listPathSrc).append(\" len:\").append(len).toString());\r\n if(len > 0)\r\n {\r\n File filePath = null;\r\n String path = null;\r\n int iDeb = 0;\r\n int iFin = 0;\r\n int iPos = 0;\r\n StringBuffer stb = new StringBuffer();\r\n for(int i = 0; i < len; i++)\r\n {\r\n path = (String)UtilSafe.safeListGetElementAt(listPathSrc, i);\r\n for(iPos = 0; iPos >= 0; iPos = iFin)\r\n {\r\n iDeb = path.indexOf('[', 0);\r\n iFin = path.indexOf(']', iDeb);\r\n // Trace.DEBUG(getInstance(), (new StringBuilder(\"formatPath path:\")).append(path).append(\" iPos:\").append(iPos).append(\" iDeb:\").append(iDeb).append(\" iFin:\").append(iFin).toString());\r\n if(iDeb >= 0 && iFin >= 0)\r\n {\r\n String szApplication = path.substring(iDeb + 1, iFin);\r\n String filePathMain = (String)hash.get(szApplication);\r\n if(filePathMain == null)\r\n if(context == null)\r\n filePathMain = AdpXmlApplication.getPathMain(dom, szApplication);\r\n else\r\n filePathMain = AdpXmlApplication.getFormatedPathMain(context, dom, szApplication);\r\n // Trace.DEBUG(getInstance(), (new StringBuilder(\"formatPath szApplication:\")).append(szApplication).append(\" filePathMain:\").append(filePathMain).toString());\r\n if(UtilString.isNotEmpty(filePathMain))\r\n {\r\n // Trace.DEBUG(getInstance(), (new StringBuilder(\"formatPath filePathMain isNotEmpty:\")).append(filePathMain).toString());\r\n hash.put(szApplication, filePathMain);\r\n if(!filePathMain.toUpperCase().startsWith(\"FTP://\"))\r\n {\r\n path = (new StringBuffer(path)).replace(iDeb, iFin + 1, filePathMain).toString();\r\n path = path.replace(File.separatorChar != '\\\\' ? '\\\\' : '/', File.separatorChar);\r\n } else\r\n {\r\n path = filePath.getCanonicalPath();\r\n }\r\n }\r\n } else\r\n if(UtilString.isNotEmpty(application) && !UtilFile.isPathAbsolute(path))\r\n {\r\n // Trace.DEBUG(getInstance(), (new StringBuilder(\"formatPath application isNotEmpty:\")).append(application).toString());\r\n String filePathApp = null;\r\n if(context == null)\r\n filePathApp = AdpXmlApplication.getPathMain(dom, application);\r\n else\r\n filePathApp = AdpXmlApplication.getFormatedPathMain(context, dom, application);\r\n path = (new File(filePathApp, path)).getCanonicalPath();\r\n }\r\n // Trace.DEBUG(getInstance(), (new StringBuilder(\"formatPath path:\")).append(path).toString());\r\n }\r\n\r\n if(stb.length() > 0)\r\n stb.append(\";\");\r\n stb.append(path);\r\n }\r\n\r\n ret = stb.toString();\r\n }\r\n }\r\n catch(Exception ex)\r\n {\r\n Trace.ERROR(ex);\r\n }\r\n return ret;\r\n }",
"public static String decodePath(String href) {\r\n\t\t// For IPv6\r\n\t\thref = href.replace(\"[\", \"%5B\").replace(\"]\", \"%5D\");\r\n\r\n\t\t// Seems that some client apps send spaces.. maybe..\r\n\t\thref = href.replace(\" \", \"%20\");\r\n\t\ttry {\r\n\t\t\tif (href.startsWith(\"/\")) {\r\n\t\t\t\tURI uri = new URI(\"http://anything.com\" + href);\r\n\t\t\t\treturn uri.getPath();\r\n\t\t\t} else {\r\n\t\t\t\tURI uri = new URI(\"http://anything.com/\" + href);\r\n\t\t\t\tString s = uri.getPath();\r\n\t\t\t\treturn s.substring(1);\r\n\t\t\t}\r\n\t\t} catch (URISyntaxException ex) {\r\n\t\t\tthrow new RuntimeException(ex);\r\n\t\t}\r\n\t}",
"public static String computeNavPath(String path) {\n String result = path;\n if (path.endsWith(SUFFIXE_PROXY)) {\n result = result.substring(0, result.length() - SUFFIXE_PROXY.length());\n }\n return result;\n }",
"String resolvePath(String root_url, Enumeration path)\n {\n if (! root_url.endsWith(URL_PATH_SEPARATOR))\n root_url = root_url+URL_PATH_SEPARATOR;\n\n StringBuffer sb = new StringBuffer();\n while (path.hasMoreElements())\n {\n sb.append(path.nextElement());\n sb.append(URL_PATH_SEPARATOR);\n }\n String p = sb.toString();\n if (p.startsWith(URL_PATH_SEPARATOR))\n p = p.substring(1);\n\n return root_url + p;\n }",
"public String getIdenticalPath() {\n return ipath;\n }",
"private boolean comparePathAttribute(String value, List<String> includePaths) {\n\t\treturn false;\r\n\t}",
"public static String getPath(String file_path)\n {\n String file_separator = System.getProperty(\"file.separator\"); //Bug Id 81741\n if (file_path == null)\n return null;\n else if (file_path.substring(file_path.length() - 1).equals(file_separator))//Bug Id 81741, substitute file_separator to System.getProperty(\"file.separator\")\n return file_path;\n else\n {\n \t //Bug Id 81741, Start \n\t if (\"/\".equals(file_separator) && (file_path.indexOf(file_separator) == -1))\n\t {\n\t file_path = file_path.replaceAll(\"\\\\\\\\\", \"/\");\n\t return ((new File(file_path)).getParent()).replaceAll(\"/\",\"\\\\\\\\\");\n\t }\n\t //Bug Id 81741, End\n\t else\n return (new File(file_path)).getParent();\n }\n }",
"public static void main(String... args) {\nPath path = Paths.get(\".\");\ntry {\n out.println(path.normalize());\n} catch(IOException e){out.println(e);}\n\ntry {\n out.println(path.toRealPath());\n} catch(IOException e){out.println(e);}\n\n}",
"private static String normalizeUrlPath(String baseUrl) {\n if (!baseUrl.matches(\".*/$\")) {\n return baseUrl + \"/\";\n }\n return baseUrl;\n }",
"public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }",
"private String entryName(String name) {\n name = name.replace(File.separatorChar, '/');\n String matchPath = \"\";\n /* Need to add code to consolidate paths\n for (String path : paths) {\n if (name.startsWith(path)\n && (path.length() > matchPath.length())) {\n matchPath = path;\n }\n }\n */\n name = name.substring(matchPath.length());\n \n if (name.startsWith(\"/\")) {\n name = name.substring(1);\n } else if (name.startsWith(\"./\")) {\n name = name.substring(2);\n }\n return name;\n }",
"private String translateCodebase() {\n if(codebase==null)\n return(codebase);\n if(System.getProperty(\"os.name\").startsWith(\"Win\") && codebase.startsWith(\"file://\")) {\n codebase = \"file:/\"+codebase.substring(7);\n }\n return(codebase);\n }",
"public Location getNeighbouringPath(String enteredPath) {\r\n\t\t\treturn this.getPlayer().getCurrentLocation().getPaths().get(enteredPath);\r\n\t\t}",
"public static String decodePath(String href) {\r\n // For IPv6\r\n href = href.replace(\"[\", \"%5B\").replace(\"]\", \"%5D\");\r\n\r\n // Seems that some client apps send spaces.. maybe..\r\n href = href.replace(\" \", \"%20\");\r\n // ok, this is milton's bad. Older versions don't encode curly braces\r\n href = href.replace(\"{\", \"%7B\").replace(\"}\", \"%7D\");\r\n try {\r\n if (href.startsWith(\"/\")) {\r\n URI uri = new URI(\"http://anything.com\" + href);\r\n return uri.getPath();\r\n } else {\r\n URI uri = new URI(\"http://anything.com/\" + href);\r\n String s = uri.getPath();\r\n return s.substring(1);\r\n }\r\n } catch (URISyntaxException ex) {\r\n throw new RuntimeException(ex);\r\n }\r\n }",
"private String normalizeHostName(String host) {\n if (host == null || host.length() == 0) {\n host = AddressUtils.getHostToAdvertise();\n } else {\n if (URLUtil.hasScheme(host)) {\n host = URLUtil.removeScheme(host);\n }\n }\n\n return host;\n }",
"static Path absolute(final Path path) {\n return path.toAbsolutePath().normalize();\n }",
"public String getAbsoluteEncryptedPath(final String path) {\n return GDFileSystem.getAbsoluteEncryptedPath(path);\n }",
"public String getShortenedPath(String ruleFilePath) {\n String[] splitFilePath = ruleFilePath.split(\"/\");\n String str = \"\";\n if (splitFilePath.length > 2) {\n int index = splitFilePath.length - 2;\n for (int i = index; i < splitFilePath.length; i++) {\n str += \"/\" + splitFilePath[i];\n }\n System.out.println(\"Using shortened file path.\");\n return str;\n } else {\n System.out.println(\"Using full file path.\");\n return ruleFilePath;\n } \n }",
"public abstract String getPath(boolean urlEncode, boolean includeOwner) throws\n\t\t\tUnsupportedEncodingException;",
"private String relativize(String p) {\n return Paths.get(\"\").toAbsolutePath().relativize(Paths.get(p).toAbsolutePath()).toString();\n }",
"private static Path speculativeFastParsePath(String path) {\n String s = ConfigImplUtil.unicodeTrim(path);\n if (s.isEmpty())\n return null;\n if (hasUnsafeChars(s))\n return null;\n if (s.startsWith(\".\") || s.endsWith(\".\") || s.contains(\"..\"))\n return null; // let the full parser throw the error\n\n PathBuilder pb = new PathBuilder();\n appendPathString(pb, s);\n return pb.result();\n }",
"public String simplifyPath(String path) {\n String[] s = path.split(\"/\");\n StringBuilder sb = new StringBuilder(\"/\");\n for(String S:s){\n if(S.equals(\"\")||S.equals(\".\")){\n continue;\n }\n else if(S.equals(\"..\")){\n if(sb.charAt(sb.length()-1) != '/')\n {\n sb.deleteCharAt(sb.length()-1);\n }\n else{\n sb.delete(sb.length()-2, sb.length()-1);\n }\n\n }\n else{\n sb.append(S);\n sb.append('/');\n }\n }\n sb.deleteCharAt(sb.length()-1);\n return sb.toString();\n }",
"public String getEncodedSearchPagePath() {\r\n \treturn getEncodedPagePath(this.searchPagePath);\r\n }",
"private String convertModuleNameToCachePathConvention(String moduleName) {\n String upperCaseSign = \"!\";\n for (int i = 0; i < moduleName.length(); i++) {\n if (isUpperCase(moduleName.charAt(i))) {\n moduleName = moduleName.replace(moduleName.substring(i, i + 1), upperCaseSign + toLowerCase(moduleName.charAt(i)));\n i += upperCaseSign.length();\n }\n }\n return moduleName;\n }",
"public static String sActivePath() \r\n\t{\r\n\t\tString activePath = null;\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tactivePath = new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn activePath;\r\n\t}",
"public static final String canon(String filename) {\n if (filename == null || filename.length() == 0)\n return \"\";\n if (filename.startsWith(jarPrefix())) {\n char sep = File.separatorChar, other = (sep == '/' ? '\\\\' : '/');\n return filename.replace(other, sep);\n }\n File file = new File(filename);\n try {\n return file.getCanonicalPath();\n } catch (IOException ex) {\n return file.getAbsolutePath();\n }\n }",
"public abstract String getFullPath();",
"public String getPathName() {\n if (pathName == null) {\n if (isWindows()) {\n for (String key : getEnv().keySet()) {\n if (key.toLowerCase(Locale.getDefault()).equals(\"path\")) { // NOI18N\n pathName = key.substring(0, 4);\n return pathName;\n }\n }\n }\n pathName = \"PATH\"; // NOI18N\n }\n return pathName;\n }",
"public String getPathName()\n \t{\n \t\tif ( arcname!=null )\n \t\t\treturn arcname + ARC_SEPARATOR + pathname;\n \t\treturn pathname;\n \t}",
"public static String getAbsoluteWorkspacePath(\r\n \t\t\tString resourcePathInWorkspace, VpePageContext pageContext) {\r\n \r\n \t\tString resolvedValue = resourcePathInWorkspace\r\n \t\t\t\t.replaceFirst(\r\n \t\t\t\t\t\t\"^\\\\s*(\\\\#|\\\\$)\\\\{facesContext.externalContext.requestContextPath\\\\}\", Constants.EMPTY); //$NON-NLS-1$\r\n \r\n\t\tIFile baseFile = null;\r\n \t\tif (pageContext.getVisualBuilder().getCurrentIncludeInfo() != null\r\n \t\t\t\t&&(pageContext.getVisualBuilder().getCurrentIncludeInfo().getStorage() instanceof IFile)) {\r\n\t\t\tbaseFile = (IFile) pageContext.getVisualBuilder().getCurrentIncludeInfo()\r\n \t\t\t\t\t.getStorage();\r\n \t\t}\r\n\t\tif (baseFile == null)\r\n \t\t\treturn resolvedValue;\r\n \r\n\t\tresolvedValue = ElServiceUtil.replaceEl(baseFile, resolvedValue);\r\n \r\n \t\tURI uri = null;\r\n \t\ttry {\r\n \t\t\turi = new URI(resolvedValue);\r\n \t\t} catch (URISyntaxException e) {\r\n \t\t}\r\n \r\n \t\tif ((uri != null)\r\n \t\t\t\t&& (uri.isAbsolute() || (new File(resolvedValue)).exists()))\r\n \t\t\treturn resolvedValue;\r\n \r\n\t\t\r\n\t\t\r\n\t\tIFile resolvedFile = FileUtil.getFile(resolvedValue, baseFile);\r\n\t\tif (resolvedFile != null ) {\r\n\t\t\treturn Constants.FILE_PREFIX + resolvedFile.getLocation().toPortableString();\r\n\t\t} else {\r\n\t\t\treturn resolvedValue;\r\n\t\t}\r\n \t}",
"private String checkPath(String pathToCheck, String extention) {\r\n\t\tString[] tokens = null;\r\n\t\tStringBuilder retval = new StringBuilder();\r\n\r\n\t\t// ako primljena eksenzija ima tocku na pocetku ona se brise\r\n\t\tif (extention.substring(0, 1).equals(\".\")) {\r\n\t\t\textention = extention.substring(1);\r\n\t\t}\r\n\r\n\t\t// ako je primljena \"ekstenzija\" all documents path se ne mijenja\r\n\t\tif (extention.equals(\"all\")) {\r\n\t\t\treturn pathToCheck;\r\n\t\t} else {\r\n\r\n\t\t\ttokens = pathToCheck.split(\"\\\\.\");\r\n\r\n\t\t\tif (tokens == null) {\r\n\t\t\t\treturn pathToCheck + \".\" + extention;\r\n\t\t\t} else {\r\n\t\t\t\t// ako primljeni path zavrsava sa dobrom ekstenzijom nista se ne\r\n\t\t\t\t// dodaje\r\n\t\t\t\tif (tokens[tokens.length - 1].equals(extention)) {\r\n\t\t\t\t\treturn pathToCheck;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// u suprotnome na primljeni path se ljepi ekstenzija\r\n\t\t\t\t\tfor (String token : tokens) {\r\n\t\t\t\t\t\tretval.append(token + \".\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn (retval.append(extention).toString());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}",
"private static String cleanServerAddress(String dirtyServerAddress){\n\t\tif (dirtyServerAddress.contains(\":\")){\n\t\t\tdirtyServerAddress = dirtyServerAddress.substring(0, dirtyServerAddress.indexOf(':'));\n\t\t}\n\t\tif (dirtyServerAddress.contains(\"/\")){\n\t\t\tdirtyServerAddress = dirtyServerAddress.substring(0, dirtyServerAddress.indexOf('/'));\n\t\t}\n\t\treturn(dirtyServerAddress);\n\t}",
"public static String cleanPath(String path) {\n \tString clean = path;\n\t\tclean.replaceAll(\"(\\\\$|\\\\+|\\\\#|\\\\%|\\\\&|\\\\{|\\\\}|\\\\\\\\|\\\\<|\\\\>|\\\\*|\\\\?|\\\\/|\\\\$|\\\\!|\\\\'|\\\\\\\"|\\\\:|\\\\@|\\\\+|\\\\`|\\\\||\\\\=)*\", \"\");\n\t\tclean.replaceAll(\"( )*\", \"\");\n\t\tclean.replace(\"\\\\\", \"/\");\n\t\treturn clean;\n\t}",
"public static String normalisePath(String pathName) {\n if (pathName.startsWith(\"'\") || pathName.endsWith(\"'\"))\n return new SimpleDateFormat(pathName).format(new Date());\n return pathName;\n }",
"public String getAvailablePath() {\n String path = getPath();\n if (isCut()) {\n path = getCutPath();\n }\n if (isCompressed()) {\n path = getCompressPath();\n }\n if (isToSandboxPath()) {\n path = getSandboxPath();\n }\n if (isOriginal()) {\n path = getOriginalPath();\n }\n if (isWatermarkPath()) {\n path = getWatermarkPath();\n }\n return path;\n }",
"protected String transformAttributePath(AttributePath attributePath) {\n\t\treturn attributePath.getProperty();\n\t}",
"static String getBrowserPath()\n \t{\n \t\tint os = PropertiesAndDirectories.os();\n \t\tString result = browserPath;\n \t\tif (result == null)\n \t\t{\n \t\t\tswitch (os)\n \t\t\t{\n \t\t\tcase PropertiesAndDirectories.XP:\n \t\t\tcase PropertiesAndDirectories.VISTA_AND_7:\n \t\t\t\tif (!Pref.lookupBoolean(\"navigate_with_ie\"))\n \t\t\t\t\tresult = FIREFOX_PATH_WINDOWS;\n \t\t\t\tif (result != null)\n \t\t\t\t{\n \t\t\t\t\tFile existentialTester = new File(result);\n \t\t\t\t\tif (!existentialTester.exists())\n \t\t\t\t\t{\n \t\t\t\t\t\tresult = FIREFOX_PATH_WINDOWS_64;\n \t\t\t\t\t\texistentialTester = new File(result);\n \t\t\t\t\t\tif (!existentialTester.exists())\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tresult = IE_PATH_WINDOWS;\n \t\t\t\t\t\t\texistentialTester = new File(result);\n \t\t\t\t\t\t\tif (!existentialTester.exists())\n \t\t\t\t\t\t\t\tresult = null;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\tcase PropertiesAndDirectories.MAC:\n \t\t\t\tresult = \"/usr/bin/open\";\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\terror(PropertiesAndDirectories.getOsName(), \"go(ParsedURL) not supported\");\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\tif (result != null)\n \t\t\t{\n \t\t\t\tbrowserPath = result;\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}",
"public void testAbsolutize() throws Exception {\n\n Object[] test_values = {\n new String[]{\"/base/path\", \"foo.bar\", \"/base/path/foo.bar\"},\n new String[]{\"/base/path/\", \"foo.bar\", \"/base/path/foo.bar\"},\n new String[]{\"/base/path\", \"/foo.bar\", \"/foo.bar\"},\n \n new String[]{\"/base/path\", \"\", \"/base/path\"},\n new String[]{\"/base/path\", null, \"/base/path\"},\n \n new String[]{\"\", \"foo.bar\", \"foo.bar\"},\n new String[]{null, \"foo.bar\", \"foo.bar\"},\n };\n \n for (int i = 0; i < test_values.length; i++) {\n String tests[] = (String[]) test_values[i];\n String test_path = tests[0];\n String test_rel_resource = tests[1];\n String expected = tests[2];\n\n String result = NetUtils.absolutize(test_path, test_rel_resource);\n String message = \"Test \" +\n \" path \" + \"'\" + test_path + \"'\" +\n \" relativeResource \" + \"'\" + test_rel_resource;\n assertEquals(message, expected, result);\n }\n }",
"@Test\n public void testMakeAbsolute() {\n System.out.println(\"makeAbsolute\");\n Setting sr = Setting.factory(\"relative\", Setting.SETTING_TYPE.TPATH, Paths.get(\"relPath\"));\n Setting sh = Setting.factory(\"home\", Setting.SETTING_TYPE.THOMEDIR, Paths.get(\"c:\\\\\"));\n final Object sro = sr.getValue();\n assert (sro instanceof Path);\n final Object sho = sh.getValue();\n assert (sho instanceof Path);\n\n Path srp = (Path) sro;\n Path shp = (Path) sho;\n\n String srps = srp.toString();\n String shps = shp.toString();\n assertEquals(\"relPath\", srps);\n assertEquals(\"c:\\\\\", shps);\n\n Path expResult = Paths.get(\"c:\\\\\", \"relPath\");\n Path result = Setting.makeAbsolute(srp);\n assertEquals(expResult, result);\n\n }",
"default String normalizeKey(String key) {\r\n\t\treturn key.intern();\r\n\t}",
"@Override\n public Optional<File> getRemappedBinary(String path) {\n if (!SystemInfo.isMac || path.indexOf(File.separatorChar) >= 0) {\n return Optional.empty();\n }\n String shellPath = EnvironmentUtil.getValue(\"PATH\");\n return Optional.ofNullable(\n PathEnvironmentVariableUtil.findInPath(path, shellPath, /* filter= */ null));\n }",
"public static String getPath() {\n\t\t// Lấy đường dẫn link\n\t\tAuthentication auth1 = SecurityContextHolder.getContext().getAuthentication();\n\t\tAgentconnection cus = (Agentconnection) auth1.getPrincipal();\n\t\t \n\t\t//String PATH_STRING_REAL = fileStorageProperties.getUploadDir()+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t String PATH_STRING_REAL = \"E:/ezcloud/upload/\"+cus.getMerchant()+\"/hotel/images/\" + year + \"/\" + month + \"/\" ;\n\t return PATH_STRING_REAL;\n\t}",
"@Override\r\n public String getPathDecoded() throws FileSystemException {\r\n if (decodedAbsPath == null) {\r\n decodedAbsPath = UriParser.decode(getPath());\r\n }\r\n\r\n return decodedAbsPath;\r\n }"
] |
[
"0.6170662",
"0.61029136",
"0.6098539",
"0.5993218",
"0.5901969",
"0.58841103",
"0.5865367",
"0.586382",
"0.58561134",
"0.58192563",
"0.5732853",
"0.56733763",
"0.55830747",
"0.5513746",
"0.5463356",
"0.5427311",
"0.5402575",
"0.53821677",
"0.53604007",
"0.53507674",
"0.5339079",
"0.5289784",
"0.5279634",
"0.52565694",
"0.5228931",
"0.52241707",
"0.5221509",
"0.52035517",
"0.5131917",
"0.51314694",
"0.51177853",
"0.51123726",
"0.51099896",
"0.50998217",
"0.5086695",
"0.50230205",
"0.5020823",
"0.5019792",
"0.5003409",
"0.4984554",
"0.49821022",
"0.49680147",
"0.4954111",
"0.4938686",
"0.4932672",
"0.49322757",
"0.4915755",
"0.4913463",
"0.4900301",
"0.489472",
"0.4894096",
"0.48903644",
"0.48769945",
"0.48746872",
"0.48453885",
"0.48416406",
"0.48358065",
"0.4825268",
"0.4812739",
"0.48107487",
"0.48034662",
"0.47963172",
"0.4795249",
"0.47941983",
"0.4787292",
"0.47545725",
"0.47434503",
"0.47331333",
"0.47317213",
"0.47227508",
"0.47180107",
"0.47167093",
"0.4713376",
"0.47013995",
"0.46987763",
"0.46893108",
"0.46857664",
"0.46670818",
"0.46641457",
"0.46449524",
"0.4641061",
"0.4637894",
"0.4623592",
"0.46208456",
"0.46183452",
"0.46155554",
"0.46093386",
"0.46034634",
"0.46032077",
"0.46001354",
"0.45973313",
"0.45711043",
"0.45606095",
"0.45593986",
"0.45358267",
"0.45350993",
"0.45311055",
"0.45266864",
"0.45122573",
"0.45095143"
] |
0.5693769
|
11
|
Get the file extension from path, guaranteed not to return null
|
public static String getSafeFileExtension(IPath path) {
String fileExtension = ""; //$NON-NLS-1$
if (path != null) {
String temp = path.getFileExtension();
if (temp != null)
fileExtension = temp;
}
return fileExtension;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String getExtension() {\r\n\t\t\tfinal String filename = path.getName();\r\n\t\t\tfinal int dotIndex = filename.lastIndexOf('.');\r\n\t\t\tif (dotIndex >= 0) {\r\n\t\t\t\tif (dotIndex == filename.length() - 1) {\r\n\t\t\t\t\treturn \"\"; // dot is the last char in filename\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn filename.substring(dotIndex + 1);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn \"\"; // no dot in filename\r\n\t\t\t}\r\n\t\t}",
"public String extension() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n return fullPath.substring(dot + 1);\n }",
"String getFileExtension();",
"public String getFileExtension();",
"public static String GetFileExtension(String filePath) {\n\n\t\tint index = filePath.lastIndexOf('.');\n\t\tif (index > 0) {\n\t\t\treturn filePath.substring(index + 1);\n\t\t}\n\n\t\treturn \"\";\n\t}",
"public static String getFileExtension(String filePath) {\n if (filePath == null || filePath.isEmpty()) {\n return \"\";\n }\n\n int extenPosi = filePath.lastIndexOf(\".\");\n int filePosi = filePath.lastIndexOf(File.separator);\n if (extenPosi == -1) {\n return \"\";\n }\n return (filePosi >= extenPosi) ? \"\" : filePath.substring(extenPosi + 1);\n }",
"private String getExtension(String path){\n System.out.println(\"Начато получение расширения: \");\n if (path.contains(\".\")){\n int dot = path.lastIndexOf(\".\");\n System.out.println(\"return \"+path.substring(dot, path.length()));\n return path.substring(dot, path.length());\n } else {\n// System.out.println(\"return \\\"\\\"\");\n return \"\";\n }\n }",
"public static String getFileExtention(String file_path)\n {\n String file_name = getFileName(file_path);\n int index = file_name.lastIndexOf(46);\n\n if (index >= 0)\n return file_name.substring(index + 1);\n\n return \"\";\n }",
"String getFileExtensionByFileString(String name);",
"private String getExtension(java.io.File file){\n String name = file.getName();\n int idx = name.lastIndexOf(\".\");\n if (idx > -1) return name.substring(idx+1);\n else return \"\";\n }",
"public static String getFileExtension(URL url) {\n\t\tString fileName = url.getFile();\n\t\tint lastIndex = fileName.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? fileName.substring(lastIndex + 1) : \"\";\n\t}",
"public static String getFileExtension(String f) {\n\t\tif (f == null) return \"\";\n\t\tint lastIndex = f.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? f.substring(lastIndex + 1) : \"\";\n\t}",
"public static String getExtension(final String file) throws IOException {\n return FilenameUtils.getExtension(file);\n }",
"String getExtension();",
"public String getExtension(String url) {\n\t\tint dotIndex = url.lastIndexOf('.');\n\t\tString extension = null;\n\t\tif (dotIndex > 0) {\n\t\t\textension = url.substring(dotIndex + 1);\n\t\t}\n\t\treturn extension;\n\t}",
"public static String getIGVExtension(String path) {\n\n // String off gzip first\n if (path.endsWith(\".gz\")) path = path.substring(0, path.length() - 3);\n\n // Now common qualifiers\n if (path.endsWith(\".txt\") || path.endsWith(\".xls\")) path = path.substring(0, path.length() - 4);\n\n int idx = path.lastIndexOf('.');\n return idx < 0 ? path : path.substring(idx + 1, path.length());\n }",
"public String getFileExtension(File file) {\n String name = file.getName();\n try {\n return name.substring(name.lastIndexOf(\".\") + 1);\n } catch (Exception e) {\n return \"\";\n }\n }",
"protected abstract String getFileExtension();",
"public static String getFilename(String path) {\n if (path == null) {\n return null;\n }\n String[] tokens = path.split(\"/\");\n if (tokens == null) {\n return null;\n }\n return tokens[tokens.length - 1];\n }",
"private String getTypeFromExtension()\n {\n String filename = getFileName();\n String ext = \"\";\n\n if (filename != null && filename.length() > 0)\n {\n int index = filename.lastIndexOf('.');\n if (index >= 0)\n {\n ext = filename.substring(index + 1);\n }\n }\n\n return ext;\n }",
"private static char getFileExt(String file) {\r\n \treturn file.charAt(file.indexOf('.')+1);\r\n }",
"public static String getExtension(File file) {\r\n String ext = null;\r\n String s = file.getName();\r\n int i = s.lastIndexOf('.');\r\n if(i > 0 && i < s.length() - 1) {\r\n ext = s.substring(i + 1).toLowerCase();\r\n }\r\n return ext;\r\n }",
"public static String getFileExtension(String filename) {\n\t\t\n\t\tint periodIndex = filename.lastIndexOf(\".\");\n\t\t\n\t\tif(periodIndex == -1) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(periodIndex == filename.length() - 1) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn filename.substring(periodIndex + 1, filename.length());\n\t}",
"public static String getExt(String name) {\n\t\tif (name == null) return null;\n\t\tint s = name.lastIndexOf('.');\n\t\treturn s == -1 ? null : s == 0 ? name : name.substring(s);\n\t}",
"@Override\r\n public String getExtension() {\r\n if (extension == null) {\r\n getBaseName();\r\n final int pos = baseName.lastIndexOf('.');\r\n // if ((pos == -1) || (pos == baseName.length() - 1))\r\n // [email protected]: Review of patch from [email protected]\r\n // do not treat file names like\r\n // .bashrc c:\\windows\\.java c:\\windows\\.javaws c:\\windows\\.jedit c:\\windows\\.appletviewer\r\n // as extension\r\n if (pos < 1 || pos == baseName.length() - 1) {\r\n // No extension\r\n extension = \"\";\r\n } else {\r\n extension = baseName.substring(pos + 1).intern();\r\n }\r\n }\r\n return extension;\r\n }",
"public String getFileExtension() {\n return toString().toLowerCase();\n }",
"public static String getExtension(String uri) {\n if (uri == null) {\n return null;\n }\n\n int dot = uri.lastIndexOf(\".\");\n if (dot >= 0) {\n return uri.substring(dot);\n } else {\n // No extension.\n return \"\";\n }\n }",
"public static String getExtension(File file) {\n\t\tString ext = null;\n\t\tString fileName = file.getName();\n\t\tint i = fileName.lastIndexOf('.');\n\n\t\tif (i > 0 && i < fileName.length() - 1) {\n\t\t\text = fileName.substring(i+1).toLowerCase();\n\t\t}\n\t\treturn ext;\n\t}",
"public static String getExtension(final File file) throws IOException {\n return FilenameUtils.getExtension(file.getName());\n }",
"public static String getExtension(File f) {\n String ext = null;\n String s = f.getName();\n int i = s.lastIndexOf('.');\n\n if (i > 0 && i < s.length() - 1) {\n ext = s.substring(i + 1).toLowerCase();\n }\n\n return ext;\n }",
"public static String getExtension(File f) {\n String ext = null;\n String s = f.getName();\n int i = s.lastIndexOf(\".\");\n ext = s.substring(i+1).toLowerCase();\n return ext;\n }",
"@CheckForNull\n String getPreferredExtension();",
"private String getFileExtension(String fileName) {\n return fileName.substring(fileName.lastIndexOf('.') + 1);\n }",
"public abstract String getFileExtension();",
"public static String getExtension(String uri) {\n if (uri == null) {\n return null;\n }\n\n int dot = uri.lastIndexOf('.');\n if (dot >= 0) {\n return uri.substring(dot);\n } else {\n // No extension.\n return \"\";\n }\n }",
"public String getExtension() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.get(this.lenght - 1).contains(\".\"))\n\t\t{\n\t\t\tString temp = this.get(this.lenght - 1);\n\t\t\t\n\t\t\tString[] parts = temp.split(\"\\\\.\");\n\t\t\t\n\t\t\tresult = parts[parts.length - 1];\n\t\t}\n\t\telse\n\t\t\tresult = \"\";\n\t\t\n\n\t\treturn result;\n\t}",
"public final String getExtension(File f) {\n\t String ext = null;\n\t String s = f.getName();\n\t int i = s.lastIndexOf('.');\n\n\t if (i > 0 && i < s.length() - 1) {\n\t ext = s.substring(i+1).toLowerCase();\n\t }\n\t return ext;\n\t }",
"public String getExt() {\n\t\treturn IpmemsFile.getFileExtension(file);\n\t}",
"private static String getFileExtension(String fileName) {\r\n\t\tString ext = IConstants.emptyString;\r\n\t\tint mid = fileName.lastIndexOf(\".\");\r\n\t\text = fileName.substring(mid + 1, fileName.length());\r\n\t\tSystem.out.println(\"File Extension --\" + ext);\r\n\t\treturn ext;\r\n\t}",
"private String getFileExtension(String mimeType) {\n mimeType = mimeType.toLowerCase();\n if (mimeType.equals(\"application/msword\")) {\n return \".doc\";\n }\n if (mimeType.equals(\"application/vnd.ms-excel\")) {\n return \".xls\";\n }\n if (mimeType.equals(\"application/pdf\")) {\n return \".pdf\";\n }\n if (mimeType.equals(\"text/plain\")) {\n return \".txt\";\n }\n\n return \"\";\n }",
"private String getFilename(String path) {\r\n\t\tint slashHere = path.lastIndexOf('/');\r\n\t\tif (slashHere == -1) {\r\n\t\t\treturn path;\r\n\t\t} else {\r\n\t\t\treturn path.substring(slashHere + 1);\r\n\t\t}\r\n\t}",
"public static String getExt(File song)\n\t{\n\t\treturn song.getName().substring(song.getName().lastIndexOf('.') + 1);\n\t}",
"public static String getFileExtension() {\n return fileExtension;\n }",
"public final String getExtension(File f) {\n String ext = null;\n String s = f.getName();\n int i = s.lastIndexOf('.');\n\n if (i > 0 && i < s.length() - 1) {\n ext = s.substring(i+1).toLowerCase();\n }\n return ext;\n }",
"public String fileExtension() {\r\n return getContent().fileExtension();\r\n }",
"public static String getExtension(String img) {\n String[] arr = img.split(\"\\\\.\");\n return arr[arr.length - 1];\n }",
"public static String getFileExtension(File f) {\r\n\tfinal int idx = f.getName().indexOf(\".\");\r\n\tif (idx == -1)\r\n\t return \"\";\r\n\telse\r\n\t return f.getName().substring(idx + 1);\r\n }",
"public static String getFileExtension(File f) {\n\t\tString fileName = f.getName();\n\t\tint lastIndex = fileName.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? fileName.substring(lastIndex + 1) : \"\";\n\t}",
"public static String GetExtension(String mimeType) {\n if (mimeType == null || mimeType.length() ==0) {\n return null;\n }\n return mimeTypeToExtensionMap.get(mimeType);\n }",
"public String getExtension(File f) {\n\t\t\tString ext = null;\n\t\t\tString s = f.getName();\n\t\t\tint i = s.lastIndexOf('.');\n\n\t\t\tif (i > 0 && i < s.length() - 1)\n\t\t\t\text = s.substring(i + 1).toLowerCase();\n\t\t\treturn ext;\n\t\t}",
"String validateAllowedExtensions(File fileNamePath) {\n\t\tString fileName = fileNamePath.getName();\r\n\t\t\r\n\t\t//Get the index based on the extension into the string\r\n\t\tint lastIndex = fileName.lastIndexOf(\".\");\r\n\t\t\r\n\t\t//Get substring/extension from the string\r\n\t\tString extension = fileName.substring(lastIndex).toUpperCase();\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"GIF\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"JPG\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"TXT\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\t// There is no extension for the file\r\n\t\tif (lastIndex == -1) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\t\r\n\t\t// No valid extension\r\n\t\treturn \"\";\r\n\t\t\r\n\t}",
"public static String getExtn(String fileName)\r\n\t{\r\n\t\tString res=\"\";\r\n\t\tfor(int i=fileName.length()-1;i>=0;i--)\r\n\t\t{\r\n\t\t\tif(fileName.charAt(i)!='.')\r\n\t\t\t\tres=fileName.charAt(i)+res;\r\n\t\t\telse \r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn res;\r\n\t}",
"public static String GetFileExtension(String hint) {\n int dotIndex = hint.lastIndexOf(\".\");\n if (dotIndex > 0) {\n return hint.substring(dotIndex + 1).toLowerCase();\n }\n return \"\";\n }",
"private String getFileExtension(File f) {\n String fileName = f.getName();\n return getFileExtension(fileName);\n }",
"final public String getExtension()\n\t{\n\t\treturn this.getLocation().getExtension(); \n\t}",
"private String getExtension(File f) {\n\t\tString e = null;\n\t\tString s = f.getName();\n\t\tint i = s.lastIndexOf('.');\n\n\t\tif (i > 0 && i < s.length() - 1) {\n\t\t\te = s.substring(i + 1).toLowerCase();\n\t\t}\n\t\treturn e;\n\t}",
"public static String getFileExtension(String fileName) {\n return fileName.trim().substring(fileName.indexOf('.'));\n }",
"public static String getFileExtension(File f) {\n String name = f.getName();\n int index = name.lastIndexOf(\".\");\n if(index == -1) return null;\n \n // the file must have a name other than the extension\n if(index == 0) return null;\n \n // if the last character of the string is the \".\", then there's\n // no extension\n if(index == (name.length()-1)) return null;\n \n return name.substring(index+1);\n }",
"public static String getFilename(String path) {\r\n int i;\r\n if ((i = path.lastIndexOf(PATH_SEPARATOR)) == -1) {\r\n return path;\r\n }\r\n if (i == path.length() - 1) {\r\n return null;\r\n }\r\n return path.substring(i + 1);\r\n }",
"private String getExtension(File aFile) {\n String ext = null;\n String s = aFile.getName();\n int i = s.lastIndexOf('.');\n\n if (i > 0 && i < s.length() - 1) {\n ext = s.substring(i + 1).toLowerCase();\n }\n\n return ext;\n }",
"public static String getSlideFileExtension(String slideRef) {\n\t\t// Determine the file extension for this slide\n\t\treturn FilenameUtils.getExtension(slideRef);\n\t}",
"public String getFileExt(File fileName) {\n return fileName.getName()\n .substring(fileName.getName().lastIndexOf('.'));\n }",
"public static String getFileExtension(String filename) {\n\t\tif(filename.indexOf(\".\") == -1)\n\t\t\treturn \"\";\n\t\t\n\t\treturn \".\"+filename.substring(filename.lastIndexOf(\".\")+1);\n\t}",
"public String GetFileExtension(Uri uri) {\n\n ContentResolver contentResolver = getContentResolver();\n\n MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();\n\n // Returning the file Extension.\n return mimeTypeMap.getExtensionFromMimeType(contentResolver.getType(uri)) ;\n\n }",
"private static String getFileExtension(File cFile) {\n\t\tString oldname = cFile.getName();\r\n\t\tString extension = oldname.substring(oldname.lastIndexOf(\".\"));\r\n\t\treturn extension;\r\n\t}",
"public static String getExtension(URI uri) {\n\t\tif (uri != null) {\n\t\t\tString location = uri.getSchemeSpecificPart();\n\t\t\tif (location != null) {\n\t\t\t\tString name = location;\n\t\t\t\tint index = location.lastIndexOf('.');\n\t\t\t\tif (index != -1) {\n\t\t\t\t\tname = name.substring(index + 1, name.length());\n\t\t\t\t}\n\t\t\t\treturn name;\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}",
"public static String getFileExtension(File file) {\r\n String fileName = file.getName();\r\n if(fileName.lastIndexOf(\".\") != -1 && fileName.lastIndexOf(\".\") != 0)\r\n return fileName.substring(fileName.lastIndexOf(\".\")+1).toLowerCase();\r\n else return \"\";\r\n }",
"String getTilePathExtension();",
"private static TYPE getFtlWebfileType(final String path) {\n if (path.indexOf('.') > -1) {\n final String ext = path.substring(path.lastIndexOf('.'));\n if (BINARY_EXTENSIONS.contains(ext)) {\n return BINARY_WEBFILE;\n }\n }\n return WEBFILE;\n }",
"private String retrieveFileExtension(String targetFile)\r\n\t{\r\n\t\tString result = \"\";\r\n\t\tfor (int index = targetFile.length(); index > 0; index--)\r\n\t\t{\r\n\t\t\tif (targetFile.charAt(index - 1) == '.')\r\n\t\t\t{\r\n\t\t\t\tresult = targetFile.substring(index, targetFile.length());\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (result.equals(targetFile))\r\n\t\t\treturn \"\";\r\n\t\treturn result;\r\n\t}",
"public final String getCurrentExt() {\n FileFilter filter = this.getFileFilter();\n if (filter instanceof ExtensionFileFilter) {\n return ((ExtensionFileFilter)filter).getExt();\n }\n return null;\n }",
"public String getExtension(File f) {\n\t if(f != null) {\n\t String filename = f.getName();\n\t int i = filename.lastIndexOf('.');\n\t if(i>0 && i<filename.length()-1) {\n\t\t return filename.substring(i+1).toLowerCase();\n\t }\n\t }\n\t return null;\n }",
"private String getFileExtension(Uri uri) {\n ContentResolver contentResolver = getApplicationContext().getContentResolver();\n MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();\n return mimeTypeMap.getExtensionFromMimeType(contentResolver.getType(uri));\n }",
"public String getFileExtension() {\r\n\t\treturn this.fileExtension;\r\n\t}",
"private String getMimeType(String path) {\n String extension = absoluteFileChosen.substring(absoluteFileChosen.lastIndexOf(\".\") + 1);\n return MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);\n }",
"private String extensions() {\n return Arrays.stream(f.getName().split(\"\\\\.\")).skip(1).collect(Collectors.joining(\".\"));\n }",
"public static String filenamePart(String path) {\n char sep = System.getProperty(\"file.separator\", \"/\").charAt(0);\n int i = path.lastIndexOf(sep);\n return (i < 0)? path : path.substring(i+1);\n }",
"java.lang.String getExtensionText();",
"public String getFileExtension(File objFile) {\n\n String sFileName = null;\n String sExtension = null;\n\n try {\n\n if (!objFile.exists()) {\n throw new Exception(\"File does not exists\");\n }\n\n sFileName = objFile.getName();\n int i = sFileName.lastIndexOf('.');\n if (i > 0) {\n sExtension = sFileName.substring(i + 1).trim();\n }\n\n } catch (Exception e) {\n println(\"Methods.getFileExtension : \" + e.toString());\n sExtension = \"\";\n } finally {\n return sExtension;\n }\n }",
"private String getFileExtension(Uri uri) {\n ContentResolver cR = getActivity().getApplicationContext().getContentResolver();\n MimeTypeMap mime = MimeTypeMap.getSingleton();\n return mime.getExtensionFromMimeType(cR.getType(uri));\n }",
"public String filename() {\n int dot = fullPath.lastIndexOf(extensionSeparator);\n int sep = fullPath.lastIndexOf(pathSeparator);\n return fullPath.substring(sep + 1, dot);\n }",
"public String getFirstExtension() {\n List<String> ext = this.getExtensions();\n \n if (ext == null || ext.isEmpty()) {\n return null;\n }\n \n return ext.get(0);\n }",
"public List<String> getFileExtensions()\n/* */ {\n/* 619 */ if ((useRegisteredSuffixPatternMatch()) && (this.contentNegotiationManager != null)) {\n/* 620 */ return this.contentNegotiationManager.getAllFileExtensions();\n/* */ }\n/* 622 */ return null;\n/* */ }",
"public static String extractExtension(String filename)\n\t{\n\t\treturn ImageWriterFilter.extractExtension(filename);\n\t}",
"public static String sourceExtension()\n {\n read_if_needed_();\n \n return _ext; \n }",
"private static String getExtensionOrFileName(String filename, boolean extension) {\n\n\t\tString fileWithExt = new File(filename).getName();\n\t\tStringTokenizer s = new StringTokenizer(fileWithExt, \".\");\n\t\tif (extension) {\n\t\t\ts.nextToken();\n\t\t\treturn s.nextToken();\n\t\t} else\n\t\t\treturn s.nextToken();\n\t}",
"public static String getFileExtension(File aFile) {\n\t\tString returnMe = aFile.getName().substring(\n\t\t\t\taFile.getName().lastIndexOf('.') + 1);\n\t\treturn returnMe;\n\t}",
"public static String contentToFileExtension(String mimeType) {\r\n\t\tint slashPos = mimeType.indexOf(MIMEConstants.SEPARATOR);\r\n\t\tif ((slashPos < 1) || (slashPos == (mimeType.length() - 1))) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tString type = mimeType.substring(0, slashPos);\r\n\t\tString subtype;\r\n\t\tint semicolonPos = mimeType.indexOf(\";\", slashPos + 1);\r\n\t\tif (semicolonPos < 0) {\r\n\t\t\tsubtype = mimeType.substring(slashPos + 1).trim();\r\n\t\t} else {\r\n\t\t\tsubtype = mimeType.substring(slashPos + 1, semicolonPos).trim();\r\n\t\t}\r\n\r\n\t\treturn contentToFileExtension(type, subtype);\r\n\t}",
"public static String getFileNameWithoutExtension(String filePath) {\n if (isFileExist(filePath)) {\n return filePath;\n }\n\n int extenPosi = filePath.lastIndexOf(\".\");\n int filePosi = filePath.lastIndexOf(File.separator);\n if (filePosi == -1) {\n return (extenPosi == -1 ? filePath : filePath.substring(0, extenPosi));\n }\n if (extenPosi == -1) {\n return filePath.substring(filePosi + 1);\n }\n return (filePosi < extenPosi ? filePath.substring(filePosi + 1, extenPosi) : filePath.substring(filePosi + 1));\n }",
"String getContentType(String fileExtension);",
"public String getOutputExtension(String inputExtension);",
"public String getExtension() {\n return extension;\n }",
"public String getExtension() {\n return extension;\n }",
"String getOutputExtension();",
"@XmlElement\n @Nullable\n public String getFileExtension() {\n return this.fileExtension;\n }",
"@Pure\n\tpublic String getScriptFileExtension() {\n\t\treturn this.fileExtension;\n\t}",
"public String getExtName(String szMIMEType)\r\n { \r\n if (szMIMEType == null)\r\n return null;\r\n\r\n Object extension = m_hashTableExt.get(szMIMEType);\r\n\r\n if (extension == null) \r\n return null;\r\n return (String)extension;\r\n }",
"public String getReadFileExtension(int formatIndex);",
"protected String getExtension() {\n\t\treturn \"\";\n\t}",
"public String getExtension() {\n return extension;\n }"
] |
[
"0.8066635",
"0.767941",
"0.76730096",
"0.75590384",
"0.75174665",
"0.7485219",
"0.7445778",
"0.7395073",
"0.73883045",
"0.73861474",
"0.7243157",
"0.71392214",
"0.7103148",
"0.70987713",
"0.70608246",
"0.7056778",
"0.7013907",
"0.7011163",
"0.6993983",
"0.6992084",
"0.6986658",
"0.6945129",
"0.6938086",
"0.6910766",
"0.6893363",
"0.689323",
"0.68839747",
"0.68789524",
"0.6867824",
"0.686659",
"0.6844613",
"0.6843687",
"0.6841278",
"0.6828811",
"0.68164235",
"0.68125254",
"0.68062586",
"0.6799308",
"0.67829067",
"0.67547995",
"0.67418814",
"0.67399836",
"0.6733317",
"0.67286676",
"0.6715844",
"0.66999435",
"0.66999125",
"0.66822594",
"0.66762865",
"0.6673415",
"0.6655344",
"0.6653316",
"0.66485506",
"0.66398084",
"0.6636756",
"0.66358095",
"0.6634022",
"0.6622741",
"0.659747",
"0.65961456",
"0.65890014",
"0.6588554",
"0.65665686",
"0.6564849",
"0.6524776",
"0.64961743",
"0.6488149",
"0.6483276",
"0.6470874",
"0.64612925",
"0.6441096",
"0.6426682",
"0.6410716",
"0.6356705",
"0.6325949",
"0.6319855",
"0.63129514",
"0.6222445",
"0.62221706",
"0.6216472",
"0.6200023",
"0.61687505",
"0.6119868",
"0.6116034",
"0.60633755",
"0.6060623",
"0.6060329",
"0.6049002",
"0.6045808",
"0.6034248",
"0.60033834",
"0.59981996",
"0.59981996",
"0.5993752",
"0.5957798",
"0.5954621",
"0.5927172",
"0.5917103",
"0.5916755",
"0.58878076"
] |
0.8035113
|
1
|
Get the minimum timestamp resolution for a file in ms (based on heuristics for the OS).
|
public static long getMinimumFileTimestampResolution(IPath path) {
// VFAT on Win32 uses 2 second increments. Linux ext2/3 uses 1 second resolution,
// until ext4, where it becomes nanoseconds.
// Assume the worst format in all cases.
long res = HostOS.IS_WIN32 ? 2000 : 1000;
if (path != null) {
// todo
}
return res;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public int getMinFrequency() {\n\t\t\tif (mMinFrequency == 0) {\n\t\t\t\tList<String> list = ShellHelper.cat(\n\t\t\t\t\tmRoot.getAbsolutePath() + MIN_FREQUENCY);\n\t\t\t\tif (list == null || list.isEmpty()) return 0;\n\t\t\t\tint value = 0;\n\t\t\t\ttry { value = Integer.valueOf(list.get(0)); }\n\t\t\t\tcatch (NumberFormatException ignored) {}\n\t\t\t\tmMinFrequency = value / 1000;\n\t\t\t}\n\t\t\treturn mMinFrequency;\n\t\t}",
"int getMinRecordingMillis();",
"public long getMinTime()\n {\n return times[0];\n }",
"public static int getMaxTime(File aFile)\n\t{\n\t\tint max_time = 0;\n\n\t\ttry {\n\t\t\tfinal BufferedReader input = new BufferedReader(new FileReader(aFile),300000);\n\t\t\ttry {\n\t\t\t\tString line = null; //not declared within while loop\n\t\t\t\tint current_time = 0;\n\t\t\t\twhile (( line = input.readLine()) != null){\n\t\t\t\t\tfinal String[] splitted = line.split(\"\\\\s+\");\n\t\t\t\t\tcurrent_time = new Integer(splitted[0]);\n\t\t\t\t\tif (current_time > max_time) {\n\t\t\t\t\t\tSystem.out.println(current_time);\n\t\t\t\t\t\tmax_time = current_time;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tinput.close();\n\t\t\t}\n\t\t}\n\t\tcatch (IOException ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\n\t\treturn max_time;\n\t}",
"public int readSecondsLimitFromFile () {\n\t\ttry {\n\t\t\tBufferedReader f = new BufferedReader (new FileReader (\"time.txt\"));\n\t\t\treturn Integer.parseInt(f.readLine());\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\treturn 0;\n\t\t}\n\t}",
"@DISPID(56)\r\n\t// = 0x38. The runtime will prefer the VTID if present\r\n\t@VTID(54)\r\n\tint actualCPUTime_Milliseconds();",
"public float getMaxTimeSeconds() { return getMaxTime()/1000f; }",
"public int getMillisecondPosition() {\n\t\treturn AudioUtils.bytes2Millis(totalBytesRead, format);\n\t}",
"public final double getMinTime() {\n\t\treturn minTime;\n\t}",
"public static int getCurrentMillisecond()\n\t{\n\t\treturn Calendar.getInstance().get(Calendar.MILLISECOND);\n\t}",
"public static final long getTicksPerMinute() {\n return p().TICKS_PER_RLMIN;\n }",
"private long getNow()\n {\n // no need to convert to collection if had an Iterables.max(), but not present in standard toolkit, and not worth adding\n List<SSTableReader> list = new ArrayList<>();\n Iterables.addAll(list, cfs.getSSTables(SSTableSet.LIVE));\n if (list.isEmpty())\n return 0;\n return Collections.max(list, (o1, o2) -> Long.compare(o1.getMaxTimestamp(), o2.getMaxTimestamp()))\n .getMaxTimestamp();\n }",
"private double calcMinTime(List<FogDevice> fogDevices, List<? extends Cloudlet> cloudletList) {\n double minTime = 0;\n double totalLength = 0;\n double totalMips = 0;\n for(Cloudlet cloudlet : cloudletList) {\n totalLength += cloudlet.getCloudletLength();\n }\n for(FogDevice fogDevice : fogDevices) {\n totalMips += fogDevice.getHost().getTotalMips();\n }\n minTime = totalLength / totalMips;\n return minTime;\n }",
"public static long filetimeToUtcMs(long filetime, boolean local) {\n return filetime / 10_000L - EPOCH_DIFF - (local ? TZ_OFFSET : 0L);\n }",
"protected static double getFPGATime() {\n return (System.currentTimeMillis() - startTime) / 1000.0;\n }",
"static long m61428a(File file) {\n long j;\n try {\n StatFs statFs = new StatFs(file.getAbsolutePath());\n j = (((long) statFs.getBlockCount()) * ((long) statFs.getBlockSize())) / 50;\n } catch (IllegalArgumentException unused) {\n j = 5242880;\n }\n return Math.max(Math.min(j, 52428800), 5242880);\n }",
"@DISPID(71)\r\n\t// = 0x47. The runtime will prefer the VTID if present\r\n\t@VTID(69)\r\n\tint averageCPUTime_Milliseconds();",
"public void setMinFileAgeMillis(long minFileAgeMillis)\r\n {\r\n this.minFileAgeMillis = minFileAgeMillis;\r\n }",
"int getMaxRecordingMillis();",
"@DISPID(54)\r\n\t// = 0x36. The runtime will prefer the VTID if present\r\n\t@VTID(52)\r\n\tint actualCPUTime_Minutes();",
"public static double getTimeMs(){\n return System.nanoTime()*nanoToMs;\n }",
"public Integer getMinTime() {\n return minTime;\n }",
"public long getElapsedTimeMin() {\n return running ? (((System.currentTimeMillis() - startTime) / 1000) / 60 ) % 60 : 0;\n }",
"public double getCurrentTime() {\n\t\tif (playing)\n\t\t\treturn (System.nanoTime() - startNanoTime) / 1e9 + startTime;\n\t\telse if (currentFile == null)\n\t\t\treturn -1;\n\t\tif (debug)\n\t\t\tSystem.err.println(\"getCurrentTime(): not playing\");\n\t\treturn currentPosition / currentFile.frameSize / currentFile.frameRate;\n\t}",
"int getMPPerSecond();",
"public static int getMinDistanceTime(Asteroid a, Asteroid b) {\n\n\t\tdouble minDistance = -1;\n\t\tint minDistTime = Integer.MAX_VALUE;\n\t\tfor(int t = 0; t < 20*365; t++){\n\t\t\tdouble distance = Point.distance(a.orbit.positionAt((long)t - a.epoch),b.orbit.positionAt((long)t - b.epoch));\n\t\t\tif(distance < minDistance){\n\t\t\t\tminDistance = distance;\n\t\t\t\tminDistTime = t;\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn minDistTime;\n\t}",
"private static int checkFilesPeriod() {\n return ERXProperties.intForKeyWithDefault(\"er.extensions.ERXFileNotificationCenter.CheckFilesPeriod\", 0);\n }",
"private long removeOldest() {\n if (lastUsageDates.isEmpty()) return 0;\n Long oldestUsage = Long.MAX_VALUE;\n File oldestFile = null;\n Set<Map.Entry<File, Long>> entries = lastUsageDates.entrySet();\n synchronized (lastUsageDates) {\n for (Map.Entry<File, Long> entry : entries) {\n Long lastValueUsage = entry.getValue();\n if (lastValueUsage < oldestUsage) {\n oldestUsage = lastValueUsage;\n oldestFile = entry.getKey();\n }\n }\n }\n if (oldestFile == null) return 0;\n long fileSize = oldestFile.length();\n if (oldestFile.delete()) {\n lastUsageDates.remove(oldestFile);\n return fileSize;\n }\n return 0;\n }",
"private long getAppProcessTime(int pid) {\n FileInputStream in = null;\n String ret = null;\n try {\n in = new FileInputStream(\"/proc/\" + pid + \"/stat\");\n byte[] buffer = new byte[1024];\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n int len = 0;\n while ((len = in.read(buffer)) != -1) {\n os.write(buffer, 0, len);\n }\n ret = os.toString();\n os.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (in != null) {\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n if (ret == null) {\n return 0;\n }\n\n String[] s = ret.split(\" \");\n if (s == null || s.length < 17) {\n return 0;\n }\n\n long utime = string2Long(s[13]);\n long stime = string2Long(s[14]);\n long cutime = string2Long(s[15]);\n long cstime = string2Long(s[16]);\n\n return utime + stime + cutime + cstime;\n }",
"private long getAppProcessTime(int pid) {\n FileInputStream in = null;\n String ret = null;\n try {\n in = new FileInputStream(\"/proc/\" + pid + \"/stat\");\n byte[] buffer = new byte[1024];\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n int len = 0;\n while ((len = in.read(buffer)) != -1) {\n os.write(buffer, 0, len);\n }\n ret = os.toString();\n os.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (in != null) {\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n if (ret == null) {\n return 0;\n }\n\n String[] s = ret.split(\" \");\n if (s == null || s.length < 17) {\n return 0;\n }\n\n long utime = string2Long(s[13]);\n long stime = string2Long(s[14]);\n long cutime = string2Long(s[15]);\n long cstime = string2Long(s[16]);\n\n return utime + stime + cutime + cstime;\n }",
"public int getMillisecondLength() {\n\t\treturn meta.length();\n\t}",
"private long calculateFrameTimestamp(int totalBits) {\n int samples = totalBits >> 4;\n long frameUs = mFramesUsCache.get(samples, -1);\n if (frameUs == -1) {\n frameUs = samples * 1000_000 / mChannelsSampleRate;\n mFramesUsCache.put(samples, frameUs);\n }\n long timeUs = SystemClock.elapsedRealtimeNanos() / 1000;\n // accounts the delay of polling the audio sample data\n timeUs -= frameUs;\n long currentUs;\n long lastFrameUs = mFramesUsCache.get(LAST_FRAME_ID, -1);\n if (lastFrameUs == -1) { // it's the first frame\n currentUs = timeUs;\n } else {\n currentUs = lastFrameUs;\n }\n if (DEBUG)\n Log.i(TAG, \"count samples pts: \" + currentUs + \", time pts: \" + timeUs + \", samples: \" +\n \"\" + samples);\n // maybe too late to acquire sample data\n if (timeUs - currentUs >= (frameUs << 1)) {\n // reset\n currentUs = timeUs;\n }\n mFramesUsCache.put(LAST_FRAME_ID, currentUs + frameUs);\n return currentUs;\n }",
"static int minimumTime(int[] x) {\n Arrays.sort(x);\n int l = x.length;\n int s = 0;\n int n = l - 1;\n for (int i = 0; i < n; ++i) {\n s += x[i + 1] - x[i];\n }\n return s;\n }",
"public static String getCurrentMillisecondTime()\n\t{\n\t\treturn getMillisecondTime(new Date());\n\t}",
"public static long timestampMicros()\n {\n return currentTimeMillis() * 1000;\n }",
"public long findFastestTime()\r\n {\r\n for(int top = 1; top < listOfTimes.size(); top++)\r\n { \r\n long item = listOfTimes.get(top); \r\n int i = top;\r\n\r\n while(i > 0 && item < listOfTimes.get(i - 1))\r\n {\r\n listOfTimes.set(i, listOfTimes.get(i- 1));\r\n i--;\r\n }//end while \r\n\r\n listOfTimes.set(i, item);\r\n }//end for \r\n\r\n return listOfTimes.get(0);\r\n }",
"private long determineTimestamp(DdfMarketBase m) {\n\n\t\tlong millis = millisCST;\n\n\t\tint type = getSymbolType(m.getSymbol());\n\n\t\tif ((type > 200) && (type < 300)) {\n\t\t\t// Equity, add 1 Hour\n\t\t\tmillis += 60 * 60 * 1000;\n\t\t}\n\n\t\tif (_type == MasterType.Delayed) {\n\t\t\tmillis -= m.getDelay() * 60 * 1000;\n\t\t}\n\n\t\treturn millis;\n\t}",
"static long extractTimeStamp(File autoSaveFile) throws DatabaseWrapperOperationException {\t\r\n \t\tString fileName;\r\n \t\ttry {\r\n \t\t\tfileName = autoSaveFile.getCanonicalFile().getName();\r\n \t\t} catch (IOException e) {\r\n \t\t\tthrow new DatabaseWrapperOperationException(DBErrorState.ERROR_CLEAN_STATE, e);\r\n \t\t}\r\n \t\t\r\n \t\tif (!fileName.matches(DatabaseIntegrityManager.AUTO_SAVE_FILE_REGEX)) {\r\n \t\t\tthrow new DatabaseWrapperOperationException(DBErrorState.ERROR_CLEAN_STATE);\r\n \t\t}\r\n \t\t\r\n \t\ttry {\r\n \t\t\treturn Long.parseLong(fileName.substring(fileName.indexOf('_') + 1, fileName.indexOf('.')));\r\n \t\t} catch (NumberFormatException e) {\r\n \t\t\tthrow new DatabaseWrapperOperationException(DBErrorState.ERROR_CLEAN_STATE, e);\r\n \t\t}\r\n \t}",
"public long toMillisecond(long value) { return value; }",
"private long getOldestWalTimestamp() {\n long oldestWalTimestamp = Long.MAX_VALUE;\n for (Map.Entry<String, PriorityBlockingQueue<Path>> entry : queues.entrySet()) {\n PriorityBlockingQueue<Path> queue = entry.getValue();\n Path path = queue.peek();\n // Can path ever be null ?\n if (path != null) {\n oldestWalTimestamp =\n Math.min(oldestWalTimestamp, AbstractFSWALProvider.WALStartTimeComparator.getTS(path));\n }\n }\n return oldestWalTimestamp;\n }",
"private float getCpuUsage() {\n\t\tString processName = ManagementFactory.getRuntimeMXBean().getName();\n\t\tString processId = processName.split(\"@\")[0];\n\n\t\tlong utimeBefore, utimeAfter, totalBefore, totalAfter;\n\t\tfloat usage = 0;\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"/proc/\" + processId + \"/stat\"));\n\t\t\tString line = br.readLine();\n\t\t\tutimeBefore = Long.parseLong(line.split(\" \")[13]);\n\t\t\tbr.close();\n\n\t\t\ttotalBefore = 0;\n\t\t\tbr = new BufferedReader(new FileReader(\"/proc/stat\"));\n\t\t\tline = br.readLine();\n\t\t\twhile (line != null) {\n\t\t\t\tString[] items = line.split(\" \");\n\t\t\t\tif (items[0].equals(\"cpu\")) {\n\t\t\t\t\tfor (int i = 1; i < items.length; i++)\n\t\t\t\t\t\tif (!items[i].trim().equals(\"\") && items[i].matches(\"[0-9]*\"))\n\t\t\t\t\t\t\ttotalBefore += Long.parseLong(items[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\n\t\t\tThread.sleep(1000);\n\n\t\t\tbr = new BufferedReader(new FileReader(\"/proc/\" + processId + \"/stat\"));\n\t\t\tline = br.readLine();\n\t\t\tutimeAfter = Long.parseLong(line.split(\" \")[13]);\n\t\t\tbr.close();\n\n\t\t\ttotalAfter = 0;\n\t\t\tbr = new BufferedReader(new FileReader(\"/proc/stat\"));\n\t\t\tline = br.readLine();\n\t\t\twhile (line != null) {\n\t\t\t\tString[] items = line.split(\" \");\n\t\t\t\tif (items[0].equals(\"cpu\")) {\n\t\t\t\t\tfor (int i = 1; i < items.length; i++)\n\t\t\t\t\t\tif (!items[i].trim().equals(\"\") && items[i].matches(\"[0-9]*\"))\n\t\t\t\t\t\t\ttotalAfter += Long.parseLong(items[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\n\t\t\tusage = 100f * (utimeAfter - utimeBefore) / (totalAfter - totalBefore);\n\t\t} catch (Exception e) {}\n\t\treturn usage;\n\t}",
"public static long getSystemTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()): 0L;\n }",
"public float getminTemp() {\n Reading minTempReading = null;\n float minTemp = 0;\n if (readings.size() >= 1) {\n minTemp = readings.get(0).temperature;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).temperature < minTemp) {\n minTemp = readings.get(i).temperature;\n }\n }\n } else {\n minTemp = 0;\n }\n return minTemp;\n }",
"public double getSystemTimeSec() {\n\treturn getSystemTime() / Math.pow(10, 9);\n}",
"long getLastWriteTimeUtc(String path) throws IOException;",
"public long getRunMaxMillis()\n {\n return 0L;\n }",
"public Long getMinLatency() {\n return minLatency;\n }",
"public long refineTimestamp(long timestamp) {\n long time = (timestamp / windowSlotSize) * windowSlotSize;\n return time;\n }",
"public static long getTimeInMillis(String formatted_time){\n \t\n \tlong firstTime = System.currentTimeMillis();\n \tint hour;\n \tint minute;\n\n \tif (formatted_time != null){\n \t\t\n \t\tString[] timeString = formatted_time.split(\":\");\n \tif (timeString.length != 2)\n \t\treturn firstTime;\n \telse{\n \t\thour = Integer.parseInt(timeString[0]);\n \t\tminute = Integer.parseInt(timeString[1]);\n \t}\n \t\n\t \tCalendar cal = Calendar.getInstance();\n\t cal.set(Calendar.HOUR_OF_DAY,hour);\n\t cal.set(Calendar.MINUTE,minute);\n\t cal.set(Calendar.SECOND,0);\n\t \tfirstTime = cal.getTimeInMillis();\n \t}\n \t\n \treturn firstTime;\n }",
"private long getSystemTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()) : 0L;\n }",
"public static long getUnifiedMillis (final long nMillis)\n {\n return nMillis / CGlobal.MILLISECONDS_PER_SECOND * CGlobal.MILLISECONDS_PER_SECOND;\n }",
"@DISPID(55)\r\n\t// = 0x37. The runtime will prefer the VTID if present\r\n\t@VTID(53)\r\n\tint actualCPUTime_Seconds();",
"private long determineGranularityInMillis(Database database) throws IOException {\n\t\tTable eventMeter = database.getTable(EventMeter.EVENT_METER_TABLE);\n\n\t\t// fast forward into the dataset so (more) load is present\n\n // the getRowCount() call is broken: gets it from the table metadata, which can\n // be incorrect (e.g. 0)\n\t\t// int rows = eventMeter.getRowCount();\n int rows = determineRowsInTableWorkaround(eventMeter);\n\n\t\tif (rows < 2) {\n\t\t\tthrow new LogRaterException(\"Not enough rows in the Event_meter table to calculate granularity. There are \" + rows + \" rows.\");\n\t\t}\n\t\tint forwardRowsCount = rows > ROW_FETCH_COUNT_FOR_GRANULARITY_DETERMINATION ? ROW_FETCH_COUNT_FOR_GRANULARITY_DETERMINATION : (rows - 1);\n\t\tRow row;\n\t\tfor (int i = 0; i < forwardRowsCount; i++) {\n\t\t\teventMeter.getNextRow();\n\t\t}\n\t\trow = eventMeter.getNextRow();\n\n\t\tInteger firstEventID = row.getInt(EventMeter.EVENT_ID);\n\t\tDouble endTimeFirst = row.getDouble(EventMeter.END_TIME);\n\n\t\t// the second measurement should be of same event_id\n double granularitySec;\n Integer secondEventID;\n\t\tdo {\n row = eventMeter.getNextRow();\n secondEventID = row.getInt(EventMeter.EVENT_ID);\n Double endTimeSecond = row.getDouble(EventMeter.END_TIME);\n granularitySec = PerformanceCenterCalculator.calculateGranularitySec(endTimeFirst, endTimeSecond);\n } while (firstEventID.equals(secondEventID) || granularitySec < 0.001d);\n\n\t\tlog.info(\"Found PROBABLY FAULTY ESTIMATION of granularity in access database: [{}] seconds.\", granularitySec);\n\t\treturn (long) (granularitySec * 1000.0);\n\n\t}",
"private long getLatestTimestamp(long defaultTimestamp) throws IOException {\n if (Files.notExists(LATEST_TIMESTAMP_PATH)) {\n Files.createFile(LATEST_TIMESTAMP_PATH);\n return defaultTimestamp;\n }\n\n // Read the latest timestamp\n String timestampString = new String(Files.readAllBytes(LATEST_TIMESTAMP_PATH), StandardCharsets.UTF_8);\n\n long timestamp = 0;\n if (timestampString.isEmpty()) {\n // Create the file for the first time\n return defaultTimestamp;\n }\n\n // Convert timestamp string to timestamp\n return Long.parseLong(timestampString);\n }",
"public static final long getTimeStem() {\n\t\tlong unix_time = Instant.now().getEpochSecond();\n\t\treturn unix_time;\n\t}",
"int maxSecondsForRawSampleRow();",
"long getCurrentTimeMs();",
"public static long getMillisecond(int[] timeArray)\n\t{\n\t\treturn getSecond(timeArray) * 1000 + timeArray[4];\n\t}",
"public float getEffectiveClockFrequency() {\n return (float) getCpu().getTime() * NANOSECS_IN_MSEC / getUptime();\n }",
"public MetricResolution getNearestResolution( int seconds ) {\n\t\tMetricResolution best = null;\n\t\tfor( MetricResolution res : resolutions ) {\n\t\t\tif( res.getSeconds() < seconds ) {\n\t\t\t\tif( best == null || best.getSeconds() < res.getSeconds() ) {\n\t\t\t\t\tbest = res;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn best != null ? best : getFinestResolution();\n\t}",
"private int secToMin(int sec){\n return sec/60;\n }",
"public long nanosToCpuTime(long nanosecs) {\n return nanosecs * clockFrequency / NANOSECS_IN_MSEC;\n }",
"public static long getSystemTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n (bean.getCurrentThreadCpuTime( ) - bean.getCurrentThreadUserTime( )) : 0L;\n\n }",
"long getCreationTimeUtc(String path) throws IOException;",
"public static long milliSecondFromNano()\r\n/* 15: */ {\r\n/* 16: 44 */ return System.nanoTime() / 1000000L;\r\n/* 17: */ }",
"public double getAltRms() {\n\t\treturn 3600.0 * Math.sqrt(1000.0 * altInt / (double) (updateTimeStamp - startTime));\n\t}",
"double getArchiveMinInt();",
"public long getMinimumLong() {\n/* 179 */ return this.min;\n/* */ }",
"@DISPID(66)\r\n\t// = 0x42. The runtime will prefer the VTID if present\r\n\t@VTID(64)\r\n\tint averageRunTime_Milliseconds();",
"public static double timeNanoToMin(double bT, double eT)\n {\n return (timeNanoToSeconds(bT, eT)) / 60;\n }",
"com.google.protobuf.ByteString getMinSignedPerWindow();",
"private long getCpuTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadCpuTime() : 0L;\n }",
"public static long todayStartTimeInSecond() {\n return LocalDateTime.of(LocalDate.now(), LocalTime.MIN).toEpochSecond(getStandardOffset());\n }",
"static int getMinute(byte[] bytes) {\n if (MINUTE_POS < bytes.length * 8) {\n return readBits(bytes, MINUTE_POS, MINUTE_BITS);\n }\n return 0;\n }",
"public long getImageModTimeMs() throws IOException {\n UnderFileSystem ufs = UnderFileSystem.get(mImagePath);\n if (!ufs.exists(mImagePath)) {\n return -1;\n }\n return ufs.getModificationTimeMs(mImagePath);\n }",
"public int findMinDifference(List<String> timePoints) {\n\t\tboolean checkTime[] = new boolean[24*60];\n\t\tfor(String timePoint : timePoints) {\n\t\t\tString[] time = timePoint.split(\":\");\n\t\t\tint minutes = Integer.parseInt(time[0])*60 + Integer.parseInt(time[1]);\n\t\t\tif(checkTime[minutes]) return 0;\n\t\t\tcheckTime[minutes] = true;\n\t\t}\n\t\t\n\t\tint minDifference = Integer.MAX_VALUE;\n\t\tint firstMinutes = 0, prevMinutes = -1;\n\t\tfor(int i = 0; i < checkTime.length; i++) {\n\t\t\tif(checkTime[i]) {\n\t\t\t\tif(prevMinutes != -1) {\n\t\t\t\t\tminDifference = Math.min(minDifference, (i-prevMinutes) > 720 ? (1440-i+prevMinutes) : (i-prevMinutes));\n\t\t\t\t} else {\n\t\t\t\t\tfirstMinutes = i;\n\t\t\t\t}\n\t\t\t\tprevMinutes = i;\n\t\t\t}\n\t\t}\n\t\tminDifference = Math.min(minDifference, (prevMinutes-firstMinutes) > 720 ? (1440-prevMinutes+firstMinutes) : (prevMinutes-firstMinutes));\n\t\treturn minDifference;\n\t}",
"public double getMaxTimeDiff()\n\t{\n\t\treturn 0;\n\t}",
"public long getMinimum() {\n\t\treturn this._min;\n\t}",
"public String estimatedTime() {\n int m = (int)(getFreeBytes()/500000000);\n return (m <= 1) ? \"a minute\" : m+\" minutes\";\n }",
"long toMillisecond(long timelineValue);",
"public Long calculateMilliseconds() {\n\t\tString stringMonth;\n\t\tString stringDay;\n\t\tString stringYear;\n\t\tString[] dateFragments;\n\t\tCalendar cal;\n\t\tint day;\n\t\tint month;\n\t\tint year;\n\t\t\n\t\tdateFragments = this.date.split(\"/\");\n\t\t\n\t\tstringMonth = dateFragments[0];\n\t\tstringDay = dateFragments[1];\n\t\tstringYear = dateFragments[2];\n\t\t\n\t\tmonth = Integer.parseInt(stringMonth) - 1; // (Firebase/Event: Jan == 1)\n\t\tday = Integer.parseInt(stringDay);\n\t\tyear = Integer.parseInt(stringYear);\n\t\t\n\t\tcal = Calendar.getInstance();\n\t\tcal.set(year, month, day); // (Calendar.java: Jan == 0)\n\t\t\n\t\treturn cal.getTimeInMillis();\n\t}",
"private long extractMillis(String value)\r\n/* 364: */ {\r\n/* 365:318 */ int start = value.indexOf(\"\\\"\");\r\n/* 366:319 */ int end = value.lastIndexOf(\"\\\"\");\r\n/* 367:320 */ String time = value.substring(start + 1, end);\r\n/* 368: */ \r\n/* 369:322 */ Date result = null;\r\n/* 370: */ try\r\n/* 371: */ {\r\n/* 372:324 */ result = this.format.parse(time);\r\n/* 373: */ }\r\n/* 374: */ catch (ParseException e)\r\n/* 375: */ {\r\n/* 376:327 */ Mark.err(new Object[] {\"Unalble to get milliseconds from\", value });\r\n/* 377:328 */ return 0L;\r\n/* 378: */ }\r\n/* 379:331 */ return result.getTime();\r\n/* 380: */ }",
"long getTimeInMillis();",
"public static long getCpuTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n bean.getCurrentThreadCpuTime(): 0L;\n }",
"public int findMinDifference(List<String> timePoints) {\n List<Integer> p = new ArrayList<>();\n for(String time:timePoints){\n String[] hm = time.split(\":\");\n int h = Integer.parseInt(hm[0]);\n int m = Integer.parseInt(hm[1]);\n p.add(h*60 + m);\n if(h<12){\n p.add((h+24)*60+m);\n }\n }\n int diff = Integer.MAX_VALUE;\n Collections.sort(p);\n for(int i=1; i<p.size(); i++){\n diff = Math.min(p.get(i)-p.get(i-1), diff);\n }\n return diff;\n }",
"public long getSystemTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n (bean.getCurrentThreadCpuTime( ) - bean.getCurrentThreadUserTime( )) : 0L;\n}",
"public static long getCpuTime( ) {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n\n bean.getCurrentThreadCpuTime( ) : 0L;\n\n }",
"public double minDifference()\n {\n double minD = 1000.0; // setting unreasonably high\n double testD = 0.0;\n \n for (int i=0; i < data.length -1; i++) // stopping 1 early because reading ahead\n {\n testD = Math.abs(data[i]-data[i+1]);\n if (testD < minD)\n {\n minD = testD;\n }\n }\n \n \n return minD;\n }",
"public float getStartTime()\r\n\t{\r\n\t\tif (starttime != null)\r\n\t\t\treturn starttime.getTimeInMillis();\r\n\t\t\r\n\t\treturn 0;\r\n\t}",
"public long windowStart(long timestamp) throws TimeWindowException {\n return ((timestamp / div()) * div());\n }",
"@DISPID(69)\r\n\t// = 0x45. The runtime will prefer the VTID if present\r\n\t@VTID(67)\r\n\tint averageCPUTime_Minutes();",
"public long getMinTimeBetweenAlarmsMs() {\n synchronized (mLock) {\n return mMinTimeBetweenAlarmsMs;\n }\n }",
"int getSampleMs();",
"private long getLastCacheUpdateTimeMillis() {\n return this.fileManager.getFromPreferences(this.context, SETTINGS_KEY);\n }",
"public double getCpuTimeSec() {\n\treturn getCpuTime() / Math.pow(10, 9);\t\t\n}",
"private double getReadTime(int wordCount) {\n return wordCount / 130.0;\n }",
"public static long getAverageLatencyMs() {\n\t\tif (getLatencySamples() == 0)\n\t\t\treturn 0;\n\t\treturn getCumulativeLatencyMs() / getLatencySamples();\n\t}",
"public int getMaxFrequency() {\n\t\t\tif (mMaxFrequency == 0) {\n\t\t\t\tList<String> list = ShellHelper.cat(\n\t\t\t\t\tmRoot.getAbsolutePath() + MAX_FREQUENCY);\n\t\t\t\tif (list == null || list.isEmpty()) return 0;\n\t\t\t\tint value = 0;\n\t\t\t\ttry { value = Integer.valueOf(list.get(0)); }\n\t\t\t\tcatch (NumberFormatException ignored) {}\n\t\t\t\tmMaxFrequency = value / 1000;\n\t\t\t}\n\t\t\treturn mMaxFrequency;\n\t\t}",
"@Override\n\tpublic long getResolution() {\n\t\treturn TIMER_RESOLUTION;\n\t}",
"public long getJVMCpuTime( ) {\n OperatingSystemMXBean bean =\n ManagementFactory.getOperatingSystemMXBean( );\n if ( ! (bean instanceof\n com.sun.management.OperatingSystemMXBean) )\n return 0L;\n return ((com.sun.management.OperatingSystemMXBean)bean)\n .getProcessCpuTime( );\n}"
] |
[
"0.61873823",
"0.61684096",
"0.5691037",
"0.56167823",
"0.5488854",
"0.54542726",
"0.5442456",
"0.5440883",
"0.53946835",
"0.5382877",
"0.53509426",
"0.5339244",
"0.53052783",
"0.5303177",
"0.5289876",
"0.5223305",
"0.5182121",
"0.5162177",
"0.5132054",
"0.51093465",
"0.50883347",
"0.5074532",
"0.5073909",
"0.5061652",
"0.50540686",
"0.50396854",
"0.5033684",
"0.5025375",
"0.5024062",
"0.5024062",
"0.5004999",
"0.50000864",
"0.4999243",
"0.49902302",
"0.49853772",
"0.49758512",
"0.49714294",
"0.49596712",
"0.49458694",
"0.49424407",
"0.49385312",
"0.4934567",
"0.49247882",
"0.49199826",
"0.49161986",
"0.49122417",
"0.49110398",
"0.49045387",
"0.48939216",
"0.48897046",
"0.4888349",
"0.48859894",
"0.4884519",
"0.48772553",
"0.48772076",
"0.4873029",
"0.48708236",
"0.4858895",
"0.48588708",
"0.48567212",
"0.4855785",
"0.48492947",
"0.4848748",
"0.4842847",
"0.48406678",
"0.48393607",
"0.48337755",
"0.48330814",
"0.483242",
"0.48249003",
"0.4821699",
"0.48198408",
"0.47992593",
"0.47949955",
"0.479409",
"0.47898048",
"0.47870505",
"0.47847816",
"0.47818008",
"0.4780425",
"0.4779023",
"0.47757366",
"0.47691783",
"0.4766526",
"0.47653532",
"0.47636577",
"0.4756836",
"0.4752467",
"0.47516078",
"0.474972",
"0.47463787",
"0.47451797",
"0.47434184",
"0.4737594",
"0.47352982",
"0.47333446",
"0.47321263",
"0.47282788",
"0.4723879",
"0.47215155"
] |
0.80004466
|
0
|
If the filesystem is case sensitive, locate the file on the filesystem on the given path, by ignoring case sensitivity differences. This is needed on casepreserving but not caseinsensitive filesystems.
|
public static IPath findExistingPathIfCaseSensitive(IPath path) {
// PathUtils (shared with EDC) has the stock implementation
return PathUtils.findExistingPathIfCaseSensitive(path);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public FileInfo findFile(String pkgPath) {\n if (fileLookup == null) {\n buildFileLookupMap();\n }\n return fileLookup.get(pkgPath);\n }",
"String getCaseSensitive();",
"private void findMatches(String key, String path, boolean caseSensitive, boolean fileName) {\n\t\tfor (String word : document) {\n\t\t\tif (contains(key, word, caseSensitive)) {\n\t\t\t\tif (fileName) {\n\t\t\t\t\tSystem.out.println(path);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(word);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private String locateFile(String fileName) {\n\t\tString file = null;\n\t\tURL fileURL = ClassLoader.getSystemResource(fileName);\n\t\tif (fileURL != null) {\n\t\t\tfile = fileURL.getFile();\n\t\t} else\n\t\t\tSystem.err.println(\"Unable to locate file \" + fileName);\n\t\treturn file;\n\t}",
"public File searchForFile(String searchFilename) {\r\n File[] files = new File(APP_INSTANCE.getAppDirectory()).listFiles((dir1, examineName) -> examineName.equals(searchFilename));\r\n return Arrays.stream(files).findFirst().orElse(null);\r\n }",
"private FileSystem resolve(String fileName)\n {\n return fileSystems.stream().filter(fs->fs.fsName.equals(fileName)).findAny().get();\n }",
"public static void searchFile(String path){\n try {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter the File Name You need to Find:\");\n String name = scanner.next();\n File file = new File(path + \"/\" + name);\n if (file.isFile()) {\n file.getName();\n System.out.println(\"File Exists\");\n }\n else{\n System.out.println(\"File Not Found\");\n\n }\n\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }",
"int getCaseSensitive();",
"private DocumentType findByName(String name, boolean caseSensitive) {\n \tif (name == null) {\n \t\treturn null;\n \t}\n return documentTypeDAO.findByName(name, caseSensitive);\n }",
"public static boolean isReverseRoundtripFileRegExpCaseSensitive()\n {\n read_if_needed_();\n \n return _file_regexp_case_sensitive;\n }",
"public ICUResourceBundle findWithFallback(String path)\n/* */ {\n/* 383 */ return findResourceWithFallback(path, this, null);\n/* */ }",
"public static File getMatchingFile(String keyword) {\n\t\tFile directory = new File(Constant.pathToRoot + Constant.clientDataPath);\n\t\tif (directory != null) {// To check if there are files in this directory\n\t File[] listOfFiles = directory.listFiles();\n\t String currentFile;\n\t for (int i = 0; i < listOfFiles.length; i++) {\n\t if (listOfFiles[i].isFile()) {\n\t \tcurrentFile = listOfFiles[i].getName();\n\t if (currentFile.endsWith(keyword) || currentFile.startsWith(keyword)) {\n\t return listOfFiles[i];// User name already exist\n\t }\n\t }\n\t }\n\t\t}\n // User name does not exist\n \treturn null;\n\t}",
"public static void searchFile() \n\t{\n\t\t//Variable Declaration\n\t\tString fileName;\n\t\tScanner obj = new Scanner(System.in);\n\n\t\t//Read file name from user\n\t\tSystem.out.println(\"Enter file name to searched:\");\n\t\tfileName= obj.nextLine();\n\t\t\n\t\t//Searching the file\n\t\tboolean isFound = FileManager.searchFile(folderpath, fileName);\n\t\t\n\t\tif(isFound)\n\t\t\tSystem.out.println(\"File is present\");\n\t\telse\n\t\t\tSystem.out.println(\"File not present.\");\n\n\t}",
"@Override\n\tpublic boolean containsPath(String word, String path) {\n\t\tlock.lockReadOnly();\n\t\ttry {\n\t\t\treturn super.containsPath(word, path);\n\t\t} finally {\n\t\t\tlock.unlockReadOnly();\n\t\t}\n\t}",
"private File getFile(String path, String name)\r\n {\r\n File file = null;\r\n boolean found = false;\r\n String ext = \"\";\r\n\r\n for (int i = 0; i < name.length(); i++)\r\n ext += \"\" + ( (name.charAt(i) == '.') ? '\\\\' : name.charAt(i));\r\n\r\n while(ext.length() > 0 && !found)\r\n {\r\n file = new File(path + \"\\\\\" + ext + \".java\");\r\n found = file != null && file.exists() && file.isFile();\r\n ext = ext.substring(0, Math.max(0, ext.lastIndexOf('\\\\')));\r\n }\r\n\r\n return (found)?file:null;\r\n }",
"CharStream findFile(String name) throws IOException,\n IncludeFileNotFound {\n // Look in the directory containing the source file ...\n String dir = \".\"; // default value used e.g. when reading from stdin\n File src = getSource();\n if (src != null && src.getParent() != null) {\n dir = src.getParent();\n }\n String full = dir + \"/\" + name;\n File f = new File(full);\n if (f.exists()) {\n LOG.debug(\"Using local file \" + full);\n return CharStreams.fromFileName(full);\n }\n\n // ... and fall back to the standard library path if not found.\n final URL url = ClassLoader.getSystemResource(\"include/\" + name);\n if (url != null) {\n LOG.debug(\"Using library \" + url);\n // Use fromReader(Reader, String) to catch the file name --- fromStream(InputStream) does not.\n return CharStreams.fromReader(new InputStreamReader(url.openStream()), url.getFile());\n }\n\n throw new IncludeFileNotFound(name, this, getInputStream()); // TODO: check this\n }",
"public String resolvePath(String path, boolean tryCurrentPath) {\n String realPath = \"\";\n if (tryCurrentPath) {\n realPath = tryExtensionsPath(path);\n // Can't find the file in the active directory.\n if (realPath.isEmpty()) {\n // try to open the file in the same directory as the current file.\n int lastForwardSlash = currentFile().lastIndexOf('/');\n int lastBackwardSlash = currentFile().lastIndexOf('\\\\');\n int lastSlash = Math.max(lastForwardSlash, lastBackwardSlash);\n if (lastSlash != -1) {\n realPath = currentFile().substring(0, lastSlash+1) + path;\n realPath = tryExtensionsPath(realPath);\n }\n }\n }\n \n // Try all search paths\n for (String searchPath: searchPaths) {\n if (!realPath.isEmpty())\n break;\n \n realPath = searchPath + path;\n realPath = tryExtensionsPath(realPath);\n }\n \n return realPath;\n }",
"static File localFile(String path, String name) {\n\t\tFile f = new File(path, name.replace('*', 'X'));\n\t\treturn new File(f.getAbsolutePath()); /* make EVM use user.dir */\n\t}",
"private InputSource filesystemLookup(ResourceLocation matchingEntry) {\n\n String uri = matchingEntry.getLocation();\n // the following line seems to be necessary on Windows under JDK 1.2\n uri = uri.replace(File.separatorChar, '/');\n URL baseURL;\n\n //\n // The ResourceLocation may specify a relative path for its\n // location attribute. This is resolved using the appropriate\n // base.\n //\n if (matchingEntry.getBase() != null) {\n baseURL = matchingEntry.getBase();\n } else {\n try {\n baseURL = FILE_UTILS.getFileURL(getProject().getBaseDir());\n } catch (MalformedURLException ex) {\n throw new BuildException(\"Project basedir cannot be converted to a URL\");\n }\n }\n\n URL url = null;\n try {\n url = new URL(baseURL, uri);\n } catch (MalformedURLException ex) {\n // this processing is useful under Windows when the location of the DTD\n // has been given as an absolute path\n // see Bugzilla Report 23913\n File testFile = new File(uri);\n if (testFile.exists() && testFile.canRead()) {\n log(\"uri : '\"\n + uri + \"' matches a readable file\", Project.MSG_DEBUG);\n try {\n url = FILE_UTILS.getFileURL(testFile);\n } catch (MalformedURLException ex1) {\n throw new BuildException(\n \"could not find an URL for :\" + testFile.getAbsolutePath());\n }\n } else {\n log(\"uri : '\"\n + uri + \"' does not match a readable file\", Project.MSG_DEBUG);\n\n }\n }\n\n InputSource source = null;\n if (url != null && \"file\".equals(url.getProtocol())) {\n String fileName = FILE_UTILS.fromURI(url.toString());\n if (fileName != null) {\n log(\"fileName \" + fileName, Project.MSG_DEBUG);\n File resFile = new File(fileName);\n if (resFile.exists() && resFile.canRead()) {\n try {\n source = new InputSource(Files.newInputStream(resFile.toPath()));\n String sysid = JAXPUtils.getSystemId(resFile);\n source.setSystemId(sysid);\n log(\"catalog entry matched a readable file: '\"\n + sysid + \"'\", Project.MSG_DEBUG);\n } catch (IOException ex) {\n // ignore\n }\n }\n }\n }\n return source;\n }",
"public String find()\n\t{\n\t\tFile f = new File(ampath);\n\t\tString fdir = f.getParent();\n\t\tFile fs = new File (fdir);\n\t\tString cplpath = null;\n\t\tboolean found = false;\n\t\t\n\t\tFile [] files = fs.listFiles();\n\t\t\n\t\tfor (int i=0; i<files.length; i++) {\n\t\t\tif(files[i].getName().equalsIgnoreCase(cplfilename)){\n\t\t\t\tfound = true;\n\t\t\t\tcplpath = files[i].getPath();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//Searching in Subfolder for CPL-File\n\t\t\tif (files[i].isDirectory()) {\n\t\t\t\tFile f2 = new File(files[i].getPath());\n\t\t\t\tFile [] files2 = f2.listFiles();\n\t\t\t\tfor(int j=0; j<files2.length; j++) {\n\t\t\t\t\tif(files2[j].getName().equalsIgnoreCase(cplfilename)){\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\tcplpath = files2[i].getPath();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Returns CPL-File as String\n\t\tif (found == false) {\n\t\t\tSystem.out.println(\"CPL-File not found\");\n\t\t\treturn \"CPL-File not found\";\n\t\t}\n\t\telse {\n\t\t\treturn cplpath;\n\t\t}\n\t\t\n\t}",
"@NotNull\n protected VirtualFile searchForVirtualFileInProject(String filename) {\n Collection<VirtualFile> files = FilenameIndex.getVirtualFilesByName(myProject, filename, GlobalSearchScope.allScope(myProject));\n assertEquals(String.format(\"%s not found.\", filename), 1, files.size());\n return files.iterator().next();\n }",
"public boolean isCaseSensitive() {\n\t\treturn false;\n\t}",
"public DataRow findRowIgnoreCase(int columnIndex, String value) {\n for (DataRow dataRow : dataRows) {\n String columnValue = (String) dataRow.getColumn(columnIndex);\n if (value.equalsIgnoreCase(columnValue)) {\n return dataRow;\n }\n }\n return null;\n }",
"protected ArrayList<Path> find(Path file) {\n\t\tPath name = file.getFileName();\n\t\tif (name != null && matcher.matches(name)) {\n\t\t\tresults.add(file);\n\t\t}\n\t\treturn null;\n\t}",
"@CheckForNull\n FileObject find(@NonNull String filename);",
"public int searchFileContent(String path, String searchString, boolean ignoreCase, boolean skipSubDirectories) {\n\t\tsuccesses.clear();\n\t\tfailures.clear();\n\t\tfinal Path sourcePath = Paths.get(path);\n\t\ttry {\n\t\t\tFiles.walkFileTree(sourcePath, EnumSet.of(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE, new SimpleFileVisitor<Path>() {\n\t\t\t\t\n\t\t\t\t/* (non-Javadoc)\n\t\t\t\t * @see java.nio.file.SimpleFileVisitor#visitFile(java.lang.Object, java.nio.file.attribute.BasicFileAttributes)\n\t\t\t\t */\n\t\t\t\t@Override\n\t\t\t\tpublic FileVisitResult visitFile(Path file,\n\t\t\t\t\t\tBasicFileAttributes attrs) {\n\t\t\t\t\tFileContent fileContent = new FileContent();\n\t\t\t\t\tif(!file.toFile().isDirectory() && !filter.applies(file)) {\n\t\t\t\t\t\tif(fileContent.search(file, searchString, ignoreCase)) {\n\t\t\t\t\t\t\tsuccesses.add(file);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(!skipSubDirectories)\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t\t\telse \n\t\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* (non-Javadoc)\n\t\t\t\t * @see java.nio.file.SimpleFileVisitor#visitFileFailed(java.lang.Object, java.io.IOException)\n\t\t\t\t */\n\t\t\t\t@Override\n\t\t\t\tpublic FileVisitResult visitFileFailed(Path file,\n\t\t\t\t\t\tIOException exc) {\n\t\t\t\t\tfailures.add(file);\n\t\t\t\t\t// return super.visitFileFailed(file, exc);\n\t\t\t\t\tif(!skipSubDirectories)\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t\t\telse \n\t\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(!successes.isEmpty()) {\n\t\t\t\tSystem.out.println(\"Succeeded to search in the following paths:\");\n\t\t\t\tfor(Path p : successes)\n\t\t\t\t\tSystem.out.println(p.toString());\n\t\t\t\tSystem.out.println(\"Matches in total: \" + successes.size());\n\t\t\t} \n\t\t\tif(!failures.isEmpty()) {\n\t\t\t\tSystem.out.println(\"Failed to search in the following paths:\");\n\t\t\t\tfor(Path p : failures)\n\t\t\t\t\tSystem.out.println(p.toString());\n\t\t\t} \n\t\t}\n\t\treturn successes.size();\n\t}",
"@Test\n public void lookupNotRequiringExactMatchSucceedsIfSecureUrlPathContainsUpperCase() {\n createFids(\"/SeCuRE/super/**\", null);\n\n FilterInvocation fi = createFilterInvocation(\"/secure/super/somefile.html\", null);\n\n Collection<ConfigAttribute> response = fids.lookupAttributes(fi.getRequestUrl(), null);\n assertEquals(def, response);\n }",
"@SuppressWarnings(\"squid:S1067\")\n Predicate<GenomePath> getSubstringPredicate(final String query, final boolean matchCase) {\n return genomePath -> query == null\n || query.length() == 0\n || genomePath.getName().toLowerCase(Locale.US).contains(query.toLowerCase(Locale.US)) && !matchCase\n || genomePath.getName().contains(query);\n }",
"private static boolean isIgnorePath(String aPath)\n {\n if (aPath.startsWith(\"/sun\")) return true;\n if (aPath.startsWith(\"/apple\")) return true;\n if (aPath.startsWith(\"/com/sun\")) return true;\n if (aPath.startsWith(\"/com/apple\")) return true;\n if (aPath.startsWith(\"/com/oracle\")) return true;\n if (aPath.startsWith(\"/java/applet\")) return true;\n if (aPath.startsWith(\"/java/awt/dnd\")) return true;\n if (aPath.startsWith(\"/java/awt/im\")) return true;\n if (aPath.startsWith(\"/java/awt/peer\")) return true;\n if (aPath.startsWith(\"/java/beans\")) return true;\n if (aPath.startsWith(\"/java/lang/model\")) return true;\n if (aPath.startsWith(\"/java/nio/channels\")) return true;\n if (aPath.startsWith(\"/java/security\")) return true;\n if (aPath.startsWith(\"/java/util/concurrent\")) return true;\n if (aPath.startsWith(\"/java/util/Spliterators\")) return true;\n if (aPath.startsWith(\"/javax/crypto\")) return true;\n if (aPath.startsWith(\"/javax/net\")) return true;\n if (aPath.startsWith(\"/javax/security\")) return true;\n if (aPath.startsWith(\"/javax/accessibility\")) return true;\n if (aPath.startsWith(\"/javax/imageio\")) return true;\n if (aPath.startsWith(\"/javax/print\")) return true;\n if (aPath.startsWith(\"/javax/sound\")) return true;\n if (aPath.startsWith(\"/javax/swing/b\")) return true;\n if (aPath.startsWith(\"/javax/swing/colorchooser\")) return true;\n if (aPath.startsWith(\"/javax/swing/event\")) return true;\n if (aPath.startsWith(\"/javax/swing/filechooser\")) return true;\n if (aPath.startsWith(\"/javax/swing/plaf\")) return true;\n if (aPath.startsWith(\"/javax/swing/text\")) return true;\n if (aPath.startsWith(\"/javax/swing/tree\")) return true;\n if (aPath.startsWith(\"/javax/swing/undo\")) return true;\n if (aPath.startsWith(\"/jdk\")) return true;\n if (aPath.startsWith(\"/org/omg\")) return true;\n if (aPath.startsWith(\"/org/w3c\")) return true;\n if (aPath.startsWith(\"/META-INF\")) return true;\n\n // If inner class, return false\n if (aPath.contains(\"$\"))\n return true;\n\n // Return true\n return false;\n }",
"@Override\n\tpublic boolean isCaseSensitive(int arg0) throws SQLException {\n\t\treturn false;\n\t}",
"public VRL resolvePathVRL(String path) throws VRLSyntaxException\n\t{\n\t\treturn getLocation().resolvePath(path); \n\t}",
"private static void searchFile(File fileDir) throws Exception {\n String fileName = getFileNameInput();\n File targetFile = new File(fileDir.toString() + \"\\\\\" + fileName);\n boolean fileExists = targetFile.exists();\n if (fileExists) {\n System.out.println(\"File is found on current directory.\");\n } else {\n throw new FileNotFoundException(\"No such file on current directory.\");\n }\n }",
"public static InputStream loadFileAsStream(String fileName) throws FileNotFoundException {\n\n if (fileName == null || fileName.trim().equals(\"\")) { //$NON-NLS-1$\n throw new NullPointerException(Messages.getMessage(\"variableIsNull\", \"fileName\")); //$NON-NLS-1$ //$NON-NLS-2$\n }\n\n logger.trace(\"Searching for {} in file system.\", fileName); //$NON-NLS-1$\n\n File file = new File(fileName);\n if (file.isFile()) {\n // since file is a normal file, return it\n logger.trace(\"File {} found in file system.\", fileName); //$NON-NLS-1$\n return new FileInputStream(file);\n }\n\n // file is not a normal file, try to find it using classloaders\n Enumeration<URL> resources;\n try {\n resources = loadFileUsingClassLoaders(fileName);\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n throw new FileNotFoundException(fileName);\n }\n if (!resources.hasMoreElements()) {\n throw new FileNotFoundException(fileName);\n }\n URL url = resources.nextElement();\n try {\n return url.openStream();\n } catch (IOException e) {\n logger.error(e.getMessage(), e);\n throw new FileNotFoundException(fileName);\n }\n }",
"@NotNull\n protected VirtualFile firstMatchingVirtualFileInProject(String filename) {\n Collection<VirtualFile> files = FilenameIndex.getVirtualFilesByName(myProject, filename, GlobalSearchScope.allScope(myProject));\n assertTrue(String.format(\"Filename %s not found in project\", filename), files.size() > 0);\n return files.iterator().next();\n }",
"public boolean isCaseSensitive(int column) throws SQLException {\n\t\t\treturn false;\n\t\t}",
"String getRealPath(String path);",
"public boolean isCaseSensitive() {\n return this.caseSensitive;\n }",
"java.lang.String getFileLoc();",
"static void searchForFile() {\n\t\ttry {\n\t\t\t// Get the path for the user's current shared and not-shared directories\n\t\t\tFile sharedPath = new File(\"users/\" + username + \"/shared\");\n\t\t\tFile notSharedPath = new File(\"users/\" + username + \"/not-shared\");\n\n\t\t\t// Allow the user to enter the name of the file they want to search for\n\t\t\tSystem.out.println(\"Enter the name of the file you wish to search for followed by Enter\");\n\t\t\tSystem.out.print(\"Your Entry: \");\n\n\t\t\tString fileToSearchFor = input.readLine();\n\n\t\t\t// Create an array of filenames for the shared and not-shared files\n\t\t\tFile[] sharedFiles = sharedPath.listFiles();\n\t\t\tFile[] notSharedFiles = notSharedPath.listFiles();\n\n\t\t\t// Check through the shared files array to see if the user already owns the file and is sharing it\n\t\t\tfor (File file : sharedFiles) {\n\t\t\t\tif (fileToSearchFor.equals(file.getName())) {\n\t\t\t\t\t// If it exists, tell the user and prompt to exit\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"You already own the file: \" + fileToSearchFor);\n\t\t\t\t\tSystem.out.println(\"It is in your shared files.\");\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t// This has been added in order to allow the user to review the results before going back to the main menu\n\t\t\t\t\t// Upon pressing Enter, the main menu will come back up again and ready for a new menu option to be selected\n\t\t\t\t\ttry {\n\t\t\t\t\t\tSystem.out.println(\"Press any key to return\");\n\t\t\t\t\t\tinput.readLine();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.out.println(\"Error! \" + e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check through the not-shared files array to see if the user already owns the file and is not sharing it\n\t\t\tfor (File file : notSharedFiles) {\n\t\t\t\tif (fileToSearchFor.equals(file.getName())) {\n\t\t\t\t\t// If it exists, tell the user and prompt to exit\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"You already own the file: \" + fileToSearchFor);\n\t\t\t\t\tSystem.out.println(\"It is in your non-shared files.\");\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t// This has been added in order to allow the user to review the results before going back to the main menu\n\t\t\t\t\t// Upon pressing Enter, the main menu will come back up again and ready for a new menu option to be selected\n\t\t\t\t\ttry {\n\t\t\t\t\t\tSystem.out.println(\"Press any key to return\");\n\t\t\t\t\t\tinput.readLine();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.out.println(\"Error! \" + e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Otherwise, this means the user does not have the file\n\t\t\t// In this case, send a request to the server via CORBA to see who owns the file\n\t\t\tString[] usersWithFile = server.findFile(fileToSearchFor);\n\t\t\t// If no one owns a file by this name that is available for sharing, let the user know\n\t\t\tif(usersWithFile.length == 0){\n\t\t\t\tSystem.out.println(\"No match was found for: '\"+ fileToSearchFor + \"'\");\n\t\t\t\tSystem.out.println(\"It does not exist, or is not currently being shared.\");\n\t\t\t}\n\t\t\t// Otherwise a match was found\n\t\t\t// Give the user an option to download the file and share it, download the file and keep it in their not-shared directory, or return to the main menu\n\t\t\t// Keep the owner of the file's information hidden from the user\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"A match for : \"+ fileToSearchFor + \" was found.\");\n\t\t\t\tSystem.out.println(\"Would you like to download the file?\");\n\t\t\t\tSystem.out.println(\"\\t[1] | Download And Share The File\");\n\t\t\t\tSystem.out.println(\"\\t[2] | Download And Do Not Share The File\");\n\t\t\t\tSystem.out.println(\"\\t[3] | Return To The Main Menu\");\n\t\t\t\tSystem.out.println(\"--------------------------------------------------------------------\");\n\t\t\t\tSystem.out.print(\"Your Entry: \");\n\t\t\t\tString userEntry = input.readLine();\n\n\t\t\t\t// If the user enters 1, start the download file method with the flag of 1\n\t\t\t\tif(userEntry.equals(\"1\")){\n\t\t\t\t\tdownloadFile(usersWithFile, fileToSearchFor, 1);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// If the user enters 2, start the download file method with the flag of 2\n\t\t\t\telse if (userEntry.equals(\"2\")) {\n\t\t\t\t\tdownloadFile(usersWithFile, fileToSearchFor, 2);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// If the user enters 3, bring them back to the main menu\n\t\t\t\telse if (userEntry.equals(\"3\")){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// Otherwise, they entered something invalid, return to the main menu\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Invalid entry! Returning to the main menu.\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error! : \" + e.getMessage());\n\t\t\treturn;\n\t\t}\n System.out.println();\n\t\t// This has been added in order to allow the user to review the results before going back to the main menu\n\t\t// Upon pressing Enter, the main menu will come back up again and ready for a new menu option to be selected\n try {\n System.out.println(\"Press any key to return\");\n input.readLine();\n } catch (Exception e) {\n System.out.println(\"Error! \" + e.getMessage());\n }\n\t}",
"public final static String normalizePath(String path, boolean caseSensitive) {\t\n\t\t\n\t // Check if the file state names should be case sensitive, if not then just uppercase the whole\n\t // path\n\t \n String normPath = path;\n \n\t if ( caseSensitive == true) {\n\t \n \t\t//\tSplit the path into directories and file name, only uppercase the directories to normalize\n \t\t//\tthe path.\n \n \t\tif ( path.length() > 3) {\n \t\t\t\n \t\t\t//\tSplit the path to seperate the folders/file name\n \t\t\t\n \t\t\tint pos = path.lastIndexOf(FileName.DOS_SEPERATOR);\n \t\t\tif ( pos != -1) {\n \t\t\t\t\n \t\t\t\t//\tGet the path and file name parts, normalize the path\n \t\t\t\t\n \t\t\t\tString pathPart = path.substring(0, pos).toUpperCase();\n \t\t\t\tString namePart = path.substring(pos);\n \t\t\t\t\n \t\t\t\t//\tRebuild the path string\n \t\t\t\t\n \t\t\t\tnormPath = pathPart + namePart;\n \t\t\t}\n \t\t}\n\t }\n\t else {\n\n\t // Uppercase the whole path\n\t \n\t normPath = path.toUpperCase();\n\t }\n\t \n\t\t//\tReturn the normalized path\n\t\t\n\t\treturn normPath;\n\t}",
"public static void findFile() throws IOException {\n File newFile = new File(\"test.txt\");\n FileInputStream stream = new FileInputStream(newFile);\n }",
"public static Path findNonClassPathFile( final String name, final Configuration conf) throws IOException {\r\n\t\tif (name==null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tPath []files = DistributedCache.getLocalCacheFiles(conf);\r\n\t\tif (files==null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tString altName = makeRelativeName(name, conf);\r\n\t\tfor( Path file : files) {\r\n\t\t\tif (name.equals(file.getName())) {\r\n\t\t\t\treturn file;\r\n\t\t\t}\r\n\t\t\tif (altName!=null&&altName.equals(file.getName())) {\r\n\t\t\t\treturn file;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String resolvePath();",
"public FileLocation findFile(int k) {\n RemoteMapper rm = findMapper(k);\n FileLocation fl = null;\n try {\n return rm.lookup(k);\n } catch (RemoteException ex) {\n System.err.println(\"Mapper.findFile remote Exception\");\n }\n\n return fl;\n }",
"public static PathAnchor filesystem(String path) {\n if (path == null) {\n throw new NullPointerException(\"passed path was null\");\n }\n return filesystem(Paths.get(path));\n }",
"public static File loadFileContainingString(String filename, File directory) {\n File[] files = directory.listFiles();\n if (files == null){\n return null;\n }\n for (File f : files) {\n if (f.getName().contains(filename)) {\n return f;\n } else if (f.isDirectory()) {\n File file = loadFileContainingString(filename, f);\n if (file != null) {\n return file;\n }\n }\n }\n return null;\n }",
"@Nullable\n public DocumentFile findFile(@NonNull Context context, @NonNull DocumentFile parent, @NonNull String fileName) {\n List<DocumentFile> result = listDocumentFiles(context, parent, createNameFilterEquals(fileName), false, true, true);\n if (!result.isEmpty()) return result.get(0);\n else return null;\n }",
"public static IPath getComparablePath(IPath path) {\r\n\t\tif (path == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tif (HostOS.IS_WIN32) {\r\n\t\t\treturn new Path(path.toOSString().toLowerCase());\r\n\t\t}\r\n\t\t\r\n\t\treturn path;\r\n\t}",
"@Override\n public Optional<File> getRemappedBinary(String path) {\n if (!SystemInfo.isMac || path.indexOf(File.separatorChar) >= 0) {\n return Optional.empty();\n }\n String shellPath = EnvironmentUtil.getValue(\"PATH\");\n return Optional.ofNullable(\n PathEnvironmentVariableUtil.findInPath(path, shellPath, /* filter= */ null));\n }",
"public static boolean isReverseRoundtripDirRegExpCaseSensitive()\n {\n read_if_needed_();\n \n return _dir_regexp_case_sensitive;\n }",
"String findPhastConsFile(String dirName, String regex) {\n\t\ttry {\n\t\t\tFile dir = new File(dirName);\n\t\t\tfor (File f : dir.listFiles()) {\n\t\t\t\tString fname = f.getCanonicalPath();\n\t\t\t\tif (fname.matches(regex)) return fname;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// Do nothing\n\t\t}\n\n\t\tLog.info(\"Cannot find any file in directory '\" + dirName + \"' matching regular expression '\" + regex + \"'\");\n\t\treturn null;\n\t}",
"public FileSystemEntry getEntry(String path);",
"public void setCaseSensitive( boolean isCaseSensitive )\n {\n this.isCaseSensitive = isCaseSensitive;\n }",
"public boolean isLocalFile(String path) {\n System.out.println(path);\n if (path.contains(\"http://\") || path.contains(\"https://\")) {\n System.out.println(\"no es local\");\n return false;\n }\n System.out.println(\"es local\");\n return true;\n }",
"private String findLine(String line, String search){\n List<String> lines = line.lines().collect(Collectors.toList());\n for (String l: lines) {\n if(l.contains(search)){\n return l;\n }\n }\n return \"\";\n }",
"public static FieldMatcher ignoreCase() {\n return (columnName, recordOneField, recordTwoField) -> {\n //we do not want to do a case-insensitive comparison for the key and for case-sensitive columns\n if (!caseSensitiveColumns.contains(columnName) && !columnName.equals(keyColumn)) {\n return recordOneField.equalsIgnoreCase(recordTwoField);\n } else {\n return recordOneField.equals(recordTwoField);\n }\n };\n }",
"public Vector searchFile(String str){\r\n Vector search = new Vector();\r\n\r\n /* Search corresponding to title */\r\n Vector titleLoc = (Vector) titleHashTable.get(str);\r\n if (titleLoc != null) { // title matches\r\n for(int i=0 ;i < titleLoc.size(); i++){\r\n if(((FileLocation)titleLoc.elementAt(i)).record.isConnected)\r\n search.addElement(titleLoc.elementAt(i));\r\n }\r\n }\r\n\r\n Vector artistLoc = (Vector) artistHashTable.get(str);\r\n if (artistLoc != null) {\r\n for(int i=0 ;i < artistLoc.size();i++){\r\n if(((FileLocation)artistLoc.elementAt(i)).record.isConnected)\r\n search.addElement(artistLoc.elementAt(i));\r\n }\r\n }\r\n\r\n Vector albumLoc = (Vector) albumHashTable.get(str);\r\n if (albumLoc != null) {\r\n for(int i=0 ;i<albumLoc.size();i++){\r\n if(((FileLocation)albumLoc.elementAt(i)).record.isConnected)\r\n search.addElement(albumLoc.elementAt(i));\r\n }\r\n }\r\n\r\n\t\treturn search;\r\n\t}",
"public int doFindText(String find, boolean caseSensitive) {\n int findPosn = sourceCode.getCaretPosition();\n int nextPosn = 0;\n nextPosn = nextIndex(sourceCode.getText(), find, findPosn, caseSensitive);\n if (nextPosn >= 0) {\n sourceCode.requestFocus(); // guarantees visibility of the blue highlight \n sourceCode.setSelectionStart(nextPosn); // position cursor at word start\n sourceCode.setSelectionEnd(nextPosn + find.length());\n sourceCode.setSelectionStart(nextPosn); // position cursor at word start\n return TEXT_FOUND;\n } else {\n return TEXT_NOT_FOUND;\n }\n }",
"ResourceLocation resolve(String path);",
"@Test\n public void testContainStringSimpleCase() throws Exception {\n Search search = mock(Search.class);\n Mockito.when(search.containsString((Pattern) any(), (Path) any())).thenCallRealMethod();\n Mockito.when(search.containsString(anyString(), (Path) any())).thenCallRealMethod();\n\n Path path = Paths.get(getClass().getResource(\"/containsString.test\").toURI());\n assertTrue(search.containsString(\"occurrence\", path));\n assertFalse(search.containsString(\"non-existent-string\", path));\n }",
"public FileInputStream openFileInput(final String path)\n throws java.io.FileNotFoundException {\n return GDFileSystem.openFileInput(path);\n }",
"boolean safeIsFile(FsPath path);",
"public SearchContext startSearch(SrvSession sess, TreeConnection tree, String searchPath, int attrib)\n throws FileNotFoundException {\n\n // Access the JDBC context\n\n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n\n // Check if the database is online\n \n if ( dbCtx.getDBInterface().isOnline() == false)\n throw new FileNotFoundException( \"Database is offline\");\n \n // Prepend a leading slash to the path if not on the search path\n \n if ( searchPath.startsWith(\"\\\\\") == false)\n searchPath = \"\\\\\" + searchPath;\n \n // Get the directory id for the last directory in the path\n \n int dirId = findParentDirectoryId(dbCtx,searchPath,true);\n if ( dirId == -1)\n throw new FileNotFoundException(\"Invalid path\");\n\n // Start the search\n \n SearchContext search = null;\n \n try {\n \n // Check if the search path is a none wildcard search, the file information may be in the\n // state cache\n \n if ( WildCard.containsWildcards( searchPath) == false) {\n \n // Check if there is a file state for the search path\n \n FileState searchState = getFileState( searchPath, dbCtx, false);\n if ( searchState != null && searchState.fileExists() == true) {\n \n // Check if the file state has the file information attached\n \n DBFileInfo finfo = (DBFileInfo) searchState.findAttribute(FileState.FileInformation);\n \n if ( finfo != null) {\n \n // Create a single file search context using the cached file information\n \n search = new CachedSearchContext( finfo);\n \n // DEBUG\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"DB StartSearch using cached file information, path=\" + searchPath + \", info=\" + finfo);\n }\n }\n }\n \n // Start the search via the database interface, if the search is not valid\n \n if ( search == null) {\n \n // Start the search\n\n DBSearchContext dbSearch = dbCtx.getDBInterface().startSearch(dirId, searchPath, attrib, DBInterface.FileAll, -1);\n \n // Check if files should be marked as offline\n \n dbSearch.setMarkAsOffline( dbCtx.hasOfflineFiles());\n dbSearch.setOfflineFileSize( dbCtx.getOfflineFileSize());\n \n search = dbSearch; \n }\n }\n catch ( DBException ex) {\n throw new FileNotFoundException();\n }\n\n // Return the search context\n\n return search;\n }",
"@Test(expected = IOException.class)\n public void testContainStringNoFileFound() throws Exception {\n Search search = mock(Search.class);\n Mockito.when(search.containsString(anyString(), (Path) any())).thenCallRealMethod();\n Mockito.when(search.containsString((Pattern) any(), (Path) any())).thenCallRealMethod();\n\n Path path = Paths.get(\"/non-existing-file\");\n assertTrue(search.containsString(\"occurrence\", path));\n }",
"public void searchFile(String fname) {\n File file = new File(fname);\n try {\n BufferedReader br = new BufferedReader(new FileReader(file));\n String s;\n while ((s = br.readLine()) != null) { \n //Search each line for at least 1 match ogf the regex\n searchLine(s);\n }\n } catch (FileNotFoundException e) { \n System.out.println(\"File \" + fname + \" not found\");\n } catch (IOException e) { \n e.printStackTrace();\n }\n }",
"File findConfigFile(String path) {\n\t\tClassLoader cl = PropertiesUtil.class.getClassLoader();\n\t\tURL url = cl.getResource(path);\n\t\tif (url != null) {\n\t\t\treturn new File(url.getFile());\n\t\t}\n\n\t\turl = ClassLoader.getSystemResource(path);\n\t\tif (url != null) {\n\t\t\treturn new File(url.getFile());\n\t\t}\n\n\t\tFile file = new File(path);\n\t\tif (file.exists()) {\n\t\t\treturn file;\n\t\t}\n\n\t\tString newPath = \"conf\" + (path.startsWith(File.separator) ? \"\" : \"/\")\n\t\t\t\t+ path;\n\t\turl = ClassLoader.getSystemResource(newPath);\n\t\tif (url != null) {\n\t\t\treturn new File(url.getFile());\n\t\t}\n\n\t\turl = cl.getResource(newPath);\n\t\tif (url != null) {\n\t\t\treturn new File(url.getFile());\n\t\t}\n\n\t\tnewPath = \"conf\"\n\t\t\t\t+ (path.startsWith(File.separator) ? \"\" : File.separator)\n\t\t\t\t+ path;\n\t\tfile = new File(newPath);\n\t\tif (file.exists()) {\n\t\t\treturn file;\n\t\t}\n\n\t\tnewPath = System.getenv(\"CATALINA_HOME\");\n\t\tif (newPath == null) {\n\t\t\tnewPath = System.getenv(\"CATALINA_BASE\");\n\t\t}\n\n\t\tif (newPath == null) {\n\t\t\tnewPath = System.getProperty(\"catalina.home\");\n\t\t}\n\n\t\tif (newPath == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfile = new File(newPath + File.separator + \"conf\" + File.separator\n\t\t\t\t+ path);\n\t\tif (file.exists()) {\n\t\t\treturn file;\n\t\t}\n\n\t\treturn null;\n\t}",
"public T findByPath(String path) throws DataAccessException;",
"public FileObject findResource(String name) {\n Enumeration en = getFileSystems ();\n while (en.hasMoreElements ()) {\n FileSystem fs = (FileSystem)en.nextElement ();\n FileObject fo = fs.findResource(name);\n if (fo != null) {\n // object found\n return fo;\n }\n }\n return null;\n }",
"public static String get(String path)\n {\n try\n {\n URI uri = new URI(path);\n String fragment = uri.getFragment();\n if (fragment != null)\n {\n File file = new File(fragment);\n if (file.exists())\n return file.toString();\n }\n\n // remove the fragment\n path = uri.getPath();\n }\n catch (URISyntaxException e)\n {\n // do nothing... fall through to the remaining code\n }\n\n // otherwise, try to load from full path\n\n if (cachedFiles == null)\n return null;\n\n for (Path cachedFile : cachedFiles)\n {\n if (cachedFile.toString().endsWith(path))\n {\n return cachedFile.toString();\n }\n if (cachedFile.getParent().toString().endsWith(path))\n {\n return cachedFile.toString();\n }\n }\n\n return null;\n }",
"public final void setPath(String path, boolean caseSensitive) {\n\n\t\t//\tSplit the path into directories and file name, only uppercase the directories to normalize\n\t\t//\tthe path.\n\n\t\tm_path = normalizePath(path, caseSensitive);\t\t\n\t}",
"static int indexOf(String src, String sub, int start, boolean caseSensitive) {\n if (caseSensitive) {\n int pos = src.indexOf(sub, start);\n return pos;\n } else {\n for (int pos=start; pos<=src.length()-sub.length(); ++pos) {\n boolean match = true;\n for (int i=0; i<sub.length(); ++i) {\n if (Character.toLowerCase(src.charAt(pos+i))!=Character.toLowerCase(sub.charAt(i))) {\n match = false;\n break;\n }\n }\n if (match)\n return pos;\n }\n return -1;\n }\n }",
"public NameSurferEntry findEntry(String name) {\n\t\tchar ch = name.charAt(0);\n\t\tif(Character.isLowerCase(ch) == true) {\n\t\t\tch = Character.toUpperCase(ch);\n\t\t}\n\t\tString otherLetters = name.substring(1);\n\t\totherLetters = otherLetters.toLowerCase();\n\t\tname = ch + otherLetters;\n\t\tif (nameFromDatabase.containsKey(name)) {\n\t\t\treturn nameFromDatabase.get(name);\n\t\t}\t\t\t\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}",
"List<Item> findByNameContainingIgnoreCase(String name);",
"protected boolean isAttributeCaseSensitive() {\n return true;\n }",
"public static Path findItemInCache( final String name, final Configuration conf) throws IOException {\r\n\t\tif (name==null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tPath result = null;\r\n\t\tresult = findClassPathFile(name,conf);\r\n\t\tif (result!=null) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\tresult = findNonClassPathFile(name,conf);\r\n\t\tif (result!=null) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\tresult = findClassPathArchive(name,conf);\r\n\t\tif (result!=null) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\tresult = findNonClassPathArchive(name,conf);\r\n\t\tif (result!=null) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public T casePathNameCS(PathNameCS object) {\r\n return null;\r\n }",
"public static Optional<File> dataFile(final String fileName)\n {\n final File file = new File(getDataDirectory(), fileName);\n\n Log.infoWhenDev(\"Looking up file in hierarchy: {0} ...\", file.toString());\n final Optional<File> result = file.exists() ? Optional.of(file) : Optional.empty();\n Log.infoWhenDev(\"...{0} was {1}\", file.toString(), result.isPresent() ? \"found.\" : \"not found!\");\n\n return result;\n }",
"@Override\n public common.FileLocation lookup(int key) throws RemoteException {\n common.FileLocation fl = map.get(key);\n if (fl == null) {\n printAct(\">requested of key: \" + key + \", returned null\");\n } else {\n printAct(\">requested of key: \" + key + \", returned: \" + fl);\n }\n return fl;\n }",
"@Override\r\n\t\tpublic boolean accept(File dir, String name) {\n\t\t\treturn indexFilenames.contains(name.toLowerCase());\r\n\t\t}",
"@objid (\"116a5759-3df1-4c8b-bd9e-e521507f07e6\")\r\n public String searchFile() {\r\n String nomFichier = this.dialog.open();\r\n if ((nomFichier != null) && (nomFichier.length() != 0)) {\r\n this.currentFile = new File(nomFichier);\r\n this.text.setText(nomFichier);\r\n }\r\n return this.text.getText();\r\n }",
"private boolean isMatch(FilePath value, String filter) {\n return value.toString().toLowerCase()\n .contains(filter.toLowerCase()); // TODO: optimize or change (check file extension, etc)\n }",
"protected abstract InputStream getFile(final String path);",
"public interface FileLocator {\n\n /**\n * Returns the file corresponding to the filename (or path) or\n * <code>null</code> if locator can't find the file.\n *\n * @param filename name of the file\n * @return the file corresponding to the filename (or path) or\n * <code>null</code> if locator can't find the file\n */\n @CheckForNull\n FileObject find(@NonNull String filename);\n\n }",
"void path(String path);",
"void path(String path);",
"@Override\n public String search(String word) {\n return search(word, root);\n }",
"private void testSimplePropFindWithNonLatin(String pathWs) throws Exception\n {\n // prepare file name and content\n String encodedfileName = \"%e3%81%82%e3%81%84%e3%81%86%e3%81%88%e3%81%8a\";\n String decodedfileName = URLDecoder.decode(encodedfileName, \"UTF-8\");\n String content = TestUtils.getFileContent();\n TestUtils.addContent(session, decodedfileName, new ByteArrayInputStream(content.getBytes()), WEBDAV_NT_FILE, \"\");\n TestUtils.addNodeProperty(session, decodedfileName, WEBDAV_AUTHOR_PROPERTY, AUTHOR);\n\n ContainerResponse response =\n service(WebDAVMethods.PROPFIND, pathWs + \"/\" + encodedfileName, \"\", null, allPropsXML.getBytes());\n\n // serialize response entity to string\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n PropFindResponseEntity entity = (PropFindResponseEntity)response.getEntity();\n entity.write(outputStream);\n String resp = outputStream.toString(\"UTF-8\");\n\n assertTrue(resp.contains(encodedfileName));\n assertTrue(resp.contains(decodedfileName));\n }",
"@Override\n public InputStream findResource(String filename)\n {\n InputStream resource = null;\n try\n {\n Path scriptRootPath = Files.createDirectories(getScriptRootPath(side));\n Path scriptPath = scriptRootPath.resolve(filename).toAbsolutePath();\n resource = Files.newInputStream(scriptPath, StandardOpenOption.READ);\n } catch (IOException e)\n {\n resource = super.findResource(filename);\n }\n return resource;\n }",
"public boolean searchFile(FileObject file)\n throws IllegalArgumentException;",
"public abstract T findByName(String name) ;",
"protected abstract HashMap<String, InputStream> getFilesByPath(\n\t\t\tfinal String path);",
"public int replaceFileContent(String path, String searchString, String replacementString, boolean ignoreCase, boolean skipSubDirectories) {\n\t\tsuccesses.clear();\n\t\tfailures.clear();\n\t\tfinal Path sourcePath = Paths.get(path);\n\t\ttry {\n\t\t\tFiles.walkFileTree(sourcePath, EnumSet.of(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE, new SimpleFileVisitor<Path>() {\n\n\t\t\t\t/* (non-Javadoc)\n\t\t\t\t * @see java.nio.file.SimpleFileVisitor#visitFile(java.lang.Object, java.nio.file.attribute.BasicFileAttributes)\n\t\t\t\t */\n\t\t\t\t@Override\n\t\t\t\tpublic FileVisitResult visitFile(Path file,\n\t\t\t\t\t\tBasicFileAttributes attrs) {\n\t\t\t\t\tFileContent fileContent = new FileContent();\n\t\t\t\t\tif(!file.toFile().isDirectory() && !filter.applies(file)) {\n\t\t\t\t\t\tfileContent.replace(file, searchString, replacementString, ignoreCase);\n\t\t\t\t\t\tsuccesses.add(file);\n\t\t\t\t\t}\n\t\t\t\t\tif(!skipSubDirectories)\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t\t\telse \n\t\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* (non-Javadoc)\n\t\t\t\t * @see java.nio.file.SimpleFileVisitor#visitFileFailed(java.lang.Object, java.io.IOException)\n\t\t\t\t */\n\t\t\t\t@Override\n\t\t\t\tpublic FileVisitResult visitFileFailed(Path file,\n\t\t\t\t\t\tIOException exc) {\n\t\t\t\t\tfailures.add(file);\n\t\t\t\t\t// return super.visitFileFailed(file, exc);\n\t\t\t\t\tif(!skipSubDirectories)\n\t\t\t\t\t\treturn FileVisitResult.CONTINUE;\n\t\t\t\t\telse \n\t\t\t\t\t\treturn FileVisitResult.SKIP_SUBTREE;\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(!successes.isEmpty()) {\n\t\t\t\tSystem.out.println(\"Succeeded to replace \" + searchString + \" by \" + replacementString + \" in the following paths:\");\n\t\t\t\tfor(Path p : successes)\n\t\t\t\t\tSystem.out.println(p.toString());\n\t\t\t\tSystem.out.println(\"Replacements in total: \" + successes.size());\n\t\t\t} \n\t\t\tif(!failures.isEmpty()) {\n\t\t\t\tSystem.out.println(\"Failed to replace \" + searchString + \" by \" + replacementString + \" in the following paths:\");\n\t\t\t\tfor(Path p : failures)\n\t\t\t\t\tSystem.out.println(p.toString());\n\t\t\t} \n\t\t}\n\t\treturn successes.size();\n\t}",
"public abstract String filterFileName(final String fileName);",
"private static boolean findKeyWord(String str, String kw, boolean caseSensitive) {\r\n\t\t\r\n\t\tif(str.isEmpty() || kw.isEmpty()) {\r\n\t\t\tSystem.out.println(\"One of your input lines was blank. Returning false.\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif(str.length() < kw.length()) {\r\n\t\t\tSystem.out.println(\"KW longer than str. Returning false.\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif(!caseSensitive) {\r\n\t\t\tif(str.contains(kw)) {\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tString str1 = str.toLowerCase();\r\n\t\t\tString kw1 = str.toLowerCase();\r\n\t\t\tif(str1.contains(kw1)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\t\r\n\t\treturn false;\r\n\t}",
"public static Optional<String> dataFilePathBySite(final Site site, final String fileName)\n {\n // get path relative to program root\n final Optional<File> file = dataFileBySite(site, fileName);\n if (file.isPresent())\n {\n final String normalizedDataDirectoryPath = new File(getDataDirectory()).getPath();\n final String escapedNormalizedDirectoryPath = Pattern.quote(normalizedDataDirectoryPath);\n final String dataFilePathWithoutDataDirectory = file.get().getPath().replaceFirst(escapedNormalizedDirectoryPath, \"\");\n final String dataFilePathWithoutLeadingSlash = dataFilePathWithoutDataDirectory.substring(1);\n\n return Optional.of(dataFilePathWithoutLeadingSlash);\n }\n\n // file not found\n return Optional.empty();\n }",
"String getExternalPath(String path);",
"public static boolean Java_find(File dir, String name) {\n boolean flag = false;\n // TODO: find files\n File[] list = dir.listFiles();\n FileOperation.listOfFiles = new ArrayList<String>();\n FileOperation.listOfMatching = new ArrayList<String>();\n listOfAllFiles(dir);\n for(String filename:FileOperation.listOfFiles){\n if(filename.contains(name)){\n flag=true;\n listOfMatching.add(filename);\n }\n }\n return flag;\n }",
"OfBizUser getCaseInsensitive(long directoryId, String userName);",
"public void myMethod() throws FileNotFoundException {\n\t\ttry {\n\t\tsoccer = new FileInputStream(\"soccer.txt\");\n\t\t} catch (FileNotFoundException f) {//checked exception handled here\n//\t\t\tf.printStackTrace();\n\t\tSystem.out.println(\"file not found\");//throw fnfe; //this needs to be handled or declared\n\t\t}\n\t\t}",
"private static String verifyPath(String fileOrDir) {\n if (!new File(fileOrDir).exists()) {\n if (fileOrDir.startsWith(File.separator) || fileOrDir.startsWith(\"\\\\\") || fileOrDir.startsWith(\"/\")) {\n fileOrDir = systemDataDirectory + fileOrDir;\n } else {\n fileOrDir = systemDataDirectory + File.separator + fileOrDir;\n }\n }\n return fileOrDir;\n }"
] |
[
"0.5647945",
"0.5598765",
"0.5537506",
"0.5339665",
"0.5290448",
"0.528189",
"0.5242377",
"0.5166599",
"0.51586324",
"0.5108696",
"0.50976676",
"0.50869393",
"0.5075394",
"0.5013348",
"0.4982418",
"0.4981381",
"0.49718192",
"0.49564645",
"0.49371985",
"0.4930995",
"0.49003035",
"0.48949736",
"0.4887999",
"0.48812893",
"0.4859766",
"0.48595077",
"0.48569945",
"0.48382384",
"0.47992626",
"0.4793078",
"0.47908878",
"0.4779496",
"0.47765094",
"0.4773164",
"0.4771867",
"0.4766399",
"0.47546536",
"0.47222245",
"0.4710511",
"0.46938992",
"0.4693241",
"0.4674959",
"0.4667138",
"0.46480197",
"0.46450776",
"0.46321225",
"0.46144748",
"0.46121016",
"0.46102718",
"0.46061862",
"0.46030316",
"0.45925784",
"0.45846486",
"0.45808813",
"0.45799842",
"0.45680183",
"0.45641285",
"0.45489916",
"0.45409554",
"0.45405188",
"0.45390636",
"0.4528244",
"0.45240873",
"0.4519706",
"0.45146766",
"0.45094877",
"0.45088685",
"0.4484766",
"0.4478203",
"0.44771436",
"0.44690645",
"0.4457338",
"0.4457016",
"0.44553402",
"0.4446814",
"0.44411707",
"0.44289097",
"0.4423221",
"0.4419924",
"0.4412487",
"0.44107732",
"0.44099617",
"0.43920445",
"0.4390693",
"0.4390693",
"0.4387272",
"0.43854436",
"0.43816596",
"0.43763185",
"0.43743294",
"0.43727064",
"0.43600488",
"0.43537423",
"0.43532994",
"0.43510464",
"0.43426076",
"0.43356347",
"0.43350586",
"0.43346533",
"0.43334025"
] |
0.7434402
|
0
|
Search for a order by its id
|
public Order findOne(Integer id) {
log.info("Request to finde Order : " + id);
return orders.stream().filter(order -> order.getOrderId().equals(id)).findFirst().get();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static ru.terralink.mvideo.sap.Orders find(long id)\n {\n String intervalName = null;\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n intervalName = \"Orders.find()\";\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().startInterval(intervalName, com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.PersistenceRead);\n }\n try\n {\n Object[] keys = new Object[]{id};\n return (ru.terralink.mvideo.sap.Orders)(DELEGATE.findEntityWithKeys(keys));\n }\n finally\n {\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().stopInterval(intervalName);\n }\n }\n }",
"Order getByID(String id);",
"Order getOrder(int id) throws ServiceException;",
"public Order getOrderById(long orderId);",
"ClOrderInfo selectByPrimaryKey(String orderId);",
"@Override\n\tpublic OrderDO findById(String id) {\n\t\treturn null;\n\t}",
"OrderDTO findBy(String id);",
"@Override\n\tpublic WxOrder queryOrderById(Integer id) {\n\t\treturn orderMapper.queryOrderById(id);\n\t}",
"public Orderdetail findById(String id) {\n\t\treturn null;\r\n\t}",
"OrderDetailBean getSearchOrderById(long orderIdi,String userLogin,int paymenttype) throws SQLException, Exception, RemoteException;",
"@RequestMapping(value=\"/searchorder\",method=RequestMethod.GET)\r\n\tpublic OrderBean searchByOrderId(String id)throws SearchException {\r\n\t\treturn service.searchOrderById(id);\t\r\n\t\t\r\n}",
"@Override\n\tpublic Order findById(int id) {\n\t\treturn null;\n\t}",
"NjOrderWork2 selectByPrimaryKey(String id);",
"Order find(Long id);",
"@Override\n\tpublic Forge_Order_Detail findById(Serializable id) {\n\t\treturn null;\n\t}",
"Order requireById(Long orderId);",
"public OrderItem findOrderItemById(int id)\n\t{\n\t\tOrderItem orderIt=orderItemDAO.findById(id);\n\t\tif(orderIt==null)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t \"Id-ul nu exista!\",\n\t\t\t\t \"Update error\",\n\t\t\t\t JOptionPane.ERROR_MESSAGE);\n\t\t\tthrow new NoSuchElementException(\"OrderItem=ul cu id-ul:\"+id+\" nu a fost gasit\");\n\t\t}\n\t\treturn orderIt;\n\t}",
"public OrderDetail getOrderDetail(final String id);",
"public List<OrderItem> searchOrderItem(int idOrderItem) throws SQLException, Exception {\n\n List<OrderItem> lista = new ArrayList<OrderItem>();\n String query = \"SELECT * FROM order_Item WHERE id_Order_Item = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n st.setInt(1, idOrderItem);\n\n ResultSet rs = st.executeQuery(); //Execute the select\n\n while(rs.next()) {\n OrderItem oi = new OrderItem();\n\n oi.setIdOrderItem(rs.getInt(\"id_Order_Item\"));\n oi.setAmount(rs.getInt(\"amount\"));\n oi.setProductIdProduct(rs.getInt(\"product_id_Product\"));\n oi.setOrderIdItem(rs.getInt(\"order_id_Order\"));\n\n lista.add(oi);\n \n }\n\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n return lista;\n }",
"OrderDetails selectByPrimaryKey(Integer id);",
"@Override\n\tpublic OrderEntity findOneById(Long id) {\n\t\treturn oder.getById(id);\n\t}",
"@Transactional(readOnly = true)\n public List<RoworderDTO> findBySOrderId(Long id) {\n\n Object[] plop=roworderRepository.findAll().stream()\n .map(roworderMapper::toDto).toArray();\n ArrayList<RoworderDTO> sorders= new ArrayList<RoworderDTO>();\n log.debug(\"findBySOrderId id : {}\",id);\n log.debug(\"findBySOrderId plop.length : {}\",plop.length);\n for (int i=0;i< plop.length;i++){\n log.debug(\"findBySOrderId plop[i].id : {}\",plop.length);\n log.debug(\"findBySOrderId plop[i].orderid : {}\",((RoworderDTO)plop[i]).getSorderId());\n log.debug(\"findBySOrderId plop[i].tostring : {}\",((RoworderDTO)plop[i]).toString());\n log.debug(\"findBySOrderId if : {}\",id.equals(((RoworderDTO)plop[i]).getSorderId()));\n if(id.equals(((RoworderDTO)plop[i]).getSorderId())){\n log.debug(\"plop : {}\",(RoworderDTO) plop[i]);\n sorders.add((RoworderDTO) plop[i]);\n }\n }\n return sorders;\n }",
"public List<Order> findOrder(int orderId) {\n\t\tList<Order> orders=new ArrayList<Order>();\n\t\tQuery query=em.createQuery(\"from Order where order_Id=:orderId\"+\" and block_id is null\");\n\t\tquery.setParameter(\"orderId\",orderId);\n\t\t//System.out.println(query);\n\t\torders=query.getResultList();\n\t\t//System.out.println(orders.get(0));\n\n\t\treturn orders;\n\n\t}",
"public abstract CustomerOrder findOne(Long id);",
"public Order findOrder(String orderID) {\r\n\t\tfor(Order o : orders.values()) {\r\n\t\t\tif(o.getOrderID().equals(orderID)) {\r\n\t\t\t\treturn o;\r\n\t\t\t}\r\n\t\t} return null; \r\n\t}",
"@GetMapping(\"/{id}\")\r\n\tpublic Order getOrderbyId(@PathVariable(value = \"id\") int id) {\r\n\t\treturn this.orderRepo.findById(id)\r\n\t\t\t\t.orElseThrow(()-> new ResourceNotFoundException(\"order does not exist\"));\r\n\t}",
"Order getOrder(String orderId) throws OrderBookOrderException;",
"Orderall selectByPrimaryKey(String orderid);",
"@Override\r\n\tpublic Order FindById(int IdOrder) {\n\t\treturn em.find(Order.class, IdOrder);\r\n\t}",
"Order findById(Long id);",
"public List<OrderDetail> getOrderDetailByOrder(Long orderId);",
"@Test\n public void getOrderByIdTest() {\n Long orderId = 10L;\n Order response = api.getOrderById(orderId);\n Assert.assertNotNull(response);\n Assert.assertEquals(10L, response.getId().longValue());\n Assert.assertEquals(10L, response.getPetId().longValue());\n Assert.assertEquals(1, response.getQuantity().intValue());\n\n verify(exactly(1), getRequestedFor(urlEqualTo(\"/store/order/10\")));\n }",
"@Override\n\tpublic List<OrderDetailsEntity> findBuyOrderId(Long id) {\n\t\treturn oderDet.findAllBuyOrderId(id);\n\t}",
"OrderPO selectByPrimaryKey(Integer id);",
"ExchangeOrder selectByPrimaryKey(String id);",
"@Override\r\n\tpublic OrderItem getOrderItem(int id) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tOrderItem order = (OrderItem) session.get(OrderItem.class,id);\r\n\t\treturn order;\r\n\r\n\t}",
"@Transactional(readOnly = true)\n public Optional<OrderItems> findOne(Long id) {\n log.debug(\"Request to get OrderItems : {}\", id);\n return orderItemsRepository.findById(id);\n }",
"@Override\n\tpublic RechargeOrder getByOrderID(String orderId) {\n\t\treturn null;\n\t}",
"BusnessOrder selectByPrimaryKey(Integer id);",
"@Override\n\tpublic OrderEntity findOneByAccountId(Long id) {\n\t\treturn oder.findOneByAccountId(id);\n\t}",
"@GET\n\t@Path(\"{id}\")\n\tpublic Response getOrder(@PathParam(\"id\") String id) {\n\t\t String orderJSON = null;\n\t\t try {\n\t\t \torderJSON = backend.getOrder(id);\n\t\t \t// returns a JSON string based on a UUID\n\t\t } catch ( NotFoundException e) {\n\t\t \treturn Response.status(404).entity(id).build();\n\t\t }\n\t\t return Response.status(200).entity(orderJSON).build();\n\t}",
"@Override\n\t@Transactional\n\tpublic Optional<Order> getOrderById(Long id) {\n\t\tOrder order = repository.get(id, Order.class);\n\t\treturn Optional.of(order);\n\t}",
"OrderDetail selectByPrimaryKey(String detailId);",
"Optional<Order> findById(Long orderId);",
"@Override\r\n\tpublic Order getOrderById(String orderId) {\n\t\treturn null;\r\n\t}",
"public Order readOrder(Long id) {\n\t\tSystem.out.println(\"ReadOrder\" + id);\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT * FROM orders WHERE id = \" + id);) {\n\t\t\tresultSet.next();\n\t\t\treturn modelFromResultSet(resultSet);\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn null;\n\t}",
"public JSONObject fetchOrder(long orderId) throws Exception;",
"public Order find_Order(Integer order_id, Integer branch_id) {\n return order_dao.find(order_id, branch_id);\n }",
"Optional<Order> findByUserId(long userId);",
"public List<OrderItem> searchOrderIdOrder(int OrderIdOrder) throws SQLException, Exception {\n\n List<OrderItem> lista = new ArrayList<OrderItem>();\n String query = \"SELECT order_Item.*, product.*, category.* FROM order_Item, product, category WHERE order_Item.product_id_Product = product.id_Product AND product.category_id_Category = category.id_Category AND order_Item.order_id_Order = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n st.setInt(1, OrderIdOrder);\n\n ResultSet rs = st.executeQuery(); //Execute the select\n\n while(rs.next()) {\n OrderItem oi = new OrderItem();\n\n oi.setIdOrderItem(rs.getInt(\"id_Order_Item\"));\n oi.setAmount(rs.getInt(\"amount\"));\n oi.setProductIdProduct(rs.getInt(\"product_id_Product\"));\n oi.setOrderIdItem(rs.getInt(\"order_id_Order\"));\n\n oi.setIdProduct(rs.getInt(\"id_Product\"));\n oi.setCategoryIdCategory(rs.getInt(\"category_id_Category\"));\n oi.setColor(rs.getString(\"color\"));\n oi.setFinishingProcess(rs.getString(\"finishing_Process\"));\n oi.setCubaType(rs.getString(\"cuba_Type\"));\n oi.setDescription(rs.getString(\"description\"));\n oi.setStock(rs.getInt(\"stock\"));\n oi.setUnitaryValue(rs.getDouble(\"unitary_Value\"));\n oi.setImageLink(rs.getString(\"image_Link\"));\n\n oi.setIdCategory(rs.getInt(\"id_Category\"));\n oi.setCategory(rs.getString(\"category\"));\n\n lista.add(oi);\n \n }\n\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n return lista;\n }",
"TRefundOrder selectByPrimaryKey(String refundorderid);",
"@Override\n\tpublic OrderDetail getById(String id) {\n\t\tOrderDetail detail = orderDetailDao.getById(id);\n\t\treturn detail;\n\t}",
"public Order get(int id) {\n\t\treturn orderDao.get(id);\n\t}",
"private Order getOrderWithId(int orderId) {\n\t\tfor (Order order : acceptedOrders) {\n\t\t\tif (order.getOrderId() == orderId)\n\t\t\t\treturn order;\n\t\t}\n\t\tfor (Order order : newOrders) {\n\t\t\tif (order.getOrderId() == orderId)\n\t\t\t\treturn order;\n\t\t}\n\n\t\t// Es wurde keine Order in dem OrderPool gefunden, die mit der OrderId\n\t\t// vom Spieler übereinstimmt.\n\t\tSystem.err\n\t\t\t\t.println(\"Die OrderId der Order ist nicht im PlayerOrderPool vorhanden\");\n\t\treturn null;\n\t}",
"@Override\n\tpublic Orderi get(Integer id) {\n\t\t\n\t\treturn (Orderi)getHibernateTemplate().get(Orderi.class, id);\n\t}",
"public List<PurchaseOrderLine> findByOrderId(String orderId);",
"public List<Map<String, Object>> getOrder(String id);",
"@Override\n\tpublic HsExchangeOrder selectByPrimaryKey(HsExchangeOrder order) {\n\t\treturn hsExchangeOrderDbService.selectByPrimaryKey(order.getId());\n\t}",
"@GetMapping(\"/view-order/{id}\")\n\tpublic ResponseEntity<Object> getOrderById(@PathVariable Long id) throws OrderNotFoundException {\n\t\tLOGGER.info(\"view-Order URL is opened\");\n\t\tLOGGER.info(\"viewOrder() is initiated\");\n\t\tOrderDTO orderDTO = orderService.getOrderById(id);\n\t\tLOGGER.info(\"viewOrder() has executed\");\n\t\treturn new ResponseEntity<>(orderDTO, HttpStatus.OK);\n\t}",
"public Shoporder GetOrderById(String orderId) {\n\t\treturn mapper.GetOrderById(orderId);\n\t}",
"public Song searchById(String id) {\n Song selectedSong = null;\n\n for (int index = 0; index < this.songs.size(); index++) {\n if (this.songs.get(index).getId().equals(id)) {\n this.currentSongIndex = index;\n selectedSong = this.songs.get(index);\n }\n }\n\n return selectedSong;\n }",
"public List<OrderItems> getAllOrderItemsByOrderId(int orderId){\n\t\tSystem.out.println(\"service\");\n\t\tList<OrderItems> orderItemsRecords = orderItemsRepo.getAllOrderItemsByOrderId(orderId);\n\t\tList<OrderItems> orderItems= new ArrayList();\n\t\tfor(OrderItems items: orderItemsRecords) \n\t\t\tif(items.getOrders().getOrderId() == orderId)\n\t\t\t\torderItems.add(items);\t\t\n\t\tSystem.out.println(orderItems);\n\t\treturn orderItems;\t\n\t}",
"private int searchId(String id){\n\t\tint index = -1; // -1(존재안함)\n\t\t\n\t\tfor(int i = 0; i < list.size(); i++){\n\t\t\tif(id.equals(list.get(i).getId())){\n\t\t\t\t//stu = list.get(i);\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\t\t\t\t\n\t\treturn index;\n\t}",
"@Override\r\n\tpublic OrderInfo selectOrderInfoById(int so_id) {\n\t\treturn orderInfoDao.selectOrderInfoById(so_id);\r\n\t}",
"public List<Orders> findOrder(Map<String, Object> params);",
"public Order readOrder(Long id)\n {\n Long customerID = null;\n List<Item> orderItems = new ArrayList<>();\n\n String sql = \"SELECT customerID FROM orders WHERE id = \" + id;\n try (Connection connection = DBUtils.getInstance().getConnection();\n Statement statement = connection.createStatement();\n ResultSet resultSet = statement.executeQuery(sql))\n {\n resultSet.next();\n customerID = resultSet.getLong(\"customerID\");\n }\n catch (Exception e)\n {\n LOGGER.debug(e);\n LOGGER.error(e.getMessage());\n }\n\n sql = \"SELECT items.* FROM order_items LEFT JOIN items ON order_items.itemID = items.id WHERE orderID = \" + id;\n try (Connection connection = DBUtils.getInstance().getConnection();\n Statement statement = connection.createStatement();\n ResultSet resultSet = statement.executeQuery(sql))\n {\n while(resultSet.next())\n {\n orderItems.add(modelItemFromResultSet(resultSet));\n }\n }\n catch (Exception e)\n {\n LOGGER.debug(e);\n LOGGER.error(e.getMessage());\n }\n return new Order(id, customerID, orderItems);\n }",
"List<LineItem> listLineItemByOrderId(Integer orderId);",
"public boolean isExists(String orderId);",
"public static List<Contains> getContainsByOrderID(int orderID) throws ClassNotFoundException\n {\n List<Contains> allContains = new ArrayList<>();\n try\n {\n try (Connection con = CS360DB.getConnection();\n Statement stmt = con.createStatement())\n {\n\n StringBuilder insQuery = new StringBuilder();\n\n insQuery.append(\"SELECT * FROM contains \")\n .append(\" WHERE \")\n .append(\" orderID = \").append(\"'\").append(orderID).append(\"';\");\n\n stmt.execute(insQuery.toString());\n\n ResultSet res = stmt.getResultSet();\n\n while (res.next() == true)\n {\n Contains contains = new Contains();\n contains.setOrderID(Integer.valueOf(res.getString(\"orderID\")));\n contains.setProductID(Integer.valueOf(res.getString(\"productID\")));\n contains.setQuantity(Integer.valueOf(res.getString(\"quantity\")));\n allContains.add(contains);\n }\n\n // Close connection\n stmt.close();\n con.close();\n }\n\n }\n catch (SQLException ex)\n {\n // Log exception\n Logger.getLogger(Contains.class.getName()).log(Level.SEVERE,null,ex);\n }\n\n return allContains;\n }",
"@Override\n public T findById(Long id) {\n return manager.find(elementClass, id);\n }",
"@Override\n\tpublic List<Orders> queryOrderOfId(int id) throws SQLException {\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet result = null;\n\t\tList<Orders> messages=null;\n\t\ttry{\n\t\t\tconn = DBCPUtils.getConnection();\n\t\t\tstmt = conn.prepareStatement(\"SELECT * FROM orders WHERE orderId=?\");\n\t\t\tstmt.setInt(1,id);\n\t\t\tresult = stmt.executeQuery();\n\t\t\tmessages=new ArrayList<Orders>();\n\t\t\twhile (result.next()) {\n\t\t\t\tOrders order=new Orders();\n\t\t\t\torder.setOrderId(result.getInt(1));\n\t\t\t\torder.setOrderName(result.getString(2));\n\t\t\t\torder.setOrderAddress(result.getString(3));\n\t\t\t\torder.setOrderPhone(result.getString(4));\n\t\t\t\torder.setOrderNumber(result.getInt(5));\n\t\t\t\torder.setOrderTime(result.getString(6));\n\t\t\t\torder.setBookName(result.getString(7));\n\t\t\t\torder.setOrderMemo(result.getString(8));\n\t\t\t\tmessages.add(order);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDBCPUtils.releaseConnection(conn, stmt, result);\n\t\t}\n\t\treturn messages;\n\t\t\n\t\t\n\t}",
"public ArrayList<Stock> Search(String id) {\n return null;\n }",
"public static Result getOrder(String orderId){\n \n MysqlDBOperations mysql = new MysqlDBOperations();\n ResourceProperty rs = new ResourceProperty(\"com.generic.resources.mysqlQuery\");\n Connection conn = mysql.getConnection(); \n Orders order;\n List<MarketProduct> productList;\n\n try{\n\n // -1- Prepare Statement\n PreparedStatement preStat = conn.prepareStatement(rs.getPropertyValue(\"mysql.order.select.4\"));\n preStat.setString(1, orderId);\n \n ResultSet resultSet = preStat.executeQuery();\n \n // -2- Get Result\n if(resultSet.first()){\n \n // -2.1- Get Order Object\n order = ORMHandler.resultSetToOrder(resultSet);\n \n // -2.2- Get User & UserAddress Object\n User user = ORMHandler.resultSetToUser(resultSet);\n UserAddress userAddress = ORMHandler.resultSetToUserAddress(resultSet);\n userAddress.setAddress(ORMHandler.resultSetToAddress(resultSet));\n \n // -2.3- Get MarketProduct list \n productList = new ArrayList<>();\n do{\n MarketProduct product = ORMHandler.resultSetToProduct(resultSet);\n productList.add(product);\n }while(resultSet.next());\n \n // -2.4- Set \n order.setUserAddress(userAddress);\n order.setUser(user);\n order.setProductList(productList);\n \n return Result.SUCCESS.setContent(order);\n }else{\n return Result.SUCCESS_EMPTY;\n } \n\n } catch (SQLException ex) { \n return Result.FAILURE_DB.setContent(ex.getMessage());\n }finally{\n mysql.closeAllConnection();\n } \n }",
"@Override\r\n\tpublic void find(Integer id) {\n\r\n\t}",
"public static ru.terralink.mvideo.sap.Orders load(long id)\n {\n return (ru.terralink.mvideo.sap.Orders)(DELEGATE.load(id));\n }",
"@Nullable\n public Order doRetrieveById(int id) {\n try {\n Connection cn = ConPool.getConnection();\n PreparedStatement st;\n Operator op = null;\n Order o = null;\n User u = null;\n\n st = cn.prepareStatement(\"SELECT * FROM `order` O WHERE O.id=?;\");\n st.setInt(1, id);\n ResultSet rs = st.executeQuery();\n if (rs.next()) {\n o = new Order();\n if (rs.getString(6) != null) {\n op = opd.doRetrieveByUsername(rs.getString(6));\n } else {\n op = null;\n }\n o.setOperator(op);\n o.setId(rs.getInt(2));\n o.setTotPrice(rs.getDouble(3));\n o.setNumberOfItems(rs.getInt(4));\n o.setData(rs.getString(5));\n u = ud.doRetrieveByUsername(rs.getString(1));\n o.setUser(u);\n st = cn.prepareStatement(\"SELECT * FROM digitalpurchasing D WHERE D.order=?;\");\n st.setInt(1, o.getId());\n ResultSet rs2 = st.executeQuery();\n DigitalProduct dp = null;\n while (rs2.next()) {\n dp = dpd.doRetrieveById(rs2.getInt(1));\n o.addProduct(dp, rs2.getInt(3));\n }\n st = cn.prepareStatement(\"SELECT * FROM physicalpurchasing P WHERE P.order=?;\");\n st.setInt(1, o.getId());\n rs2 = st.executeQuery();\n PhysicalProduct pp = null;\n while (rs2.next()) {\n pp = ppd.doRetrieveById(rs2.getInt(1));\n o.addProduct(pp, rs2.getInt(3));\n }\n\n }\n st.close();\n cn.close();\n\n return o;\n } catch (SQLException e) {\n return null;\n }\n }",
"void showOrderText(int ID) throws OrderNotFoundException;",
"@GetMapping(\"/getOrder\")\n\tpublic ResponseEntity<Order> getOrderWithId(@RequestParam int orderId) {\n\t\treturn new ResponseEntity<>(dataFetchService.getOrderWithId(orderId), HttpStatus.OK);\n\t}",
"public List<PurchaseOrderLine> findByOrder(PurchaseOrder order);",
"public Optional<Order> getOrder(Long id) {\n\t\treturn repo.findById(id);\n\t}",
"@Override\n\tpublic UserOrderDetail selectById(Serializable id) {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic List<OrderAction> findOne(String orderId) {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic List<OrderDO> findOrdersBySearchString(String searchString) {\n\t\treturn null;\n\t}",
"OrderItemDto getOrderItem(long id) throws SQLException;",
"public interface OrderItemRepository extends JpaRepository<OrderItem, Integer>, JpaSpecificationExecutor {\n\t@Query(\"SELECT oi FROM OrderItem oi WHERE oi.order.orderId = ?1\")\n\tList<OrderItem> findByOrderId(String orderId);\n}",
"R_order selectByPrimaryKey(Integer oId);",
"@Override\n public Collection<Order> getOrdersByUserId(String id) {\n Collection<Order> orders = getAll();\n return orders.stream()\n .filter(x -> x.getCustomerId().equals(id))\n .collect(Collectors.toList());\n }",
"@Override\r\n\tpublic Orderitem queryByUidAndPid(Orderitem oi) {\n\t\treturn orderitemDao.queryByUidAndPid(oi);\r\n\t}",
"public ShippingOrder getOrderInfoByOrderId(String orderId){\r\n ShippingDataAccess shippingOrder = new ShippingDataAccess(this.sqlServerIp);\r\n String log = null;\r\n ShippingOrder order = shippingOrder.selectShippingOrderByOrderId(orderId, log);\r\n return order;\r\n }",
"NjOrderAttachment selectByPrimaryKey(String id);",
"public interface OrderDetailRepository extends JpaRepository<OrderDetail,String> {\n\n List<OrderDetail> findByOrderId(String orderId);\n}",
"@Override\r\n\tpublic List<OrderVO> getListOrderBySaleIDWithSearchString(HashMap<String, Object> searchObj) throws Exception {\n\t\treturn sqlSession.selectList(namespaceOrder+\".getListOrderBySaleIDWithSearch\",searchObj);\r\n\t}",
"void deleteOrder(Long id);",
"@GetMapping(\"/{userId}/orders/{orderId}\")\n public OrderDto findOrder(@PathVariable @Positive Long userId,\n @PathVariable @Positive Long orderId) {\n return orderService.findByUserId(userId, orderId);\n }",
"UcOrderGuestInfo selectByPrimaryKey(Long id);",
"public Receipt getReceiptByOrder(Long orderid) {\n\t\tReceipt exreceipt = new Receipt();\n\t\tOrder order = new Order();\n\t\torder.setId(orderid);\n\t\texreceipt.setOrder(order);\n\t\tExample<Receipt> ex = Example.of(exreceipt);\n\t\treturn receiptRepository.findOne(ex);\n\t}",
"@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }",
"@Override\n\tpublic Item findItemById(Long id) {\n\t\tCriteriaBuilder cb=entityManager.getCriteriaBuilder();\n\t\t\n\t\tCriteriaQuery<Item> q = cb.createQuery(Item.class);\n\t\t Root<Item> c = q.from(Item.class);\n\t\t ParameterExpression<Long> p = cb.parameter(Long.class);\n\t\t q.select(c).where(cb.equal(c.get(\"id\"), p));\n\t\t TypedQuery<Item> query = entityManager.createQuery(q);\n\t\t query.setParameter(p, id);\n\t\t Item i = query.getSingleResult();\n\t\treturn i;\n\t}",
"List<Order> findByUser(User user);",
"public static boolean findLimitOrder(List<LimitOrder> orders, LimitOrder order, String id) {\n boolean found = false;\n\n for (LimitOrder openOrder : orders) {\n if (openOrder.getId().equalsIgnoreCase(id)) {\n if (order.getCurrencyPair().equals(openOrder.getCurrencyPair()) &&\n (order.getTradableAmount().compareTo(openOrder.getTradableAmount()) == 0) &&\n (order.getLimitPrice().compareTo(openOrder.getLimitPrice()) == 0)) {\n found = true;\n }\n }\n }\n\n return found;\n }"
] |
[
"0.73455447",
"0.7299136",
"0.7034596",
"0.70038044",
"0.6955689",
"0.694168",
"0.6921057",
"0.6901805",
"0.68942654",
"0.6856572",
"0.6841341",
"0.68236643",
"0.6820565",
"0.6811569",
"0.6753958",
"0.66630214",
"0.66281366",
"0.6621683",
"0.65212303",
"0.6505786",
"0.64910907",
"0.6477629",
"0.6443293",
"0.6441556",
"0.64105564",
"0.6409508",
"0.6397348",
"0.63895524",
"0.63855094",
"0.63699645",
"0.635302",
"0.63309455",
"0.6311894",
"0.63027096",
"0.6263043",
"0.62312406",
"0.6223201",
"0.6177308",
"0.61605716",
"0.6124186",
"0.6123065",
"0.61228204",
"0.611617",
"0.61135954",
"0.6104839",
"0.61036503",
"0.6080503",
"0.60704184",
"0.6067669",
"0.60613376",
"0.60461825",
"0.60250133",
"0.60245705",
"0.60192084",
"0.6013714",
"0.6009647",
"0.5981981",
"0.5981092",
"0.59794956",
"0.5972058",
"0.59704596",
"0.5963561",
"0.59556264",
"0.59442633",
"0.5943265",
"0.59402364",
"0.5929554",
"0.5899442",
"0.58953106",
"0.58890116",
"0.5881607",
"0.58802396",
"0.58728045",
"0.58710724",
"0.5863222",
"0.5849682",
"0.5837762",
"0.5828159",
"0.58175176",
"0.58024466",
"0.5801535",
"0.5794559",
"0.5792324",
"0.57908183",
"0.5781956",
"0.5764989",
"0.5763131",
"0.57616496",
"0.57519287",
"0.57395196",
"0.57392514",
"0.5725644",
"0.5723225",
"0.57207805",
"0.57169837",
"0.57039094",
"0.5703353",
"0.5695541",
"0.56942797",
"0.56929034"
] |
0.72647554
|
2
|
Processes requests for both HTTP GET and POST methods.
|
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
/* TODO output your page here. You may use following sample code. */
String nic = (String) request.getParameter("nic");
db conexion = null;
Informacion info = new Informacion();
try {
conexion = new db();
String sql = "SELECT NIS_RAD, COD_TAR,MUNICIPIO,LOCALIDAD,"
+ "DEPARTAMENTO,DIRECCION,APE1_CLI,APE2_CLI,NOM_CLI,REF_DIR,ACC_FINCA "
+ " FROM qo_datosum "
+ " WHERE NIC=? LIMIT 1 ";
java.sql.PreparedStatement pst = conexion.getConnection().prepareStatement(sql);
pst.setString(1, nic);
java.sql.ResultSet rs = conexion.Query(pst);
if (rs.next()) {
info.setCliente(rs.getString("NOM_CLI") + " " + rs.getString("APE1_CLI") + " " + rs.getString("APE2_CLI"));
info.setDepartamento(rs.getString("DEPARTAMENTO"));
info.setLocalidad(rs.getString("LOCALIDAD"));
info.setMunicipio(rs.getString("MUNICIPIO"));
info.setNis(rs.getString("NIS_RAD"));
info.setDireccion(rs.getString("DIRECCION"));
}
Gson gson = new Gson();
out.print(gson.toJson(info));
} catch (SQLException e) {
out.print("Error: " + e.getMessage());
} catch (Exception e) {
out.print("Error: " + e.getMessage());
} finally {
if (conexion != null) {
try {
conexion.Close();
} catch (SQLException e) {
out.print("Error: " + e.getMessage());
}
}
}
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED);\n }\n }",
"private void processRequest(HttpServletRequest request, HttpServletResponse response) {\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n // only POST should be used\n doPost(request, response);\n }",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\nSystem.err.println(\"=====================>>>>>123\");\n\t\tString key=req.getParameter(\"method\");\n\t\tswitch (key) {\n\t\tcase \"1\":\n\t\t\tgetProvinces(req,resp);\n\t\t\tbreak;\n\t\tcase \"2\":\n\t\t\tgetCities(req,resp);\t\t\t\n\t\t\tbreak;\n\t\tcase \"3\":\n\t\t\tgetAreas(req,resp);\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tprocess(req, resp);\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\n\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\r\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}",
"@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t\tdoGet(req, resp);\r\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\r\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n processRequest(request, response);\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t\t\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tprocessRequest(request, response);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tprocessRequest(request, response);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tprocess(req,resp);\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }"
] |
[
"0.70042455",
"0.6658758",
"0.660358",
"0.6509522",
"0.6446582",
"0.64430493",
"0.643988",
"0.64312905",
"0.64286155",
"0.6425095",
"0.6425095",
"0.64205915",
"0.64205915",
"0.64205915",
"0.64176667",
"0.6413566",
"0.6413566",
"0.6399695",
"0.6394763",
"0.6394763",
"0.6393365",
"0.63927114",
"0.63927114",
"0.63912845",
"0.63912845",
"0.63912845",
"0.63912845",
"0.6387953",
"0.6387953",
"0.6379531",
"0.637933",
"0.63773566",
"0.6376964",
"0.63760304",
"0.63696826",
"0.63623536",
"0.6361764",
"0.6361764",
"0.63547367",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948",
"0.6353948"
] |
0.0
|
-1
|
Handles the HTTP GET method.
|
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void doGet( )\n {\n \n }",
"@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}",
"@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}",
"@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}",
"@Override\r\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\r\n\t}",
"void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metGet(request, response);\n }",
"public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"GET log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) return;\r\n\tif (\"get-response\".equals( requestId )) {\r\n\t try {\r\n\t\tonMEVPollsForResponse( req, resp );\r\n\t } catch (Exception e) {\r\n\t\tlogError( req, resp, e, \"MEV polling error\" );\r\n\t\tsendError( resp, \"MEV polling error: \" + e.toString() );\r\n\t }\r\n\t}\r\n }",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n \r\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t\t\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}",
"public void doGet() throws IOException {\n\n // search ressource\n byte[] contentByte = null;\n try {\n contentByte = ToolBox.readFileByte(RESOURCE_DIRECTORY, this.url);\n this.statusCode = OK;\n ContentType contentType = new ContentType(this.extension);\n sendHeader(statusCode, contentType.getContentType(), contentByte.length);\n } catch (IOException e) {\n System.out.println(\"Ressource non trouvé\");\n statusCode = NOT_FOUND;\n contentByte = ToolBox.readFileByte(RESPONSE_PAGE_DIRECTORY, \"pageNotFound.html\");\n sendHeader(statusCode, \"text/html\", contentByte.length);\n }\n\n this.sendBodyByte(contentByte);\n }",
"public HttpResponseWrapper invokeGET(String path) {\n\t\treturn invokeHttpMethod(HttpMethodType.HTTP_GET, path, \"\");\n\t}",
"@Override\n\tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }",
"@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t}",
"public Result get(Get get) throws IOException;",
"@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) {\n System.out.println(\"[Servlet] GET request \" + request.getRequestURI());\n\n response.setContentType(FrontEndServiceDriver.APP_TYPE);\n response.setStatus(HttpURLConnection.HTTP_BAD_REQUEST);\n\n try {\n String url = FrontEndServiceDriver.primaryEventService +\n request.getRequestURI().replaceFirst(\"/events\", \"\");\n HttpURLConnection connection = doGetRequest(url);\n\n if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) {\n PrintWriter pw = response.getWriter();\n JsonObject responseBody = (JsonObject) parseResponse(connection);\n\n response.setStatus(HttpURLConnection.HTTP_OK);\n pw.println(responseBody.toString());\n }\n }\n catch (Exception ignored) {}\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(\"get\");\n\t\tthis.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \tSystem.out.println(\"---here--get--\");\n processRequest(request, response);\n }",
"@Override\n public final void doGet() {\n try {\n checkPermissions(getRequest());\n // GET one\n if (id != null) {\n output(api.runGet(id, getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER)));\n } else if (countParameters() == 0) {\n throw new APIMissingIdException(getRequestURL());\n }\n // Search\n else {\n\n final ItemSearchResult<?> result = api.runSearch(Integer.parseInt(getParameter(PARAMETER_PAGE, \"0\")),\n Integer.parseInt(getParameter(PARAMETER_LIMIT, \"10\")), getParameter(PARAMETER_SEARCH),\n getParameter(PARAMETER_ORDER), parseFilters(getParameterAsList(PARAMETER_FILTER)),\n getParameterAsList(PARAMETER_DEPLOY), getParameterAsList(PARAMETER_COUNTER));\n\n head(\"Content-Range\", result.getPage() + \"-\" + result.getLength() + \"/\" + result.getTotal());\n\n output(result.getResults());\n }\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n }\n }",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tthis.service(req, resp);\r\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\n\t}",
"@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n public void get(@PathVariable(\"id\") String id, HttpServletRequest req){\n throw new NotImplementedException(\"To be implemented\");\n }",
"@Override\npublic void get(String url) {\n\t\n}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString action = req.getParameter(\"action\");\r\n\t\t\r\n\t\tif(action == null) {\r\n\t\t\taction = \"List\";\r\n\t\t}\r\n\t\t\r\n\t\tswitch(action) {\r\n\t\t\tcase \"List\":\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t\t\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tprotected void doGet(HttpServletRequest request, \n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tSystem.out.println(\"Routed to doGet\");\n\t}",
"@NonNull\n public String getAction() {\n return \"GET\";\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tprocess(req,resp);\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"@Override\r\nprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t process(req,resp);\r\n\t }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tprocess(req, resp);\n\t}",
"@Override\n\tpublic HttpResponse get(final String endpoint) {\n\t\treturn httpRequest(HTTP_GET, endpoint, null);\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste doget\");\r\n }",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/plain\");\n // Actual logic goes here.\n PrintWriter out = response.getWriter();\n out.println(\"Wolken,5534-0848-5100,0299-6830-9164\");\n\ttry \n\t{\n Get g = new Get(Bytes.toBytes(request.getParameter(\"userid\")));\n Result r = table.get(g);\n byte [] value = r.getValue(Bytes.toBytes(\"v\"),\n Bytes.toBytes(\"\"));\n\t\tString valueStr = Bytes.toString(value);\n\t\tout.println(valueStr);\n\t}\n\tcatch (Exception e)\n\t{\n\t\tout.println(e);\n\t}\n }",
"@Override\r\n public void doGet(String path, HttpServletRequest request, HttpServletResponse response)\r\n throws Exception {\r\n // throw new UnsupportedOperationException();\r\n System.out.println(\"Inside the get\");\r\n response.setContentType(\"text/xml\");\r\n response.setCharacterEncoding(\"utf-8\");\r\n final Writer w = response.getWriter();\r\n w.write(\"inside the get\");\r\n w.close();\r\n }",
"@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\r\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n System.out.println(\"Console: doGET visited\");\n String result = \"\";\n //get the user choice from the client\n String choice = (request.getPathInfo()).substring(1);\n response.setContentType(\"text/plain;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n //methods call appropriate to user calls\n if (Integer.valueOf(choice) == 3) {\n result = theBlockChain.toString();\n if (result != null) {\n out.println(result);\n response.setStatus(200);\n //set status if result output is not generated\n } else {\n response.setStatus(401);\n return;\n }\n }\n //verify chain method\n if (Integer.valueOf(choice) == 2) {\n response.setStatus(200);\n boolean validity = theBlockChain.isChainValid();\n out.print(\"verifying:\\nchain verification: \");\n out.println(validity);\n }\n }",
"@Override\n public DataObjectResponse<T> handleGET(DataObjectRequest<T> request)\n {\n if(getRequestValidator() != null) getRequestValidator().validateGET(request);\n\n DefaultDataObjectResponse<T> response = new DefaultDataObjectResponse<>();\n try\n {\n VisibilityFilter<T, DataObjectRequest<T>> visibilityFilter = visibilityFilterMap.get(VisibilityMethod.GET);\n List<Query> queryList = new LinkedList<>();\n if(request.getQueries() != null)\n queryList.addAll(request.getQueries());\n\n if(request.getId() != null)\n {\n // if the id is specified\n queryList.add(new ById(request.getId()));\n }\n\n DataObjectFeed<T> feed = objectPersister.retrieve(queryList);\n if(feed == null)\n feed = new DataObjectFeed<>();\n List<T> filteredObjects = visibilityFilter.filterByVisible(request, feed.getAll());\n response.setCount(feed.getCount());\n response.addAll(filteredObjects);\n }\n catch(PersistenceException e)\n {\n ObjectNotFoundException objectNotFoundException = new ObjectNotFoundException(String.format(OBJECT_NOT_FOUND_EXCEPTION, request.getId()), e);\n response.setErrorResponse(ErrorResponseFactory.objectNotFound(objectNotFoundException, request.getCID()));\n }\n return response;\n }",
"public void handleGet( HttpExchange exchange ) throws IOException {\n switch( exchange.getRequestURI().toString().replace(\"%20\", \" \") ) {\n case \"/\":\n print(\"sending /MainPage.html\");\n sendResponse( exchange, FU.readFromFile( getReqDir( exchange )), 200);\n break;\n case \"/lif\":\n // send log in page ( main page )\n sendResponse ( exchange, FU.readFromFile(getReqDir(exchange)), 200);\n //\n break;\n case \"/home.html\":\n\n break;\n case \"/book.html\":\n\n break;\n default:\n //checks if user is logged in\n\n //if not send log in page\n //if user is logged in then\n print(\"Sending\");\n String directory = getReqDir( exchange ); // dont need to do the / replace as no space\n File page = new File( getReqDir( exchange) );\n\n // IMPLEMENT DIFFERENT RESPONSE CODE FOR HERE IF EXISTS IS FALSE OR CAN READ IS FALSE\n sendResponse(exchange, FU.readFromFile(directory), 200);\n break;\n }\n }",
"public int handleGET(String requestURL) throws ClientProtocolException, IOException{\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\thttpGet = new HttpGet(requestURL);\t\t\r\n\t\t\t\t\t\t\r\n\t\tinputsource=null;\r\n\t\t\t\r\n\t\toutputString=\"\";\r\n\t\t\r\n\t\t//taking response by executing http GET object\r\n\t\tCloseableHttpResponse response = httpclient.execute(httpGet);\t\t\r\n\t\r\n\t\t/* \r\n\t\t * \tThe underlying HTTP connection is still held by the response object\r\n\t\t\tto allow the response content to be streamed directly from the network socket.\r\n\t\t\tIn order to ensure correct deallocation of system resources\r\n\t\t\tthe user MUST call CloseableHttpResponse.close() from a finally clause.\r\n\t\t\tPlease note that if response content is not fully consumed the underlying\r\n\t\t\tconnection cannot be safely re-used and will be shut down and discarded\r\n\t\t\tby the connection manager.\r\n\t\t */\r\n\t\t\r\n\t\t\tstatusLine= response.getStatusLine().toString();\t\t//status line\r\n\t\t\t\r\n\t\t\tHttpEntity entity1 = response.getEntity();\t\t\t\t//getting response entity from server response \t\r\n\t\t\t\t\t\r\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(entity1.getContent()));\r\n\r\n\t\t\tString line;\r\n\t\t\twhile((line=br.readLine())!=null)\r\n\t\t\t{\r\n\t\t\t\toutputString=outputString+line.toString();\r\n\t }\r\n\t\t\t\r\n\t\t\t//removing spaces around server response string.\r\n\t\t\toutputString.trim();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t//converting server response string into InputSource.\r\n\t\t\tinputsource = new InputSource(new StringReader(outputString));\t\r\n\t\t\t\r\n\t\t\t// and ensure it is fully consumed\r\n\t\t\tEntityUtils.consume(entity1);\t\t\t//consuming entity.\r\n\t\t\tresponse.close();\t\t\t\t\t\t//closing response.\r\n\t\t\tbr.close();\t\t\t\t\t\t\t\t//closing buffered reader\r\n\t\t\t\r\n\t\t\t//returning response code\r\n\t\t\treturn response.getStatusLine().getStatusCode();\r\n\t\r\n\t}",
"@Override\n\tprotected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t logger.error(\"BISHUNNN CALLED\");\n\t\tString category = request.getParameter(\"category\").trim();\n\t\tGetHttpCall getHttpCall = new GetHttpCall();\n\t\turl = APIConstants.baseURL+category.toLowerCase();\n\t\tresponseString = getHttpCall.execute(url);\n\t\tresponse.getWriter().write(responseString);\n\t}",
"@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n //processRequest(request, response);\r\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tPrintWriter out = resp.getWriter();\n\t\tout.print(\"<h1>Hello from your doGet method!</h1>\");\n\t}",
"public void doGet(HttpServletRequest request,\n HttpServletResponse response)\n throws IOException, ServletException {\n response.setContentType(TYPE_TEXT_HTML.label);\n response.setCharacterEncoding(UTF8.label);\n request.setCharacterEncoding(UTF8.label);\n String path = request.getRequestURI();\n logger.debug(RECEIVED_REQUEST + path);\n Command command = null;\n try {\n command = commands.get(path);\n command.execute(request, response);\n } catch (NullPointerException e) {\n logger.error(REQUEST_PATH_NOT_FOUND);\n request.setAttribute(JAVAX_SERVLET_ERROR_STATUS_CODE, 404);\n command = commands.get(EXCEPTION.label);\n command.execute(request, response);\n }\n }",
"public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString search = req.getParameter(\"searchBook\");\n\t\tString output=search;\n\n\t\t//redirect output to view search.jsp\n\t\treq.setAttribute(\"output\", output);\n\t\tresp.setContentType(\"text/json\");\n\t\tRequestDispatcher view = req.getRequestDispatcher(\"search.jsp\");\n\t\tview.forward(req, resp);\n\t\t\t\n\t}",
"public void doGet( HttpServletRequest request, HttpServletResponse response )\n throws ServletException, IOException\n {\n handleRequest( request, response, false );\n }",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public Response handleGet() {\n Gson gson = GSONFactory.getInstance();\n List allEmployees = getAllEmployees();\n\n if (allEmployees == null) {\n allEmployees = new ArrayList();\n }\n\n Response response = Response.ok().entity(gson.toJson(allEmployees)).build();\n return response;\n }",
"@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException, ServletException {\n\t\tsuper.doGet(request, response);\t\t\t\n\t}",
"private static String sendGET(String getURL) throws IOException {\n\t\tURL obj = new URL(getURL);\n\t\tHttpURLConnection con = (HttpURLConnection) obj.openConnection();\n\t\tcon.setRequestMethod(\"GET\");\n\t\tString finalResponse = \"\";\n\n\t\t//This way we know if the request was processed successfully or there was any HTTP error message thrown.\n\t\tint responseCode = con.getResponseCode();\n\t\tSystem.out.println(\"GET Response Code : \" + responseCode);\n\t\tif (responseCode == HttpURLConnection.HTTP_OK) { // success\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\t\t\tString inputLine;\n\t\t\tStringBuffer buffer = new StringBuffer();\n\n\t\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\t\tbuffer.append(inputLine);\n\t\t\t}\n\t\t\tin.close();\n\n\t\t\t// print result\n\t\t\tfinalResponse = buffer.toString();\n\t\t} else {\n\t\t\tSystem.out.println(\"GET request not worked\");\n\t\t}\n\t\treturn finalResponse;\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //processRequest(request, response);\n }",
"@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}",
"public BufferedReader reqGet(final String route) throws\n ServerStatusException, IOException {\n System.out.println(\"first reqGet\");\n return reqGet(route, USER_AGENT);\n }",
"HttpGet getRequest(HttpServletRequest request, String address) throws IOException;",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override \r\nprotected void doGet(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\n String action = request.getParameter(\"action\");\r\n\r\n try {\r\n switch (action)\r\n {\r\n case \"/getUser\":\r\n \tgetUser(request, response);\r\n break;\r\n \r\n }\r\n } catch (Exception ex) {\r\n throw new ServletException(ex);\r\n }\r\n }",
"@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\n\t}",
"@Test\r\n\tpublic void doGet() throws Exception {\n\t\tCloseableHttpClient httpClient = HttpClients.createDefault();\r\n\t\t// Create a GET object and pass a url to it\r\n\t\tHttpGet get = new HttpGet(\"http://www.google.com\");\r\n\t\t// make a request\r\n\t\tCloseableHttpResponse response = httpClient.execute(get);\r\n\t\t// get response as result\r\n\t\tSystem.out.println(response.getStatusLine().getStatusCode());\r\n\t\tHttpEntity entity = response.getEntity();\r\n\t\tSystem.out.println(EntityUtils.toString(entity));\r\n\t\t// close HttpClient\r\n\t\tresponse.close();\r\n\t\thttpClient.close();\r\n\t}",
"private void requestGet(String endpoint, Map<String, String> params, RequestListener listener) throws Exception {\n String requestUri = Constant.API_BASE_URL + ((endpoint.indexOf(\"/\") == 0) ? endpoint : \"/\" + endpoint);\n get(requestUri, params, listener);\n }",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint i = request.getRequestURI().lastIndexOf(\"/\") + 1;\n\t\tString action = request.getRequestURI().substring(i);\n\t\tSystem.out.println(action);\n\t\t\n\t\tString view = \"Error\";\n\t\tObject model = \"service Non disponible\";\n\t\t\n\t\tif (action.equals(\"ProductsList\")) {\n\t\t\tview = productAction.productsList();\n\t\t\tmodel = productAction.getProducts();\n\t\t}\n\t\t\n\t\trequest.setAttribute(\"model\", model);\n\t\trequest.getRequestDispatcher(prefix + view + suffix).forward(request, response); \n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t throws ServletException, IOException {\n\tprocessRequest(request, response);\n }",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tcommandAction(request,response);\r\n\t}"
] |
[
"0.7589609",
"0.71665615",
"0.71148175",
"0.705623",
"0.7030174",
"0.70291144",
"0.6995984",
"0.697576",
"0.68883485",
"0.6873811",
"0.6853569",
"0.6843572",
"0.6843572",
"0.6835363",
"0.6835363",
"0.6835363",
"0.68195957",
"0.6817864",
"0.6797789",
"0.67810035",
"0.6761234",
"0.6754993",
"0.6754993",
"0.67394847",
"0.6719924",
"0.6716244",
"0.67054695",
"0.67054695",
"0.67012346",
"0.6684415",
"0.6676695",
"0.6675696",
"0.6675696",
"0.66747975",
"0.66747975",
"0.6669016",
"0.66621476",
"0.66621476",
"0.66476154",
"0.66365504",
"0.6615004",
"0.66130257",
"0.6604073",
"0.6570195",
"0.6551141",
"0.65378064",
"0.6536579",
"0.65357745",
"0.64957607",
"0.64672184",
"0.6453189",
"0.6450501",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.6411481",
"0.64067316",
"0.6395873",
"0.6379907",
"0.63737476",
"0.636021",
"0.6356937",
"0.63410467",
"0.6309468",
"0.630619",
"0.630263",
"0.63014317",
"0.6283933",
"0.62738425",
"0.62680805",
"0.62585783",
"0.62553537",
"0.6249043",
"0.62457556",
"0.6239428",
"0.6239428",
"0.62376446",
"0.62359244",
"0.6215947",
"0.62125194",
"0.6207376",
"0.62067443",
"0.6204527",
"0.6200444",
"0.6199078",
"0.61876005",
"0.6182614",
"0.61762017",
"0.61755335",
"0.61716276",
"0.6170575",
"0.6170397",
"0.616901"
] |
0.0
|
-1
|
Handles the HTTP POST method.
|
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }",
"public void doPost( )\n {\n \n }",
"@Override\n public String getMethod() {\n return \"POST\";\n }",
"public String post();",
"@Override\n\tpublic void doPost(HttpRequest request, AbstractHttpResponse response)\n\t\t\tthrows IOException {\n\t\t\n\t}",
"@Override\n public String getMethod() {\n return \"POST\";\n }",
"public ResponseTranslator post() {\n setMethod(\"POST\");\n return doRequest();\n }",
"protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n }",
"public void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows IOException {\n\n\t}",
"public void postData() {\n\n\t}",
"@Override\n public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {\n logger.warn(\"doPost Called\");\n handle(req, res);\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metPost(request, response);\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tpublic void postHandle(WebRequest request, ModelMap model) throws Exception {\n\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\r\n\t\t\r\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}",
"@Override\n\tprotected HttpMethod requestMethod() {\n\t\treturn HttpMethod.POST;\n\t}",
"@Override\n\tprotected void handlePostBody(HashMap<String, HashMap<String, String>> params, DataFormat format) throws Exception {\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n }",
"@Override\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }",
"@Override\n\n\tpublic void handlePOST(CoapExchange exchange) {\n\t\tFIleStream read = new FIleStream();\n\t\tread.tempWrite(Temp_Path, exchange.getRequestText());\n\t\texchange.respond(ResponseCode.CREATED, \"POST successfully!\");\n\t\t_Logger.info(\"Receive post request:\" + exchange.getRequestText());\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.getWriter().println(\"go to post method in manager\");\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t\n\t}",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }",
"public abstract boolean handlePost(FORM form, BindException errors) throws Exception;",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n super.doPost(req, resp);\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\n\t\t\t\n\t\t \n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}",
"public void processPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException\n {\n }",
"@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}",
"@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\n\t}",
"public void doPost(HttpServletRequest request ,HttpServletResponse response){\n\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"public void post(){\n\t\tHttpClient client = new HttpClient();\n\n\t\tPostMethod post = new PostMethod(\"http://211.138.245.85:8000/sso/POST\");\n//\t\tPostMethod post = new PostMethod(\"/eshopclient/product/show.do?id=111655\");\n//\t\tpost.addRequestHeader(\"Cookie\", cookieHead);\n\n\n\t\ttry {\n\t\t\tSystem.out.println(\"��������====\");\n\t\t\tint status = client.executeMethod(post);\n\t\t\tSystem.out.println(status);\n\t\t} catch (HttpException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n//\t\ttaskCount++;\n//\t\tcountDown--;\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}",
"public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"POST log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) {\r\n\t try {\r\n\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t } catch (IOException ex) {\r\n\t }\r\n\t logError( req, resp, new Exception(\"Unrecognized POST\"), \"\" );\r\n\t sendError(resp, \"Unrecognized POST\");\r\n\t} else\r\n\t if (\"post-request\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onMEVPostsRequest( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"MEV POST error\" );\r\n\t\t sendError( resp, \"MEV POST error: \" + e.toString() );\r\n\t\t}\r\n\t } else if (\"post-response\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onPVMPostsResponse( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"PVM POST error\" );\r\n\t\t sendError( resp, \"PVM POST error: \" + e.toString() );\r\n\t\t}\r\n\t }\r\n }",
"@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}",
"@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\t\n\t}",
"@Override\n\tpublic void postHandle(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler,\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest req, HttpServletResponse resp, Object handler, ModelAndView m)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t}",
"@Override\n public final void doPost() {\n try {\n checkPermissions(getRequest());\n final IItem jSonStreamAsItem = getJSonStreamAsItem();\n final IItem outputItem = api.runAdd(jSonStreamAsItem);\n\n output(JSonItemWriter.itemToJSON(outputItem));\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n\n }\n }",
"@Override\n\tvoid post() {\n\t\t\n\t}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t\tSystem.out.println(\"=========interCpetor Post=========\");\r\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tString method = request.getParameter(\"method\");\n\t\tswitch(method){\n\t\tcase \"Crawl\":\n\t\t\tcrawl(request, response);\n\t\t\tbreak;\n\t\tcase \"Extract\":\n\t\t\textract(request, response);\n\t\t\tbreak;\n\t\tcase \"JDBC\":\n\t\t\tjdbc(request, response);\n\t\t\tbreak;\n\t\tcase \"Indexer\":\n\t\t\tindexer(request, response);\n\t\t\tbreak;\n\t\t}\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste dopost\");\r\n }",
"protected void doPost(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response)\r\n\t/* 43: */throws ServletException, IOException\r\n\t/* 44: */{\r\n\t\t/* 45:48 */doGet(request, response);\r\n\t\t/* 46: */}",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tprocess(req, resp);\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\r\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\tprocess(req,resp);\r\n\t}",
"public void handlePost(SessionSrvc session, IObjectContext context)\n throws Exception\n {\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response) {\n\t\tdoGet(request, response);\n\t}",
"public void doPost(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tdoGet(request, response);\r\n\t}",
"@Override\r\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,\r\n\t\t\tModelAndView modelAndView) throws Exception {\n\t}",
"@Override\n protected void doPost\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n processRequest(request, response);\r\n } catch (JSONException ex) {\r\n Logger.getLogger(PDCBukUpload.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"@Override\r\n protected void doPost(HttpServletRequest request,\r\n HttpServletResponse response)\r\n throws ServletException,\r\n IOException {\r\n processRequest(request,\r\n response);\r\n\r\n }",
"@Override\r\n\tpublic void doPost(CustomHttpRequest request, CustomHttpResponse response) throws Exception {\n\t\tdoGet(request, response);\r\n\t}",
"@Override\n\tpublic void postHandle(HttpServletRequest request, HttpServletResponse response,\n\t\t\tObject handler, ModelAndView modelAndView) throws Exception {\n\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoHandle(request, response);\n\t}",
"private void postRequest() {\n\t\tSystem.out.println(\"post request, iam playing money\");\n\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }",
"@Override\n public void postHandle(HttpServletRequest request,\n HttpServletResponse response, Object handler,\n ModelAndView modelAndView) throws Exception {\n\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (Exception ex) {\n Logger.getLogger(PedidoController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }"
] |
[
"0.73289514",
"0.71383566",
"0.7116213",
"0.7105215",
"0.7100045",
"0.70236707",
"0.7016248",
"0.6964149",
"0.6889435",
"0.6784954",
"0.67733276",
"0.67482096",
"0.66677034",
"0.6558593",
"0.65582114",
"0.6525548",
"0.652552",
"0.652552",
"0.652552",
"0.65229493",
"0.6520197",
"0.6515622",
"0.6513045",
"0.6512626",
"0.6492367",
"0.64817846",
"0.6477479",
"0.64725804",
"0.6472099",
"0.6469389",
"0.6456206",
"0.6452577",
"0.6452577",
"0.6452577",
"0.6450273",
"0.6450273",
"0.6438126",
"0.6437522",
"0.64339423",
"0.64253825",
"0.6422238",
"0.6420897",
"0.6420897",
"0.6420897",
"0.6407662",
"0.64041835",
"0.64041835",
"0.639631",
"0.6395677",
"0.6354875",
"0.63334197",
"0.6324263",
"0.62959254",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6288832",
"0.6280875",
"0.6272104",
"0.6272104",
"0.62711537",
"0.62616795",
"0.62544584",
"0.6251865",
"0.62274224",
"0.6214439",
"0.62137586",
"0.621211",
"0.620854",
"0.62023044",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61775357",
"0.61638993",
"0.61603814",
"0.6148914",
"0.61465937",
"0.61465937",
"0.614548",
"0.6141879",
"0.6136717",
"0.61313903",
"0.61300284",
"0.6124381",
"0.6118381",
"0.6118128",
"0.61063534",
"0.60992104",
"0.6098801",
"0.6096766"
] |
0.0
|
-1
|
Returns a short description of the servlet.
|
@Override
public String getServletInfo() {
return "Short description";
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public String getServletInfo()\n {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\n return \"Short description\";\n }",
"public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\r\n public String getServletInfo() {\r\n return \"Short description\";\r\n }",
"@Override\n public String getServletInfo() {\n return \"Short description\";\n }",
"@Override\n public String getServletInfo() {\n return \"Short description\";\n }",
"@Override\n public String getServletInfo() {\n return \"Short description\";\n }",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}",
"@Override\n\tpublic String getServletInfo() {\n\t\treturn \"Short description\";\n\t}",
"@Override\r\n public String getServletInfo()\r\n {\r\n return \"Short description\";\r\n }",
"@Override\n public String getServletInfo()\n {\n return \"Short description\";\n }",
"@Override\r\n\tpublic String getServletInfo() {\r\n\t\treturn \"Short description\";\r\n\t}",
"@Override\r\n public String getServletInfo()\r\n {\r\n return \"Short description\";\r\n }",
"@Override\n public String getServletInfo() {\n return \"Short description\";\n }"
] |
[
"0.87634975",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8732279",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8699131",
"0.8531295",
"0.8531295",
"0.85282224",
"0.85282224",
"0.85282224",
"0.8527433",
"0.8527433",
"0.8527433",
"0.8527433",
"0.8527433",
"0.8527433",
"0.8516995",
"0.8512296",
"0.8511239",
"0.8510324",
"0.84964365"
] |
0.0
|
-1
|
The main entry point.
|
public static void main(String[] args) throws IOException {
Source source;
final Map<String, String> options = new HashMap<>();
String nablaFile = null;
String nablagenFile = null;
String optionsFile = null;
for (String arg : args) {
if (parseOption(options, arg)) {
continue;
} else {
if (nablaFile == null) {
nablaFile = arg;
} else if (nablagenFile == null) {
nablagenFile = arg;
} else if (optionsFile == null) {
optionsFile = arg;
}
}
}
if (nablaFile == null) {
throw new IllegalArgumentException("Missing .n file");
}
if (nablagenFile == null) {
throw new IllegalArgumentException("Missing .ngen file");
}
if (optionsFile == null) {
throw new IllegalArgumentException("Missing .json options file");
}
source = Source.newBuilder(NABLA, new File(nablaFile)).build();
System.exit(executeSource(source, nablagenFile, optionsFile, System.in, System.out, options));
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public static void main() {\n \n }",
"public static void main(){\n\t}",
"public static void main(String[]args) {\n\t\n\t\t\n\n}",
"public static void main(String []args){\n\n }",
"public static void main (String []args){\n }",
"public static void main()\n\t{\n\t}",
"public static void main() {\n }",
"public static void main(String []args){\n }",
"public static void main(String []args){\n }",
"public static void main(String[] args) {\n \n \n \n \n }",
"public static void main(String[] args) {\n \n \n \n\t}",
"public static void main(String[] args) {\r\n// Use for unit testing\r\n }",
"public static void main(String args[]) throws Exception\n {\n \n \n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"public static void main(String[] args) {\n \n \n }",
"public static void main(String[] args) {\n \n \n }",
"public static void main(String[] args)\r\t{",
"public Main() {\n \n \n }",
"public static void main(String[] args) {\n\t \t\n\t \t\n\t }",
"public static void main(String[] args) {}",
"public static void main(String[] args) {}",
"public static void main(String[] args) {\n \n\n }",
"public static void main(String[] args) {\n // TODO code application logic here\n // some testing? or actually we can't run it standalone??\n }",
"private Main() {\n\n super();\n }",
"public static void main(String[]args) {\n\t}",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\r\n \r\n }",
"public static void main(String[] args) {\r\n \r\n }",
"public static void main(String[] args) {\t\n\t\t\n\t}",
"public static void main(String[] args) {\n \r\n\t}",
"static void main(String[] args)\n {\n }",
"static void main(String[] args) {\n }",
"public static void main(String args[]) {}",
"public static void main(String args[]) {}",
"public static void main(String args[]) {}",
"public static void main(String[] args) {\n\n\t\t\n\t\t\n\t}",
"public static void main(String[] args){\n\t\t\n\t\t\n \t}",
"public static void main (String args[]) {\n\t\t\n }",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n \n\t}",
"public static void main (String[]args) throws IOException {\n }",
"public static void main(String[] args) {\n\t\t\n\t\t\t\n\n\t}",
"private Main() {}",
"public Main() {}",
"static public void main(String[] args) {\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t}",
"public static void main(String args[]){\n\t\t\n\t\n\t}",
"public static void main(String[] args) {\n\t\t\t\t\n\t}",
"public static void main(String[] args) {\t}",
"public static void main (String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t \t\n\t \t\n\t}",
"private Main ()\n {\n super ();\n }",
"private Main() {\n }",
"public static void main(String[] args) {\n\t\t \n\t}",
"public static void main(String[] args) {\n \n\t\t}",
"public static void main(String[] args) {\n \n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t}"
] |
[
"0.7694411",
"0.7286958",
"0.7284583",
"0.7280362",
"0.72678703",
"0.7261045",
"0.7251257",
"0.7230187",
"0.7230187",
"0.71732044",
"0.71651006",
"0.71431834",
"0.7124002",
"0.7106453",
"0.7106453",
"0.7106453",
"0.7106453",
"0.7106453",
"0.7106453",
"0.7104156",
"0.70837134",
"0.70837134",
"0.70779383",
"0.7062877",
"0.7056433",
"0.70473063",
"0.70473063",
"0.70354915",
"0.70200473",
"0.70044494",
"0.6985688",
"0.6984893",
"0.6981311",
"0.6981311",
"0.69634897",
"0.69586",
"0.69486713",
"0.69408107",
"0.692623",
"0.692623",
"0.692623",
"0.691899",
"0.69172156",
"0.69158363",
"0.69102",
"0.69102",
"0.69070345",
"0.68978864",
"0.689312",
"0.68782216",
"0.68756074",
"0.6869288",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6863758",
"0.6862287",
"0.6859782",
"0.6854402",
"0.6854402",
"0.6854402",
"0.6854402",
"0.6853166",
"0.68517333",
"0.68447435",
"0.684145",
"0.6829755",
"0.6818392",
"0.68183035",
"0.6816195",
"0.6814254",
"0.68118346",
"0.68057007",
"0.6803519",
"0.6803519",
"0.6803519",
"0.6803519"
] |
0.0
|
-1
|
Get the configured parser
|
public static PackerFileParser get() {
if(parser==null) {
Iterator<PackerFileParser> packerFileParseIterator =
ServiceLoader.load(PackerFileParser.class).iterator();
if(packerFileParseIterator.hasNext()) {
parser = packerFileParseIterator.next();
} else {
parser = new PackerFileParserImpl();
}
}
return parser;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public OptionParser getParser() {\n\t\treturn parser;\n\t}",
"protected Parser getParser() {\n\t\treturn myParser;\n\t}",
"public static DirectoryParser getParser() {\n return DirectoryParser.INSTANCE;\n }",
"protected Parser getParser() throws TemplateException {\n try {\n return (Parser) _broker.getValue(\"parser\",\"wm\"); \n } catch (Exception e) {\n Engine.log.exception(e);\n throw new TemplateException(\"Could not load parser type \\\"\" + \n _parserName + \"\\\": \" + e);\n }\n }",
"public GosuParser getParser()\n {\n return _parser;\n }",
"@Nonnull public ParserPool getParserPool() {\n return parserPool;\n }",
"public static IRuleParser getRuleParser() {\n\t\tif(getDefault().ruleParser == null) {\n\t\t\t// up to now, there is no other parser than XML\n\t\t\tgetDefault().ruleParser = new XMLRuleParser();\n\t\t}\n\t\treturn getDefault().ruleParser;\n\t}",
"private static void loadParser() {\n if(parser_ == null)\n parser_ = ConfigIOFactory.getInstance(\"json\");\n }",
"CParser getParser();",
"public ParserType getParserType() {\n\t\treturn parser;\n\t}",
"private TwigcsResultParser getParser() {\n\t\tif (parser == null) {\n\t\t\tparser = new TwigcsResultParser();\n\t\t}\n\t\treturn parser;\n\t}",
"public Parser getParser(String mimeType) {\n return parsers.get(mimeType);\n }",
"public ParserProperties getParserProperties() {\n\t\treturn properties.getParser() != null ? properties.getParser() : new ParserProperties();\n\t}",
"private SAXParser getSAXParser() {\n\t SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();\n\t if (saxParserFactory == null) {\n\t return null;\n\t }\n\t SAXParser saxParser = null;\n\t try {\n\t saxParser = saxParserFactory.newSAXParser();\n\t } catch (Exception e) {\n\t }\n\t return saxParser;\n\t }",
"protected JsonParser getJsonParser( ) {\r\n\t\treturn jsonParser;\r\n\t}",
"public static CSVParser getParser() {\n if (instance == null) {\n instance = new CSVParser();\n }\n return instance;\n }",
"public ParserType getParserType() {\n\t\t\treturn parserType;\n\t\t}",
"public abstract IParser[] getParserOptionSet();",
"public static Parser getInstance() {\n return instance;\n }",
"public Configuration parse() {\n final CommandLineParser parser = new BasicParser();\n final CommandLine cmd;\n\n try {\n cmd = parser.parse(options, args);\n\n if (cmd.hasOption(\"h\"))\n return help();\n\n if (cmd.hasOption(\"f\")) {\n return configurationFromFile(cmd.getOptionValue(\"f\"));\n } else if (cmd.hasOption(\"u\")) {\n return configurationFromUrl(cmd.getOptionValue(\"u\"));\n } else if (0 < args.length) {\n logback.warn(\"Unknown parameter: \" + args[0]);\n return help();\n } else {\n return configurationFromResource();\n }\n\n } catch (final ParseException e) {\n logback.error(\"Failed to parse command line properties\", e);\n return help();\n }\n }",
"private Parser[] getParsers() {\n return new Parser[]{new OpenDocumentParser()};\n }",
"public abstract ArgumentParser makeParser();",
"@Nullable\n\tpublic String getParserName() {\n\t\treturn parserName;\n\t}",
"protected static IParser getParser(final FhirContext ctx, FHIRMediaType mt) {\n\t\tIParser parser = null;\n\n\t\tfinal ParserType parserType = mt.getParserType();\n\t\tswitch (parserType) {\n\t\tcase JSON:\n\t\t\tparser = ctx.newJsonParser();\n\t\t\tbreak;\n\t\tcase XML:\n\t\tdefault:\n\t\t\tparser = ctx.newXmlParser();\n\t\t\tbreak;\n\t\t}\n\t\treturn parser;\n\t}",
"public IGroupParser getGroupParser() {\n return groupParser;\n }",
"@Override\r\n\tpublic XMLParser getParser() {\r\n\t\treturn new ResponseXMLParser();\r\n\t}",
"private ParseInterface getParser(String sid) {\n if (parseMap.containsKey(sid)) {\n return parseMap.get(sid);\n } else {\n Log.d(TAG, \"Could not instantiate \" + sid + \"parser\");\n }\n return null;\n }",
"public static YamlParser getInstance() {\n\t\tif (instance == null) {\n\t\t\tinstance = new YamlParser();\n\t\t}\n\t\treturn instance;\n\t}",
"public CsvParser getCsvParser()\n {\n return parser;\n }",
"@SuppressWarnings(\"unchecked\")\n\tprivate StaticBasicParserPool getParserPool() {\n\t\ttry {\n\t\t\tStaticBasicParserPool parserPool = new StaticBasicParserPool();\n\t\t\tparserPool.setBuilderFeatures(Collections.singletonMap(\"http://apache.org/xml/features/dom/defer-node-expansion\", false));\n\t\t\tparserPool.initialize();\n\t\t\treturn parserPool;\n\t\t} catch (XMLParserException e) {\n\t\t\tthrow new RuntimeException(\"Error while initilizing parse pool\", e);\n\t\t}\n\t}",
"public StringParseable getParser(String input) {\n\t\treturn new XMLStringParser(input);\n\t}",
"public GithubParser getParser(String eventName) {\n GithubParser result = parsers.get(eventName);\n\n if (result == null) {\n LOGGER.info(\"Unhandled event {}\", eventName);\n }\n\n return result;\n }",
"IViewParserConfiguration getViewParserConfiguration();",
"@Bean(initMethod = \"initialize\")\n\tpublic StaticBasicParserPool parserPool() {\n\t\treturn new StaticBasicParserPool();\n\t}",
"@Bean(initMethod = \"initialize\")\n\tpublic StaticBasicParserPool parserPool() {\n\t\treturn new StaticBasicParserPool();\n\t}",
"public StringParser getStringParser();",
"@Override\n\t\t\t\tpublic boolean hasParser() {\n\t\t\t\t\treturn true;\n\t\t\t\t}",
"public static Parser getInstance() {\n\t\tif (theOne == null) {\n\t\t\ttheOne = new Parser();\n\t\t}\n\t\treturn theOne;\n\t}",
"protected ASTParser createASTParser() {\n ASTParser parser = ASTParser.newParser(this.testLevel);\n return parser;\n }",
"@Bean(initMethod = \"initialize\")\n public StaticBasicParserPool parserPool() {\n return new StaticBasicParserPool();\n }",
"private static DocumentBuilder instantiateParser()\n throws IOException {\n\n DocumentBuilder parser = null;\n\n try {\n DocumentBuilderFactory fac = DocumentBuilderFactory.newInstance();\n fac.setNamespaceAware( true );\n fac.setValidating( false );\n fac.setIgnoringElementContentWhitespace( false );\n parser = fac.newDocumentBuilder();\n return parser;\n } catch ( ParserConfigurationException e ) {\n throw new IOException( \"Unable to initialize DocumentBuilder: \" + e.getMessage() );\n }\n }",
"@Override\n public ViolationsParser createParser() {\n return new JsLintParser();\n }",
"protected T getConfigurationByCommandline() {\n\t\t\n\t\tT result = null;\n\t\t\n\t\tString[] args = this.commandLineArguments; \n\t\t\n\t\tif (args == null) {\n\t\t\tthrow new NullPointerException(\"Command line arguments have not been set in factory!\");\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tresult = (T) CliFactory.parseArguments(\n\t\t\t\tthis.configurationInterface, args\n\t\t\t);\n\t\t} catch (ArgumentValidationException e) {\n\t\t\tthrow new ConfigurationException(e.getMessage());\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public static Parser<Plays> instance() {\r\n if (INSTANCE == null) {\r\n INSTANCE = new PlaysParser();\r\n }\r\n return INSTANCE;\r\n }",
"public static Parser getParser(String url)\n\t{\n\t\ttry\n\t\t{\n\t\t\tjava.net.URLConnection conn = (new java.net.URL(url)).openConnection();\n\t\t\tconn.setRequestProperty(\"User-Agent\", \"Mozilla\");\n\t\t\tParser p = new Parser(conn);\n\t\t\treturn p;\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t}\n\t\treturn null;\n\t}",
"public static PListParser getInstance() {\n if (instance == null) {\n instance = new PListParser();\n }\n return instance;\n }",
"public static Parser getInstance(Context ctx){\n if(instance == null){\n instance = new Parser(ctx);\n }\n return instance;\n }",
"public StringParser() {\n this(ParserOptions.DEFAULT);\n }",
"public EPPSchemaCachingParser() {\n\t\ttry {\n\t\t\tinit();\n\t\t}\n\t\t catch (EPPParserException e) {\n\t\t\tcat.error(\"Couldn't instantiate parser instance\", e);\n\t\t}\n\t}",
"@Override\n public Class<? extends FileParser> resolveFileParser(Path file) {\n // getting file extension\n String filename = file.getFileName().toString();\n String[] filenameParts = filename.split(\"\\\\.\");\n String extension = filenameParts[filenameParts.length - 1];\n\n // get the class of the file parser\n return parsers.get(extension);\n }",
"public WireFeedParser getParserFor(final Document document) {\n final List<WireFeedParser> parsers = getPlugins();\n for (final WireFeedParser parser : parsers) {\n if (parser.isMyType(document)) {\n return parser;\n }\n }\n return null;\n }",
"public BooleanQueryResultParser getParser() {\r\n\t\treturn new BooleanTextParser();\r\n\t}",
"public static SAXParserFactory getSAXParserFactory() {\n\t return spf;\n\t}",
"public T getConfig() throws InvalidConfigFormatException {\n try {\n Reader settingsFile = new FileReader( getSettingsFileName() );\n T result = gsonObject.fromJson(settingsFile, settingsClass);\n settingsFile.close();\n\n return result;\n } catch (Exception e) {\n throw new InvalidConfigFormatException(\"Can't read config file: \" + e.getMessage() );\n }\n\n }",
"public ConfigManager getConfigManager ()\n {\n return cfgmgr;\n }",
"public ConfigurationNode getConfig() {\n return this.configManager.getConfig();\n }",
"public static ConfigManager getConfiguration() {\n return configuration;\n }",
"@Override\n public ConfigurationMetaData parse(String configFile) {\n ParsingMethod parsingMethod = ParsingMethod.REGEX;\n FlexGrammarParser parser = null;\n if (!StringUtils.isEmpty(configFile)) {\n try {\n CharStream input = new ANTLRInputStream(new StringReader(configFile));\n FlexGrammarLexer lex = new FlexGrammarLexer(input);\n CommonTokenStream tokens = new CommonTokenStream(lex);\n parser = new FlexGrammarParser(tokens);\n parser.removeErrorListeners();\n ErrorListener errorListener = new ErrorListener();\n parser.addErrorListener(errorListener);\n ConfigurationMetaData configMetaData = resolve(parser);\n configMetaData.setParsingMethod(parsingMethod);\n validator.validateTokenCount(configMetaData);\n return configMetaData;\n } catch (IllegalArgumentException | FlexEngineParseException e) {\n throw e;\n } catch (Exception e) {\n logger.error(\"unable to parse config file, error: {}\", e.getMessage(), e);\n throw new FlexEngineParseException(\"unable to parse config file\", e);\n }\n } else {\n logger.error(\"config file is null or empty\");\n throw new IllegalArgumentException(\"config file is null or empty\");\n }\n\n }",
"private ObjectTagsParser getTagsParser() {\n if (parser == null) {\n parser = new ObjectTagsParser();\n parser.put(\"appObj\", this);\n }\n return parser;\n }",
"public List<IRuleParser> getRuleParsers() {\n return ruleParsers;\n }",
"DerParser getParser() throws IOException {\n\n\t\t\tif (!isConstructed()) {\n\t\t\t\tthrow new IllegalStateException(\"Invalid DER: can't parse primitive entity\");\n\t\t\t}\n\n\t\t\treturn new DerParser(this.value);\n\t\t}",
"public ConfigManager getConfigManager() {\n\t\treturn configManager;\n\t}",
"public ConfigProvider getConfig() {\n return config;\n }",
"@Before public void initParser() {\n\t\tparser = new CliParserImpl(\"-\", \"--\");\n\t}",
"public static ConfigManager getConfigManager() {\n\t\treturn getInstance().defaultGroup;\n\t}",
"public boolean canBuildParser() {\r\n return isParser(getFormatter());\r\n }",
"public OptionParser() {\n\n\t}",
"protected WjrConfigLoader getConfigLoader() {\r\n\t\treturn new WjrConfigLoader();\r\n\t}",
"public static IParser getParser(IElementType type, EObject object,\n\t\t\tString parserHint) {\n\t\treturn ParserService.getInstance().getParser(\n\t\t\t\tnew HintAdapter(type, object, parserHint));\n\t}",
"public static IParser getParser(IElementType type, EObject object,\n\t\t\tString parserHint) {\n\t\treturn ParserService.getInstance().getParser(\n\t\t\t\tnew HintAdapter(type, object, parserHint));\n\t}",
"public static IParser getParser(IElementType type, EObject object,\n\t\t\tString parserHint) {\n\t\treturn ParserService.getInstance().getParser(\n\t\t\t\tnew HintAdapter(type, object, parserHint));\n\t}",
"public static IParser getParser(IElementType type, EObject object,\n\t\t\tString parserHint) {\n\t\treturn ParserService.getInstance().getParser(\n\t\t\t\tnew HintAdapter(type, object, parserHint));\n\t}",
"public static EscidocConfiguration getInstance() throws IOException {\r\n return instance;\r\n }",
"public static IParser getParser(IElementType type, EObject object,\r\n\t\t\tString parserHint) {\r\n\t\treturn ParserService.getInstance().getParser(\r\n\t\t\t\tnew HintAdapter(type, object, parserHint));\r\n\t}",
"public static IParser getParser(IElementType type, EObject object,\r\n\t\t\tString parserHint) {\r\n\t\treturn ParserService.getInstance().getParser(\r\n\t\t\t\tnew HintAdapter(type, object, parserHint));\r\n\t}",
"public Config getConfig();",
"public IModeParser getMode();",
"@Bean(name = \"parserPoolHolder\")\n public ParserPoolHolder parserPoolHolder() {\n return new ParserPoolHolder();\n }",
"protected synchronized DocumentBuilder getDocumentBuilder() throws ParserConfigurationException {\r\n if (documentBuilder != null) {\r\n return documentBuilder;\r\n } else {\r\n // create the document builder\r\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\r\n factory.setNamespaceAware(true);\r\n this.documentBuilder = factory.newDocumentBuilder();\r\n return this.documentBuilder;\r\n }\r\n }",
"public Config parseConfig() throws Exception {\n DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\n Document document = documentBuilder.parse(new File(getFile(configFile)));\n\n return parseConfig(document);\n }",
"void setParser(CParser parser);",
"public static ConfigManager getConfigManager() {\r\n\t\treturn cfgm;\r\n\t}",
"public interface IParser {\n\n /**\n * Coco/R generated function. It is used to inform parser about semantic errors.\n */\n void SemErr(String str);\n\n /**\n * Coco/R generated function for parsing input. The signature was changes in parsers' frame files so that it\n * receives source argument.\n *\n * @param source source to be parsed\n */\n void Parse(Source source);\n\n /**\n * Resets the parser but not the {@link NodeFactory} instance it holds. This way it can be used multiple times with\n * storing current state (mainly identifiers table). This is useful for parsing unit files before parsing the actual\n * source.\n */\n void reset();\n\n /**\n * Returns whether there were any errors throughout the parsing of the last source.\n */\n boolean hadErrors();\n\n /**\n * Sets support for extended goto. If this option is turned on, the parser will generate {@link cz.cuni.mff.d3s.trupple.language.nodes.statement.ExtendedBlockNode}s\n * instead of {@link cz.cuni.mff.d3s.trupple.language.nodes.statement.BlockNode}s.\n */\n void setExtendedGoto(boolean extendedGoto);\n\n /**\n * Returns true if the support for Turbo Pascal extensions is turned on.\n */\n boolean isUsingTPExtension();\n\n /**\n * Reutnrs the root node of the last parsed source.\n */\n RootNode getRootNode();\n\n}",
"@Bean\n\t@ConditionalOnMissingBean\n\tSecurityParser securityParser(PropertyResolverUtils propertyResolverUtils) {\n\t\treturn new SecurityParser(propertyResolverUtils);\n\t}",
"public Parser() {}",
"public interface ConfigParser {\n\n // TODO rbala Missing Javadoc\n IElementDef parse(ConfigSource configSource);\n\n}",
"private Parser makeParser(String input) throws LexicalException {\r\n\t\tshow(input); //Display the input \r\n\t\tScanner scanner = new Scanner(input).scan(); //Create a Scanner and initialize it\r\n\t\tshow(scanner); //Display the Scanner\r\n\t\tParser parser = new Parser(scanner);\r\n\t\treturn parser;\r\n\t}",
"private Parser () { }",
"public static Configuration getConfiguration() {\r\n\t\treturn config;\r\n\t}",
"public static Options prepCliParser()\n\t{\n\t\tOptions knowsCliDtd = new Options();\n\t\tfinal boolean needsEmbelishment = true;\n\t\tknowsCliDtd.addOption( configFlagS, configFlagLong, needsEmbelishment,\n\t\t\t\t\"path to config (ex C:\\\\Program Files\\\\apache\\\\tomcat.txt)\" );\n\t\tknowsCliDtd.addOption( verboseFlagS, verboseFlagLong,\n\t\t\t\t! needsEmbelishment, \"show debug information\" );\n\t\tknowsCliDtd.addOption( helpFlagS, helpFlagLong,\n\t\t\t\t! needsEmbelishment, \"show arg flags\" );\n\t\treturn knowsCliDtd;\n\t}",
"private String getXmSAXlParserName() {\n\t SAXParser saxParser = getSAXParser();\n\t if (saxParser == null) {\n\t return \"Could not create an XML Parser\";\n\t }\n\n\t // check to what is in the classname\n\t String saxParserName = saxParser.getClass().getName();\n\t return saxParserName;\n\t }",
"public ParseStyle getTheParseStyle() {\r\n return parseStyle;\r\n }",
"private Configuration getConfiguration() {\n return getPackageData().getConfiguration();\n }",
"protected DocumentBuilder getBuilder() {\n /** @todo check for rentrency problems when reusing the parser **/\n if (builder == null) {\n try {\n builder = Parser.getDocumentBuilder(new ParserErrorHandler());\n }\n catch (ParserConfigurationException ex) {\n Logger logger = Logger.getLogger(this.getClass());\n logger.error(ex);\n throw new EJBException(ex);\n }\n }\n return builder;\n }",
"protected Config getConfig () {\n return this.conf;\n }",
"private void init() throws EPPParserException {\n\t\tcat.debug(\"init() enter\");\n\n\t\tcat.info(\"Creating parser instance with symbol table size: \"\n\t\t\t\t + symbolTableSize);\n\n\t\t// Explicitly providing an XMLConfiguration here\n\t\t// prevents Xerces from going out and looking up\n\t\t// the default parser configuration from the System properties\n\t\t// If the symbol table size is 0 then don't create a symbol table. Just\n\t\t// use the default constructor for the XMLConfiguration. The default from\n\t\t// the XMLConfiguration will be used\n\t\tif (symbolTableSize == 0) {\n\t\t\t/**\n\t\t\t * @todo change the configuration that's instantiated to be\n\t\t\t * \t\t configurable\n\t\t\t */\n\t\t\tparserImpl = new DOMParser(new XMLGrammarCachingConfiguration());\n\t\t}\n\t\telse {\n\t\t\tSymbolTable symbolTable = new SymbolTable(symbolTableSize);\n\n\t\t\t/**\n\t\t\t * @todo change the configuration that's instantiated to be\n\t\t\t * \t\t configurable\n\t\t\t */\n\t\t\tparserImpl = new DOMParser(new XML11Configuration(symbolTable));\n\t\t}\n\n\t\t// Register this instance with the entity resolver\n\t\tEPPSchemaCachingEntityResolver resolver =\n\t\t\tnew EPPSchemaCachingEntityResolver(this);\n\n\t\tparserImpl.setEntityResolver(resolver);\n\n\t\t// setup the default behavior for this parser\n\t\tcat.debug(\"Setting default parser features. Namespaces and Schema validation are on\");\n\n\t\ttry {\n\n if (EPPEnv.getValidating()) {\n parserImpl.setFeature(VALIDATION_FEATURE_ID, true);\n parserImpl.setFeature(SCHEMA_VALIDATION_FEATURE_ID, true);\n }\n\n if (EPPEnv.getFullSchemaChecking()) {\n parserImpl.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, true);\n }\n\n // set other properties of the parser -\n parserImpl.setFeature(LOAD_EXTERNAL_DTD, false);\n parserImpl.setFeature(LOAD_DTD_GRAMMAR, false);\n parserImpl.setFeature(CREATE_ENTITY_REF_NODES, false);\n parserImpl.setFeature(INCLUDE_IGNORABLE_WHITE_SPACE, false);\n parserImpl.setFeature(EXTERNAL_GENERAL_ENTITIES, false);\n parserImpl.setFeature(EXTERNAL_PARAMETER_ENTITIES, false);\n\n\t\t\tparserImpl.setFeature(NAMESPACES_FEATURE_ID, true);\n \t\tparserImpl.setFeature(DEFER_NODE_EXPANSION, false);\n\t\t}\n catch (SAXException e) {\n\t\t\tcat.error(\"setting features of parserImpl failed\", e);\n\t\t\tthrow new EPPParserException(e);\n\t\t}\n \n // Pre-load the XML schemas based on the registerd EPPMapFactory \n // and EPPExtFactory instances.\n Set theSchemas = EPPFactory.getInstance().getXmlSchemas();\n Iterator theSchemasIter = theSchemas.iterator();\n while (theSchemasIter.hasNext()) {\n \tString theSchemaName = (String) theSchemasIter.next();\n \t\n \tcat.debug(\"init(): Pre-loading XML schema \\\"\" + theSchemaName + \"\\\"\");\n \t\n \t\t// lookup the file name in this classes's classpath under \"schemas\"\n \t\tInputStream theSchemaStream =\n \t\t\tgetClass().getClassLoader().getResourceAsStream(\"schemas/\"\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ theSchemaName);\n\n \t\n \tthis.addSchemaToCache(new XMLInputSource(theSchemaName, theSchemaName, theSchemaName, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttheSchemaStream, null));\n }\n \n \n\t\tcat.debug(\"init() exit\");\n\t}",
"public Object getConfig() {\n return config;\n }",
"static CsvParser getCsvParser(){\n CsvParserSettings settings = new CsvParserSettings();\n settings.getFormat().setLineSeparator(\"\\n\");\n return new CsvParser(settings);\n }",
"public JsonParser createParser(String content)\n/* */ throws IOException, JsonParseException\n/* */ {\n/* 879 */ int strLen = content.length();\n/* */ \n/* 881 */ if ((this._inputDecorator != null) || (strLen > 32768) || (!canUseCharArrays()))\n/* */ {\n/* */ \n/* 884 */ return createParser(new StringReader(content));\n/* */ }\n/* 886 */ IOContext ctxt = _createContext(content, true);\n/* 887 */ char[] buf = ctxt.allocTokenBuffer(strLen);\n/* 888 */ content.getChars(0, strLen, buf, 0);\n/* 889 */ return _createParser(buf, 0, strLen, ctxt, true);\n/* */ }",
"public ConfigurationManagement getConfig() {\r\n\t\treturn config;\r\n\t}"
] |
[
"0.77881366",
"0.7661719",
"0.7044575",
"0.7005261",
"0.6937173",
"0.68976057",
"0.6894687",
"0.6843272",
"0.6737571",
"0.672156",
"0.6645332",
"0.6596504",
"0.6516058",
"0.639045",
"0.6377312",
"0.63733596",
"0.63686925",
"0.6318214",
"0.63067305",
"0.6303178",
"0.6117097",
"0.6103596",
"0.6083853",
"0.6066995",
"0.5939188",
"0.5920584",
"0.58704317",
"0.5847835",
"0.5838047",
"0.58349854",
"0.5793299",
"0.57928526",
"0.5789328",
"0.572738",
"0.572738",
"0.5723586",
"0.56864566",
"0.56850916",
"0.5679457",
"0.5664912",
"0.56103975",
"0.5584498",
"0.55700684",
"0.55057174",
"0.5488414",
"0.5422677",
"0.5416993",
"0.541468",
"0.5414644",
"0.54063004",
"0.53852874",
"0.53670394",
"0.53543204",
"0.53498155",
"0.53338593",
"0.53108996",
"0.5291068",
"0.5289123",
"0.52816296",
"0.5274745",
"0.5272882",
"0.5270367",
"0.5264572",
"0.52511054",
"0.52423054",
"0.5239721",
"0.5233457",
"0.52220476",
"0.5194988",
"0.5194988",
"0.5194988",
"0.5194988",
"0.5163834",
"0.51638",
"0.51638",
"0.51358974",
"0.5135794",
"0.51257056",
"0.5120033",
"0.5117091",
"0.51170427",
"0.5112553",
"0.51072705",
"0.51016164",
"0.5083853",
"0.5083222",
"0.50807923",
"0.50593024",
"0.5037836",
"0.5037276",
"0.50355273",
"0.50340325",
"0.50148374",
"0.50013286",
"0.49597898",
"0.49379718",
"0.49173337",
"0.4916356",
"0.4914036",
"0.49093962"
] |
0.6778226
|
8
|
Convenience method for setting the current parser Setting the parser to null will force a new parser to be loaded by the service loader
|
public static void setParser(PackerFileParser newParser) {
parser = newParser;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"void setParser(CParser parser);",
"private static void loadParser() {\n if(parser_ == null)\n parser_ = ConfigIOFactory.getInstance(\"json\");\n }",
"public void setEditorParser( GosuParser parser )\n {\n _parser = parser;\n }",
"@NotNull\n\tpublic ParseResult setParserName(@NotNull String parserName) {\n\t\tthis.parserName = Util.checkNotNull(parserName);\n\t\treturn this;\n\t}",
"@Before public void initParser() {\n\t\tparser = new CliParserImpl(\"-\", \"--\");\n\t}",
"@Override\n\t\t\t\tpublic boolean hasParser() {\n\t\t\t\t\treturn true;\n\t\t\t\t}",
"protected Parser getParser() {\n\t\treturn myParser;\n\t}",
"protected void configure(ValueParser parser)\r\n {\r\n this.context = (Context)parser.getValue(ToolContext.CONTEXT_KEY);\r\n }",
"public void _default(Object parser, Object data) {\n }",
"public Parser() {\n\t\tpopulateMaps();\n\t}",
"public OptionParser getParser() {\n\t\treturn parser;\n\t}",
"public void initParser() {;\r\n lp = DependencyParser.loadFromModelFile(\"edu/stanford/nlp/models/parser/nndep/english_SD.gz\");\r\n tokenizerFactory = PTBTokenizer\r\n .factory(new CoreLabelTokenFactory(), \"\");\r\n }",
"public EPPSchemaCachingParser() {\n\t\ttry {\n\t\t\tinit();\n\t\t}\n\t\t catch (EPPParserException e) {\n\t\t\tcat.error(\"Couldn't instantiate parser instance\", e);\n\t\t}\n\t}",
"@Before\n\tpublic void initParser() {\n\t\tXMLTagParser.init(file);\n\t}",
"public void setupParser(InputStream is) {\r\n inputSource = new InputSource(is);\r\n }",
"private void setTheParseStyle(ParseStyle parseStyle) {\r\n this.parseStyle = parseStyle;\r\n }",
"public StringParser() {\n this(ParserOptions.DEFAULT);\n }",
"public Parser() {}",
"public static void setProjectRuleParser(IRuleParser ruleParser) {\n\t\tgetDefault().ruleParser = ruleParser;\n\t\t\n\t}",
"public void init() {\r\n\t\ttry {\r\n\t\t\tSAXParserFactory factory = SAXParserFactory.newInstance();\r\n\t\t\t//factory.setValidating(true);\r\n\t\t\t//factory.setFeature(\r\n\t\t\t//\t\t\"http://apache.org/xml/features/validation/schema\", true);\r\n\t\t\tfactory.setNamespaceAware(true);\r\n\t\t\t_parser = factory.newSAXParser();\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\tLoggerUtilsServlet.logErrors(e);\r\n\t\t}\r\n\t}",
"private Parser () { }",
"@Override\n public UrlExtras.Parser reset(final String url) {\n return new DevJavaUrlParser().setUrl(url);\n }",
"public NameParser()\n {\n this(null);\n }",
"@Nullable\n\tpublic String getParserName() {\n\t\treturn parserName;\n\t}",
"public HymanifestParser() {\r\n \t\tsuper(null);\r\n \t}",
"public B setParser(final Parser<List<Record>, com.arpnetworking.metrics.mad.model.HttpRequest> value) {\n _parser = value;\n return self();\n }",
"private TwigcsResultParser getParser() {\n\t\tif (parser == null) {\n\t\t\tparser = new TwigcsResultParser();\n\t\t}\n\t\treturn parser;\n\t}",
"@Nonnull public ParserPool getParserPool() {\n return parserPool;\n }",
"CParser getParser();",
"public PXStylesheetParser() {\n this(null);\n }",
"@Bean(initMethod = \"initialize\")\n public StaticBasicParserPool parserPool() {\n return new StaticBasicParserPool();\n }",
"@Bean(initMethod = \"initialize\")\n\tpublic StaticBasicParserPool parserPool() {\n\t\treturn new StaticBasicParserPool();\n\t}",
"@Bean(initMethod = \"initialize\")\n\tpublic StaticBasicParserPool parserPool() {\n\t\treturn new StaticBasicParserPool();\n\t}",
"public Parser()\n {\n //nothing to do\n }",
"protected Parser getParser() throws TemplateException {\n try {\n return (Parser) _broker.getValue(\"parser\",\"wm\"); \n } catch (Exception e) {\n Engine.log.exception(e);\n throw new TemplateException(\"Could not load parser type \\\"\" + \n _parserName + \"\\\": \" + e);\n }\n }",
"public OptionParser() {\n\n\t}",
"public void initParser(String file) {\n if (checkFileExists(file)) {\n parseXml(file);\n }\n }",
"public interface IParser {\n\n /**\n * Coco/R generated function. It is used to inform parser about semantic errors.\n */\n void SemErr(String str);\n\n /**\n * Coco/R generated function for parsing input. The signature was changes in parsers' frame files so that it\n * receives source argument.\n *\n * @param source source to be parsed\n */\n void Parse(Source source);\n\n /**\n * Resets the parser but not the {@link NodeFactory} instance it holds. This way it can be used multiple times with\n * storing current state (mainly identifiers table). This is useful for parsing unit files before parsing the actual\n * source.\n */\n void reset();\n\n /**\n * Returns whether there were any errors throughout the parsing of the last source.\n */\n boolean hadErrors();\n\n /**\n * Sets support for extended goto. If this option is turned on, the parser will generate {@link cz.cuni.mff.d3s.trupple.language.nodes.statement.ExtendedBlockNode}s\n * instead of {@link cz.cuni.mff.d3s.trupple.language.nodes.statement.BlockNode}s.\n */\n void setExtendedGoto(boolean extendedGoto);\n\n /**\n * Returns true if the support for Turbo Pascal extensions is turned on.\n */\n boolean isUsingTPExtension();\n\n /**\n * Reutnrs the root node of the last parsed source.\n */\n RootNode getRootNode();\n\n}",
"public void setSyntaxParser(SyntaxParser syntaxParser) {\n\n if (syntaxParser == null) {\n throw new IllegalArgumentException(\"textParser should not be null!\");\n }\n\n this.syntaxParser = syntaxParser;\n\n }",
"private void parse() {\n if (workingDirectory != null) {\n Parser.initConstants(this, workingDirectory, remainderFile);\n Parser.parseIt();\n workingDirectory = null;\n remainderFile = null;\n jbParse.setEnabled(false);\n }\n }",
"public GosuParser getParser()\n {\n return _parser;\n }",
"private void init() throws EPPParserException {\n\t\tcat.debug(\"init() enter\");\n\n\t\tcat.info(\"Creating parser instance with symbol table size: \"\n\t\t\t\t + symbolTableSize);\n\n\t\t// Explicitly providing an XMLConfiguration here\n\t\t// prevents Xerces from going out and looking up\n\t\t// the default parser configuration from the System properties\n\t\t// If the symbol table size is 0 then don't create a symbol table. Just\n\t\t// use the default constructor for the XMLConfiguration. The default from\n\t\t// the XMLConfiguration will be used\n\t\tif (symbolTableSize == 0) {\n\t\t\t/**\n\t\t\t * @todo change the configuration that's instantiated to be\n\t\t\t * \t\t configurable\n\t\t\t */\n\t\t\tparserImpl = new DOMParser(new XMLGrammarCachingConfiguration());\n\t\t}\n\t\telse {\n\t\t\tSymbolTable symbolTable = new SymbolTable(symbolTableSize);\n\n\t\t\t/**\n\t\t\t * @todo change the configuration that's instantiated to be\n\t\t\t * \t\t configurable\n\t\t\t */\n\t\t\tparserImpl = new DOMParser(new XML11Configuration(symbolTable));\n\t\t}\n\n\t\t// Register this instance with the entity resolver\n\t\tEPPSchemaCachingEntityResolver resolver =\n\t\t\tnew EPPSchemaCachingEntityResolver(this);\n\n\t\tparserImpl.setEntityResolver(resolver);\n\n\t\t// setup the default behavior for this parser\n\t\tcat.debug(\"Setting default parser features. Namespaces and Schema validation are on\");\n\n\t\ttry {\n\n if (EPPEnv.getValidating()) {\n parserImpl.setFeature(VALIDATION_FEATURE_ID, true);\n parserImpl.setFeature(SCHEMA_VALIDATION_FEATURE_ID, true);\n }\n\n if (EPPEnv.getFullSchemaChecking()) {\n parserImpl.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, true);\n }\n\n // set other properties of the parser -\n parserImpl.setFeature(LOAD_EXTERNAL_DTD, false);\n parserImpl.setFeature(LOAD_DTD_GRAMMAR, false);\n parserImpl.setFeature(CREATE_ENTITY_REF_NODES, false);\n parserImpl.setFeature(INCLUDE_IGNORABLE_WHITE_SPACE, false);\n parserImpl.setFeature(EXTERNAL_GENERAL_ENTITIES, false);\n parserImpl.setFeature(EXTERNAL_PARAMETER_ENTITIES, false);\n\n\t\t\tparserImpl.setFeature(NAMESPACES_FEATURE_ID, true);\n \t\tparserImpl.setFeature(DEFER_NODE_EXPANSION, false);\n\t\t}\n catch (SAXException e) {\n\t\t\tcat.error(\"setting features of parserImpl failed\", e);\n\t\t\tthrow new EPPParserException(e);\n\t\t}\n \n // Pre-load the XML schemas based on the registerd EPPMapFactory \n // and EPPExtFactory instances.\n Set theSchemas = EPPFactory.getInstance().getXmlSchemas();\n Iterator theSchemasIter = theSchemas.iterator();\n while (theSchemasIter.hasNext()) {\n \tString theSchemaName = (String) theSchemasIter.next();\n \t\n \tcat.debug(\"init(): Pre-loading XML schema \\\"\" + theSchemaName + \"\\\"\");\n \t\n \t\t// lookup the file name in this classes's classpath under \"schemas\"\n \t\tInputStream theSchemaStream =\n \t\t\tgetClass().getClassLoader().getResourceAsStream(\"schemas/\"\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ theSchemaName);\n\n \t\n \tthis.addSchemaToCache(new XMLInputSource(theSchemaName, theSchemaName, theSchemaName, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttheSchemaStream, null));\n }\n \n \n\t\tcat.debug(\"init() exit\");\n\t}",
"public Parser()\n{\n //nothing to do\n}",
"@Override\r\n\tpublic XMLParser getParser() {\r\n\t\treturn new ResponseXMLParser();\r\n\t}",
"public ParserType getParserType() {\n\t\treturn parser;\n\t}",
"void initBeforeParsing() {\r\n }",
"@Before\n public void buildParser() throws Exception {\n parser = new com.putable.siteriter.msmith19.SDLParserImpl();\n }",
"public BlobParserConfig() {\n\t\tthis.libraryPath = null;\n\t\tthis.parserClass = null;\n\t}",
"private Parser() {\n objetos = new ListaEnlazada();\n }",
"public HTMLParser () {\r\n this.pagepart = null;\r\n }",
"public synchronized void init() throws IOException\n {\n parserIn = new PipedOutputStream();\n PipedInputStream in = new PipedInputStream();\n parserIn.connect( in );\n antlrSchemaConverterLexer lexer = new antlrSchemaConverterLexer( in );\n parser = new antlrSchemaConverterParser( lexer );\n }",
"public void setGroupParser(IGroupParser groupParser) {\n this.groupParser = groupParser;\n }",
"public ParseOptions() {}",
"public AbstractRequestParser()\n {\n super();\n \n //set flag\n this.initialized=false;\n }",
"private SAXParserProvider() {\n // empty\n }",
"@Before\n public void setUp()\n {\n Parser.resetParser();\n }",
"@Bean(name = \"parserPoolHolder\")\n public ParserPoolHolder parserPoolHolder() {\n return new ParserPoolHolder();\n }",
"public static PackerFileParser get() {\r\n\t\tif(parser==null) {\r\n\t\t\tIterator<PackerFileParser> packerFileParseIterator = \r\n\t\t\t\t\tServiceLoader.load(PackerFileParser.class).iterator();\r\n\t\t\t\r\n\t\t\tif(packerFileParseIterator.hasNext()) {\r\n\t\t\t\tparser = packerFileParseIterator.next();\r\n\t\t\t} else {\r\n\t\t\t\tparser = new PackerFileParserImpl();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn parser;\r\n\t}",
"private ParseInterface getParser(String sid) {\n if (parseMap.containsKey(sid)) {\n return parseMap.get(sid);\n } else {\n Log.d(TAG, \"Could not instantiate \" + sid + \"parser\");\n }\n return null;\n }",
"public void parse() {\n }",
"@SuppressWarnings(\"unchecked\")\n\tprivate StaticBasicParserPool getParserPool() {\n\t\ttry {\n\t\t\tStaticBasicParserPool parserPool = new StaticBasicParserPool();\n\t\t\tparserPool.setBuilderFeatures(Collections.singletonMap(\"http://apache.org/xml/features/dom/defer-node-expansion\", false));\n\t\t\tparserPool.initialize();\n\t\t\treturn parserPool;\n\t\t} catch (XMLParserException e) {\n\t\t\tthrow new RuntimeException(\"Error while initilizing parse pool\", e);\n\t\t}\n\t}",
"public ResolveByExtension() {\n this.parsers = new HashMap<>();\n }",
"public static void setStorage(Storage storage) {\n Parser.storage = storage;\n }",
"@Deprecated\n public parser(java_cup.runtime.Scanner s) {super(s);}",
"@Deprecated\n public parser(java_cup.runtime.Scanner s) {super(s);}",
"@Deprecated\n public parser(java_cup.runtime.Scanner s) {super(s);}",
"@Deprecated\n public parser(java_cup.runtime.Scanner s) {super(s);}",
"public parser(Scanner s) {super(s);}",
"public OnionooParser() {\n\n\t}",
"public void setFromTag(String tag) throws ParseException,NullPointerException;",
"private SAXParser getSAXParser() {\n\t SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();\n\t if (saxParserFactory == null) {\n\t return null;\n\t }\n\t SAXParser saxParser = null;\n\t try {\n\t saxParser = saxParserFactory.newSAXParser();\n\t } catch (Exception e) {\n\t }\n\t return saxParser;\n\t }",
"public abstract ArgumentParser makeParser();",
"public void setParseFields() {\n setParseRating();\n setParsePrice();\n setParsePhone();\n setParseRestaurantId();\n setParseAlias();\n setParseIsClosed();\n setParseReviewCount();\n setParseName();\n setParseUrl();\n setParseImageUrl();\n setParseDistance();\n setParseAddress();\n setParseCuisine();\n setParseTransactions();\n }",
"public void setLoader(Loader loader)\r\n {\r\n _loader = loader;\r\n }",
"protected static IParser getParser(final FhirContext ctx, FHIRMediaType mt) {\n\t\tIParser parser = null;\n\n\t\tfinal ParserType parserType = mt.getParserType();\n\t\tswitch (parserType) {\n\t\tcase JSON:\n\t\t\tparser = ctx.newJsonParser();\n\t\t\tbreak;\n\t\tcase XML:\n\t\tdefault:\n\t\t\tparser = ctx.newXmlParser();\n\t\t\tbreak;\n\t\t}\n\t\treturn parser;\n\t}",
"public DefaultLoaderDefinition() {\n\t\t// nothing to do\n\t}",
"public interface Parser {\n\n}",
"@Override\n\tpublic void configure(CommandLineParser parser) {\n\t\tparser.addOptions(plugins);\n\t}",
"public void setLoader(Loader loader) {\n\t\tif (loader == null) {\n\t\t\tthrow new NullPointerException(\"loader must not be null\");\n\t\t}\n\t\tthis.loader = loader;\n\t}",
"protected JsonParser getJsonParser( ) {\r\n\t\treturn jsonParser;\r\n\t}",
"public static IRuleParser getRuleParser() {\n\t\tif(getDefault().ruleParser == null) {\n\t\t\t// up to now, there is no other parser than XML\n\t\t\tgetDefault().ruleParser = new XMLRuleParser();\n\t\t}\n\t\treturn getDefault().ruleParser;\n\t}",
"public ResolvingXMLReader(CatalogManager manager) {\n/* 86 */ super(manager);\n/* 87 */ SAXParserFactory spf = JdkXmlUtils.getSAXFactory(this.catalogManager.overrideDefaultParser());\n/* 88 */ spf.setValidating(validating);\n/* */ try {\n/* 90 */ SAXParser parser = spf.newSAXParser();\n/* 91 */ setParent(parser.getXMLReader());\n/* 92 */ } catch (Exception ex) {\n/* 93 */ ex.printStackTrace();\n/* */ } \n/* */ }",
"public DOMParser() { ; }",
"public Parser(String parserFilename, String dataFilename)\n/* */ {\n/* 57 */ initComponents();\n/* */ \n/* 59 */ this.parserPanel = new ParserPanel();\n/* 60 */ getContentPane().add(\"Center\", this.parserPanel);\n/* 61 */ if (parserFilename != null) {\n/* 62 */ this.parserPanel.loadParser(parserFilename);\n/* */ }\n/* 64 */ if (dataFilename != null) {\n/* 65 */ this.parserPanel.loadFile(dataFilename);\n/* */ }\n/* 67 */ pack();\n/* */ }",
"public CrossrefUnixrefSaxParser() {\n }",
"@Override\n\tpublic String unparse() {\n\t\treturn null;\n\t}",
"void resetState() {\n\t\t// Reinitialize parser if parsetable changed (due to .meta file)\n\t\tif (getParseTable() != parser.getParseTable()) {\n\t\t\tparser = Environment.createSGLR(getParseTable());\n\t\t}\n\t\tparser.setTimeout(timeout);\n\t\tif (disambiguator != null) parser.setDisambiguator(disambiguator);\n\t\telse disambiguator = parser.getDisambiguator();\n\t\tsetUseRecovery(useRecovery);\n\t\tif (!isImplodeEnabled()) {\n\t\t\tparser.setTreeBuilder(new Asfix2TreeBuilder(Environment.getTermFactory()));\n\t\t} else {\n\t\t\tassert parser.getTreeBuilder() instanceof TreeBuilder;\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tITreeFactory<IStrategoTerm> treeFactory = ((TreeBuilder) parser.getTreeBuilder()).getFactory();\n\t\t\tassert ((TermTreeFactory) treeFactory).getOriginalTermFactory()\n\t\t\t\tinstanceof ParentTermFactory;\n\t\t\tif (incrementalParser == null || incrementalParser.getParser().getParseTable() != parser.getParseTable())\n\t\t\t\tincrementalParser = new IncrementalSGLR<IStrategoTerm>(parser, null, treeFactory, IncrementalSortSet.read(getParseTable()));\n\t\t}\n\t}",
"public LanguageTranslator() {\n super(SERVICE_NAME);\n if ((getEndPoint() == null) || getEndPoint().isEmpty()) {\n setEndPoint(URL);\n }\n }",
"public BasicLineParser() {\n/* 99 */ this(null);\n/* */ }",
"@Override\n\tpublic void parse() throws IOException {\n\t}",
"public FeedParsers() {\n super(FEED_PARSERS_KEY);\n }",
"public Parser(ParserTokenManager tm) {\r\n token_source = tm;\r\n token = new Token();\r\n jj_ntk = -1;\r\n }",
"public IncrementalSAXSource_Xerces(SAXParser parser)\n throws NoSuchMethodException\n {\n // Reflection is used to allow us to compile against\n // Xerces2. If/when we can abandon the older versions of the parser,\n // this constructor will simply have to fail until/unless the\n // Xerces2 incremental support is made available on previously\n // constructed SAXParser instances.\n fIncrementalParser=parser;\n Class<?> me=parser.getClass();\n Class<?>[] parms={InputSource.class};\n fParseSomeSetup=me.getMethod(\"parseSomeSetup\",parms);\n parms=new Class<?>[0];\n fParseSome=me.getMethod(\"parseSome\",parms);\n // Fallback if this fails (implemented in createIncrementalSAXSource) is\n // to use IncrementalSAXSource_Filter rather than Xerces-specific code.\n }",
"protected StreamParser()\n {\n }",
"SurveyParser(DataParser dataParser, FileGenerator fileGenerator) {\n this.dataParser = dataParser;\n this.fileGenerator = fileGenerator;\n }",
"public OpenOfficeXMLDocumentParser() {\r\n }",
"public static Parser getInstance() {\n\t\tif (theOne == null) {\n\t\t\ttheOne = new Parser();\n\t\t}\n\t\treturn theOne;\n\t}",
"public ProcessInstrumenter(){\n\t\tparser = new DOMParser();\n\t\tnoActivity.add(\"variables\");\n\t\tnoActivity.add(\"correlationSets\");\n\t\tnoActivity.add(\"partnerLinks\");\n\t\tnoActivity.add(\"eventHandlers\");\n\t\tnoActivity.add(\"faultHandlers\");\n\t\tnoActivity.add(\"compensationHandlers\");\n\t}",
"private Parser[] getParsers() {\n return new Parser[]{new OpenDocumentParser()};\n }",
"public ParserType getParserType() {\n\t\t\treturn parserType;\n\t\t}"
] |
[
"0.7158758",
"0.6568426",
"0.6351051",
"0.6244449",
"0.61003226",
"0.60631454",
"0.59922624",
"0.59672725",
"0.5873301",
"0.5807757",
"0.5772558",
"0.57481843",
"0.57463163",
"0.5659732",
"0.56417465",
"0.5585626",
"0.5581508",
"0.55474484",
"0.54951864",
"0.5492005",
"0.5456339",
"0.539485",
"0.53825366",
"0.53613174",
"0.5346759",
"0.5331211",
"0.53220284",
"0.53205895",
"0.5320104",
"0.53197944",
"0.5313123",
"0.53016675",
"0.53016675",
"0.5298186",
"0.529363",
"0.5284945",
"0.52772677",
"0.52768856",
"0.5273127",
"0.52720517",
"0.5233774",
"0.5192322",
"0.51843655",
"0.5175283",
"0.51397485",
"0.5126497",
"0.5122202",
"0.5121475",
"0.51180685",
"0.5109874",
"0.510299",
"0.50767654",
"0.50629044",
"0.5056468",
"0.5044733",
"0.50341654",
"0.50254774",
"0.50250536",
"0.5016622",
"0.50121343",
"0.4997996",
"0.49716553",
"0.4964079",
"0.49567887",
"0.49567887",
"0.49567887",
"0.49567887",
"0.49535346",
"0.4946246",
"0.49447298",
"0.490971",
"0.4908553",
"0.490692",
"0.49052536",
"0.48898047",
"0.48775262",
"0.48759764",
"0.48631158",
"0.48508438",
"0.4848329",
"0.48442113",
"0.48430362",
"0.48429072",
"0.48426285",
"0.48386616",
"0.48350343",
"0.48309624",
"0.48227212",
"0.48225808",
"0.48177564",
"0.48151582",
"0.48032948",
"0.4784032",
"0.47821617",
"0.4774205",
"0.47690684",
"0.47657079",
"0.4761197",
"0.47539896",
"0.47409844"
] |
0.65160525
|
2
|
Metodo do link que grava o cliente antes de salvar a solicitacao
|
public void gravarCliente() {
Cliente cliente = new DAO<Cliente>(Cliente.class)
.buscaPorId(this.clienteId);
this.solicitacao.adicionaCliente(cliente);
System.out.println("Cliente a gravar é " + cliente.getNome());
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\r\n\tprotected String getUrl() {\n\t\treturn urlWS + \"/actualizarCliente\";\r\n\t}",
"void realizarSolicitud(Cliente cliente);",
"public void onClick$editClientButton() {\n\n\t\tClient client = buildClient();\n\t\tclient.setId(clientToEdit.getId());\n\n\t\tClientService clientService = ServiceLocator.getClientService();\n\n\t\ttry {\n\t\t\tclientService.saveOrUpdate(client);\n\t\t} catch (Exception e) {\n\t\t\tmessageLabel.setValue(\"Error al crear el cliente\");\n\t\t\tLOGGER.error(e);\n\t\t}\n\t\tExecutions.sendRedirect(\"queryClients.zul\");\n\t\tmessageLabel.setValue(\"Cliente creado exitosamente.\");\n\t}",
"@Override\r\n public void onClick(View v) {\n consultarSesiones(sucursal.getId(),clienteID, fecha, beacon);\r\n }",
"@Override\n\tpublic void cadastrar(Cliente o) {\n\t\t\n\t}",
"@Override\n\tpublic void altaCliente(Cliente cliente) {\n\t}",
"public String gravar() {\n\t\tSystem.out.println(\"Gravando Solicitação \");\n\n\t\tif (solicitacao.equals(\"null\")) {\n\t\t\tthrow new RuntimeException(\"Usuario deve ter pelomenos nome\");\n\t\t}\n\n\t\tif (this.solicitacao.getId() == null) {\n\t\t\tnew DAO<Solicitacao>(Solicitacao.class).adiciona(this.solicitacao);\n\t\t} else {\n\t\t\tnew DAO<Solicitacao>(Solicitacao.class).atualiza(this.solicitacao);\n\t\t}\n\n\t\tthis.solicitacao = new Solicitacao();\n\t\treturn \"solicitacoes?faces-redirect=true\";\n\n\t}",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t\tIoSeb ioSeb = new IoSeb();\n\t\t\tioSeb.ajoutParam(\"nomUser\", editNomUser.getText().toString());\n\t\t\tioSeb.ajoutParam(\"prenomUser\", editPrenomUser.getText().toString());\n\t\t\tioSeb.ajoutParam(\"motDePasse\", editMotDePasse.getText().toString());\n\t\t\tioSeb.outputSeb(UrlScriptsPhp.urlLireValiderIdEtServiceUser,\n\t\t\t\t\tnew String[] { \"idUser\", \"service\" },\n\t\t\t\t\tgetApplicationContext(), handlerValiderUser);\n\t\t}",
"public String GenerateApprovaAssegnamentoLink(String id_cliente, String id_autista, String id_automezzo,String data){\n if(id_autista!=null && id_cliente!=null &&id_automezzo!=null){\n return \"<a class='approve-link' href='approva-assegnamento?id_automezzo=\"+id_automezzo+\"&id_cliente=\"+id_cliente+\"&id_autista=\"+id_autista+\"&data=\"+data+\"'>Approva</a>\";\n }\n return \"Non disponibile\";\n }",
"public String paginaEditCliente(){\n\t\t\r\n\t\treturn \"editcli\";\r\n\t}",
"public String ajouterClient(){\n\t\tClient cAjout=cliService.ajouterClient(client);\r\n\t\t\r\n\t\tif(cAjout.getIdClient()!=0){\r\n\t\r\n\t\r\n\t\t\t\r\n\t\t\treturn \"accueilClient\";\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\t\tnew FacesMessage(\"L'ajout a échoué\"));\r\n\t\t\treturn \"creationClient\";\r\n\t\t}\r\n\t}",
"public void linkAccount() {}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\trequest_type = WebServiceUrls.SA_GETSESSIONCHECKINS;\n\t\t\t\tdoRequest();\n\t\t\t}",
"public void onClick(View v) {\n\t\t\t\tif (networkAvailable()){\r\n\t\t\t\t\tIntent intent = new Intent(ClientesListTask.this, MapaClientes.class);\t\t\r\n\t\t\t\t\tintent.putExtra(\"idusuario\", idusuario);\t\t\t\t\t\t\r\n\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tToast.makeText(ClientesListTask.this, \"Necesita conexion a internet para ver el mapa\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}",
"public String link() {\n return DevRant.BASE_URL + DevRant.RANT_URL + '/' + getId();\n }",
"public alterarSenhaCliente() {\n }",
"public void onClick$cancelEditClientButton() {\n\t\tExecutions.sendRedirect(\"queryClients.zul\");\n\t}",
"public void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(ClientesListTask.this, Buscaclientes.class);\t\t\r\n\t\t\t\tintent.putExtra(\"idusuario\", idusuario);\r\n\t\t\t\tintent.putExtra(\"boolVer\", 1);\r\n\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}",
"public void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(ClientesListTask.this, ClientesListTask.class); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\tintent.putExtra(\"idusuario\", idusuario);\r\n\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}",
"public void setReferenciado(java.lang.String referenciado);",
"Reserva Obtener();",
"@Override\n public void onClick(View v) {\n if (v==bt_salvar){\n bt_salvar.setEnabled(false);\n\n rua = etRua.getText().toString();\n numero = etNumero.getText().toString();\n bairro = etBairro.getText().toString();\n cep = etCep.getText().toString();\n cidade = etCidade.getText().toString();\n uf = etEstado.getText().toString();\n\n /*Inicializacao do objeto cliente, com todos seus atributos*/\n cliente = new Cliente(razao_social, fantasia, codigo_cliente,\n telefone, inscricao_est, cnpj_cpf,\n rua, numero, bairro, cep, cidade, uf);\n\n\n //salvamos o cliente, chamsndo o metodo do cliente.\n if(controle.salvar_cliente(cliente, this)){\n //mensagem de sucesso\n exibe_mensagem(\"Cliente Salvo com Sucesso\");\n }\n //mensagem de erro\n else{\n exibe_mensagem(\"ERRO ao tentar salvar o cadastro!\");\n }\n\n //Inicia a Activity anterior, para que o usuario possa cadastrar um novo usuario.\n Intent it = new Intent(this, CadastroCliente.class);\n startActivity(it);\n finish();\n }\n\n //Gerencia botao voltar\n if (v==bt_voltar_cce || v==imageButton_voltar_cc_end){\n Intent it = new Intent(this, CadastroCliente.class);\n\n startActivity(it);\n finish();\n }\n\n }",
"@Override\r\n\tprotected String getUrl() {\n\t\treturn urlWS + \"/ConsultarIndiceEjecucionAnio\";\r\n\t}",
"public void _linkClient(ModelElement client1);",
"void grabarCliente(){\n RequestParams params = new RequestParams();\n params.put(\"nombre\",edtNombre.getText().toString().trim());\n params.put(\"apellido\",edtApellido.getText().toString().trim());\n params.put(\"correo\", edtCorreo.getText().toString().trim());\n String claveMD5 = edtClave.getText().toString().trim();\n try {\n params.put(\"clave\", ws.getMD5(claveMD5));\n } catch (Exception e) {\n e.printStackTrace();\n }\n params.put(\"id_cargo\",idCargo);\n params.put(\"autoriza\",validarCheckBoxAutoriza());\n crearUsuarioWS(params);\n }",
"public void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(ClientesListTask.this, Directorio.class);\r\n\t\t\t\tintent.putExtra(\"idusuario\", idusuario);\t\r\n\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}",
"public void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(ClientesListTask.this, Calendario.class);\r\n\t\t\t\tintent.putExtra(\"idusuario\", idusuario);\r\n\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}",
"public void salvaCliente() {\n \n \n \n \n String nome = view.getjTextNome().getText(); //Tive que criar getter e setter pra poder acessar os campos da view\n String telefone = view.getjTextTelefone().getText();\n String cpf = view.getjTextCpf().getText();\n String endereco = view.getjTextEndereco().getText();\n\n \n Cliente client = new Cliente( nome, telefone, cpf, endereco);\n \n \n \n try {\n Connection conexao = new Conexao().getConnection();\n ClienteDAO clientedao = new ClienteDAO(conexao);\n clientedao.insert(client);\n \n JOptionPane.showMessageDialog(null, \"Cliente Cadastrado!\");\n \n } catch (SQLException ex) {\n //Logger.getLogger(CadCliente.class.getName()).log(Level.SEVERE, null, ex);\n JOptionPane.showMessageDialog(null, \"Erro ao cadastrar!\"+ex);\n }\n }",
"@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tclientAnchor.setHref(GWT.getHostPageBaseURL() + \"IT_Projekt.html\");\r\n\t\t}",
"public OCSPCliente(String servidorURL)\r\n {\r\n this.servidorURL = servidorURL;\r\n }",
"public void procesarRespuestaServidor(RutinaG rutina) {\n\n bdHelperRutinas = new BdHelperRutinas(context, BD_Rutinas);\n bdHelperRutinas.openBd();\n ContentValues registro = prepararRegistroRutina(rutina);\n bdHelperRutinas.insertTabla(DataBaseManagerRutinas.TABLE_NAME, registro);\n bdHelperRutinas.closeBd();\n }",
"public void enviarAlertaDeQueEstaOnline(){\n //mandaria un mail a los usuarios avisando que ya esta disponible para ver.\n System.out.println(\"Enviando mail con url \" + this.url);\n }",
"public void generateEnquireLink();",
"public String llenar(){\r\n HttpServletRequest request= (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();\r\n String idCliente= request.getParameter(\"idCliente\");\r\n cliente= modelo.encontrarCliente(idCliente);\r\n return \"cliente\";\r\n }",
"public void clickOnServiceLink() {\n Reporter.addStepLog(\"Clicking on service link: \" + _link_service);\n clickOnElement(_link_service);\n log.info(\"Clicking on login link: \" + _link_service);\n }",
"public String borra(Cliente cliente) {\n clienteDAO.borra(cliente.getId());\n return \"listado\";\n }",
"private void handleOptionOne() {\n\n ClientData clientData = view.askForClientPersonalDataAndCreateClientData(); // zwracamy stworzonego w widoku clienta z wrpowadoznych scanerem danych\n clientModel.save(clientData); // zapisujemy clienta do bazy danych\n view.showClientInformation(clientData); // wyswietlamy info o jego pinie itp.\n\n }",
"@Override\r\n\tprotected String getUrl() {\n\t\treturn urlWS + \"/GuardarSustento\";\r\n\t}",
"public void Pedircarnet() {\n\t\tSystem.out.println(\"solicitar carnet para verificar si es cliente de ese consultorio\");\r\n\t}",
"@Override\n\tpublic void asignarClienteAcobrador() {\n\t\tSet<ClienteProxy> lista=grid.getMultiSelectionModel().getSelectedSet();\t\t\n\t\tif(!lista.isEmpty()){\n\t\t\tFACTORY.initialize(EVENTBUS);\n\t\t\tContextGestionCobranza context = FACTORY.contextGestionCobranza();\t\t\t\n\t\t\tRequest<Boolean> request=context.asignarClientesAlCobrador(lista, beanGestorCobranza.getIdUsuarioOwner(), beanGestorCobranza.getIdUsuarioCobrador() , beanGestorCobranza.getIdGestorCobranza());\n\t\t\trequest.fire(new Receiver<Boolean>(){\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(Boolean response) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tgoToBack();\n\t\t\t\t}});\n\t\t}else{\n\t\t\tNotification not=new Notification(Notification.ALERT,constants.seleccioneCliente());\n\t\t\tnot.showPopup();\n\t\t}\n\t}",
"@FXML\n public void menuItemCadastroClienteClick() throws IOException {\n chamaTela(\"Cliente\");\n }",
"public void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(ClientesListTask.this, Amortizacion.class); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\tintent.putExtra(\"idusuario\", idusuario);\r\n\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(Intent.ACTION_SEND);\n\t\t\t\ti.setType(\"text/plain\");\n\t\t\t\ti.putExtra(Intent.EXTRA_SUBJECT, \"Sharing URL\");\n\t\t\t\ti.putExtra(Intent.EXTRA_TEXT, prodUrl);\n\t\t\t\tstartActivity(Intent.createChooser(i, \"Share URL\"));\n\t\t\t}",
"public Sesion(Cliente cl) {\n this.cliente = cl;\n estado = Estado.inicioBot;\n accion = Accion.iniciarSesion;\n valor = ValorAIngresar.pin;\n mensajeRecibido = null;\n respuesta = new Respuesta();\n }",
"public String crea() {\n c.setId(0);\n clienteDAO.crea(c); \n //Post-Redirect-Get\n return \"visualiza?faces-redirect=true&id=\"+c.getId();\n }",
"private static void menuCadastroCliente() throws Exception {\r\n String nome, email, cpf;\r\n int id;\r\n boolean erro = false;\r\n System.out.println(\"\\n\\t*** Cadastro ***\\n\");\r\n System.out.print(\"Nome completo: \");\r\n nome = read.nextLine();\r\n System.out.print(\"Email: \");\r\n email = read.next();\r\n do {\r\n System.out.print(\"CPF: \");\r\n cpf = read.next().replace(\".\", \"\").replace(\"-\", \"\");\r\n System.out.println(cpf);\r\n if (cpf.length() != 11) {\r\n System.out.println(\"CPF inválido!\\nDigite novamente!\");\r\n erro = true;\r\n }\r\n } while (erro);\r\n if (getCliente(email) == null) {\r\n\r\n id = arqClientes.inserir(new Cliente(nome, email, cpf));\r\n System.out.println(\"Guarde seu email, pois é através dele que você efetua o login em nossa plataforma\");\r\n System.out.println(\"Cadastro efetuado!\");\r\n gerenciadorSistema();\r\n } else {\r\n System.out.println(\"\\nJá existe Usuario com esse email!\\nCadastro cancelado!\");\r\n }\r\n }",
"public String GenerateRifiutaAssegnamentoLink(String id_cliente, String id_autista, String id_automezzo,String data){\n if(id_autista!=null && id_cliente!=null &&id_automezzo!=null){\n return \"<a class='rifiuta-link' href='rifiuta-assegnamento?id_automezzo=\"+id_automezzo+\"&id_cliente=\"+id_cliente+\"&id_autista=\"+id_autista+\"&data=\"+data+\"'>Rifiuta</a>\";\n }\n return \"Non disponibile\";\n }",
"public void openPortal(String id){\n\n\n\n\n }",
"public static void linkDocenteCorso(long idDocente, long idCorso) {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.LINK_DOCENTE_CORSO;\n\t\t\trp.parameters = new Object[] { idDocente, idCorso };\n\t\t\tsend(rp);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"LINK_DOCENTE_CORSO\");\n\t\t}\n\t}",
"public void selecionarCliente() {\n int cod = tabCliente.getSelectionModel().getSelectedItem().getCodigo();\n cli = cli.buscar(cod);\n\n cxCPF.setText(cli.getCpf());\n cxNome.setText(cli.getNome());\n cxRua.setText(cli.getRua());\n cxNumero.setText(Integer.toString(cli.getNumero()));\n cxBairro.setText(cli.getBairro());\n cxComplemento.setText(cli.getComplemento());\n cxTelefone1.setText(cli.getTelefone1());\n cxTelefone2.setText(cli.getTelefone2());\n cxEmail.setText(cli.getEmail());\n btnSalvar.setText(\"Novo\");\n bloquear(false);\n }",
"public void msgOsvjeziStranicu(String link, int brojPromjena) {\n\n if (this.link.equalsIgnoreCase(link)) {\n \n automatskoOsvjezavanje++;\n \n this.brojPromjena += brojPromjena;\n }else{\n if(this.slijedeci != null){\n this.slijedeci.msgOsvjeziStranicu(link, brojPromjena);\n }\n }\n\n }",
"public String chaveSecundaria(){\r\n return this.email;\r\n }",
"protected void clickOnCreerClient() {\n\t\t\t_currentPage = ((DoliNouveauTiersPage)_currentPage).clickOnCreerClient();\n\t\t}",
"private void select(ActionEvent e){\r\n // Mark this client as an existing client since they are in the list\r\n existingClient = true;\r\n // To bring data to Management Screen we will modify the text fields\r\n NAME_FIELD.setText(client.getName());\r\n ADDRESS_1_FIELD.setText(client.getAddress1());\r\n ADDRESS_2_FIELD.setText(client.getAddress2());\r\n CITY_FIELD.setText(client.getCity());\r\n ZIP_FIELD.setText(client.getZip());\r\n COUNTRY_FIELD.setText(client.getCountry());\r\n PHONE_FIELD.setText(client.getPhone());\r\n // client.setAddressID();\r\n client.setClientID(Client.getClientID(client.getName(), client.getAddressID()));\r\n // Pass client information to Client Management Screen\r\n currClient = client;\r\n back(e);\r\n }",
"public String soumettreRv(){\n\t\t// Traitement ici ...\n\t\t// Un exemple d'utilisation du service\n\t\tserviceRv.ajouterRendezVous(this.getRv());\n\t\treturn REDIRECT;\n\t}",
"@Override\n\tpublic void enviarNovaSenhaEmail(Cliente cliente, String newSenha) {\n\t\tSimpleMailMessage sm = prepararNovaSenhaEmail(cliente, newSenha);\n\t\tenviarEmail(sm);\n\t\t\n\t}",
"Cliente(){}",
"@Override\n public void onClick(View v) {\n HashMap<String, String> params = new HashMap<String, String>();\n params.put(\"username\", txt_id.getText().toString());\n params.put(\"password\", txt_mdp.getText().toString());\n params.put(\"registrationid\", getRegistrationId());\n\n NetworkResultProvider np = new NetworkResultProvider(CONNECT_REQUEST, \"connect\", params);\n np.setOnNewWsRequestListener(this);\n np.execute();\n }",
"@Override\n\tpublic void goToUiSelectClient(String modo) {\n\t\tif (modo.equalsIgnoreCase(constants.modoNuevo())) {\n\t\t\tuiHomeCobrador.getHeader().getLblTitulo().setText(constants.clientes());\n\t\t\tuiHomeCobrador.getHeader().setVisibleBtnMenu(false);\n\t\t\tuiHomeCobrador.getContainer().showWidget(3);\t\t\t\n\t\t\tuiHomeCobrador.getUiClienteSelected().cargarClienteSinCobrador();\n\t\t\tuiHomeCobrador.getUiClienteSelected().setBeanGestorCobranza(beanGestorCobranza);\n\t\t\tuiHomeCobrador.getUiClienteSelected().grid.getMultiSelectionModel().clear();\n\t\t}\n\t}",
"public int ajouteClient(Client client) throws SQLException{\n\t\treturn iDaoClient.ajoutClient(client);\n\t}",
"@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tIntent elimSustento = new Intent(context,EliminarSustentoActivity.class);\r\n\t\t\t\t\telimSustento.putExtra(EliminarSustentoActivity.CODIGO_CLIENTE, codigo_cliente);\r\n\t\t\t\t\telimSustento.putExtra(EliminarSustentoActivity.CODIGO_PLAN, codigo_plan);\r\n\t\t\t\t\telimSustento.putExtra(EliminarSustentoActivity.CODIGO_ACTIVIDAD, codigo_actividad);\r\n\t\t\t\t\telimSustento.putExtra(EliminarSustentoActivity.CODIGO_SUSTENTO, sustentoTemporal.getCodigoSustento());\r\n\t\t\t\t\tcontext.startActivity(elimSustento);\r\n\t\t\t\t}",
"public void AdminLink(){\n\t\tAdminLink.click();\n\t}",
"@RequestMapping(value = \"/link\", method = RequestMethod.GET)\n\tString link() {\n\t\ttry {\n\t\t\thueUseCase.linkBridgeWithNewUser();\n\t\t} catch (NullPointerException e) {\n\t\t\t// User did not press the Bridge button.\n\t\t\tSonarUtil.swallowException(e);\n\t\t\treturn \"setup\";\n\t\t}\n\n\t\treturn \"redirect:/configdata\";\n\t}",
"private void botaoSalvar4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_botaoSalvar4MouseClicked\n\n // Instancia objeto com metodo de verificacao dos campos.\n VerificacoesCamposCliente verificarCampos = new VerificacoesCamposCliente();\n\n // Insere confirmacao para insercao.\n int confirmar = JOptionPane.showConfirmDialog(null, \"Confirmacao\", \"Deseja prosseguir?\", JOptionPane.OK_OPTION);\n\n // Se positiva a continuacao.\n if (confirmar == 0) {\n\n // Para erros em sql.\n try {\n\n //Cria objeto de verificacao.\n boolean verificar = false;\n\n // Instancia objeto com o metodo de verificacao.\n // Seu parametro tem os campos de verificacao do painel.\n verificar = verificarCampos.verificarFormularios(\n textoNome.getText(),\n textoCPF.getText(),\n comboGenero.getSelectedItem().toString(),\n textoDataDeNascimento.getText(),\n textoEnderecoLogradouro.getText(),\n textoBairro.getText(),\n textoComplemento.getText(),\n textoNumero.getText(),\n textoTelefone.getText(),\n textoCelular.getText(),\n textoCEP.getText(),\n textoDD_Telefone.getText(),\n textoDD_Celular.getText()\n );\n \n // Verifica se ja eh existente o cpf.\n boolean verificaCPF = verificarCampos.verificarCPF(textoCPF.getText());\n \n // Se os campos estiverem de acorda com as regras, insere.\n if (verificar && verificaCPF) {\n\n // Instancia nos objetos os metodos de dados, endereco e contato.\n DadosPessoais dados = new DadosPessoais();\n Endereco endereco = new Endereco();\n Contato contato = new Contato();\n\n // Objeto de dados insere os dados pessoais do cliente.\n dados.setNome(textoNome.getText());\n dados.setCPF(textoCPF.getText());\n dados.setGenero(comboGenero.getSelectedItem().toString());\n dados.setDataNascimento(textoDataDeNascimento.getText());\n\n // Objeto de endereco insere o endereco do cliente.\n endereco.setLogradouro(textoEnderecoLogradouro.getText());\n endereco.setBairro(textoBairro.getText());\n endereco.setComplemento(textoComplemento.getText());\n endereco.setNumero(textoNumero.getText());\n endereco.setCEP(textoCEP.getText());\n\n // Objeto de contato insere os contatos do cliente.\n contato.setEmail(textoEmail.getText());\n contato.setTelefone(textoTelefone.getText());\n contato.setDD_Telefone(textoDD_Telefone.getText());\n contato.setCelular(textoCelular.getText());\n contato.setDD_Celular(textoDD_Celular.getText());\n\n // Verifica se tem imagem selecionada.\n if (imgCaminho == null) {\n\n // Se não, insere um caminho de imagem pre definido.\n imgCaminho = \"src\\\\br\\\\com\\\\Grupo07\\\\Imagens\\\\perfil.jpg\";\n dados.setImagem(imgCaminho);\n\n } else {\n\n // Se sim, insere o caminho da imagem selecionada.\n dados.setImagem(imgCaminho);\n\n }\n\n // Chama classe de servico para cadastrar cliente com seus construtores(objetos).\n ServicosCliente.cadastrarCliente(dados, endereco, contato);\n\n // Mensagem de sucesso\n JOptionPane.showMessageDialog(null, \"Cadastratado\", \"Sucesso\", JOptionPane.INFORMATION_MESSAGE);\n\n // Limpa campos.\n limparCampos();\n\n }\n\n // Mensagem de erro no banco de dados\n } catch (SQLException ex) {\n\n JOptionPane.showMessageDialog(null, \"Erro no banco de dados\", \"Erro\", JOptionPane.ERROR);\n\n // Mensagem de erro na imagem.\n } catch (FileNotFoundException ex) {\n\n JOptionPane.showMessageDialog(null, \"Erro no imagem\", \"Erro\", JOptionPane.ERROR);\n \n }\n\n // Se negativa a continuacao.\n } else {\n\n JOptionPane.showMessageDialog(null, \"Cancelado, sucesso\", \"Cancelamento\", JOptionPane.OK_OPTION);\n\n }\n }",
"@Override\n public Call<PrivacidadResponse> devuelveAviso(ServerRequest request) {\n SecurityItems securityItems=getInstanceToken();\n request.setIdNumEmpleado(securityItems.getIdEmployEncrypt());\n request.setToken(securityItems.getTokenEncrypt());\n return serviceInterface.devuelveAviso(request);\n }",
"private void enviarCorreo(Soda soda){\n String[] TO = {soda.getEmail()};\n Uri uri = Uri.parse(\"mailto:\" + soda.getEmail())\n .buildUpon()\n .appendQueryParameter(\"subject\", \"Consulta Soda Universitaria\")\n .appendQueryParameter(\"body\", \"Enviado desde SodaUniversitaria.\")\n .build();\n Intent emailIntent = new Intent(Intent.ACTION_SENDTO, uri);\n emailIntent.putExtra(Intent.EXTRA_EMAIL, TO);\n startActivity(Intent.createChooser(emailIntent, \"Enviar vía correo\"));\n }",
"@Override\n public void onClick(View view)\n {\n Intent sendIntent = new Intent();\n // La accion es un envio a una aplicacion externa\n sendIntent.setAction(Intent.ACTION_SEND);\n // Enlace que vamos a enviar\n sendIntent.putExtra(Intent.EXTRA_TEXT, direccionAplicacion);\n // Se va a enviar un texto plano\n sendIntent.setType(\"text/plain\");\n\n // manda mensaje si no tiene aplicacion con la que compartir en el sistema\n Intent shareIntent = Intent.createChooser(sendIntent, \"no tengo aplicacion para compartir en emulador\");\n // Inicia la actividad compartir enlace de la noticia\n getContext().startActivity(shareIntent);\n }",
"public void acessarBuscaCep() throws InterruptedException {\n navegador.findElement(By.xpath(\"//*[@class='bt-link-ic bt-login link-btn-meu-correios']\")).click();\n\n // REALIZAR O LOGIN COM USUARIO E SENHA\n navegador.findElement(By.id(\"username\")).click();\n navegador.findElement(By.id(\"username\")).sendKeys(\"31403971862\");\n navegador.findElement(By.id(\"password\")).click();\n navegador.findElement(By.id(\"password\")).sendKeys(\"haenois001\");\n\n //CLICAR NO BOTÃO ENTRAR\n navegador.findElement(By.xpath(\"//button[@class='primario']\")).click();\n\n // ESPERAR OPÇÕES E CLICAR EM BUSCA CEP\n WebDriverWait wait = new WebDriverWait(navegador, 20);\n wait.until(ExpectedConditions.elementToBeClickable(By.id(\"opcoes\")));\n navegador.findElement(By.id(\"busca-cep\")).click();\n Thread.sleep(1000);\n\n }",
"private void jMenuItem_SaveClientActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_SaveClientActionPerformed\n try {\n Client_Db_Connect.saveMeilleursClient();\n } catch (SQLException | ClassNotFoundException | IOException ex) {\n Logger.getLogger(JFrame_Accueil.class.getName()).log(Level.SEVERE, null, ex);\n }\n jMenuItem_ShowClient.setEnabled(true);\n }",
"public String getClientId(){ return this.client_id;}",
"public String getClient()\n {\n return \"DOE\";\n }",
"public void selecao () {}",
"HtmlPage clickSiteLink();",
"public void onClick(View v) {\n\t\t\t\tif (!sincNotifications.sendNotification(idusuario)){\r\n\t\t\t\t\tString titulo=\"Notificar\"; \r\n\t\t\t\t\tString mensaje=\"¿Deseas Notificar ahora a todos tus clientes ?\"; \t\t\t\t\r\n\t\t\t\t\tAlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);\t\t \t\t\t\t\r\n\t\t\t\t\talertDialogBuilder.setTitle(titulo);\t\t \t\t\t\r\n\t\t\t\t\talertDialogBuilder\r\n\t\t\t\t\t\t\t.setMessage(mensaje)\r\n\t\t\t\t\t\t\t.setCancelable(true)\r\n\t\t\t\t\t\t\t.setNegativeButton(\"Cancelar\", null)\r\n\t\t\t\t\t\t\t.setPositiveButton(\"Aceptar\",new DialogInterface.OnClickListener() {\r\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,int id) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tdialog.cancel();\r\n\t\t\t\t\t\t\t\t\t//verificar si tiene internet o no <--------------------------\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif (networkAvailable()){\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tSyncronizar sync = new Syncronizar(ClientesListTask.this);\r\n\t\t\t\t\t\t\t\t\t\t\tList<NameValuePair> param = new ArrayList<NameValuePair>();\r\n\t\t\t\t\t\t\t\t\t\t\tparam.add(new BasicNameValuePair(\"idcobrador\", idusuario));\r\n\t\t\t\t\t\t\t\t\t\t\tString route2=\"/ws/cobranza/send_notifications/\";\r\n\t\t\t\t\t\t\t\t\t\t\tsync.conexion(param,route2);\r\n\t\t\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\t\t\tsync.getHilo().join();\r\n\t\t\t\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t // TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tsincNotifications.saveNotification(idusuario);\r\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(ClientesListTask.this, \"Se notificó exitosamente a los clientes.\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t\t\t\t\t\t\tIntent intent = new Intent(ClientesListTask.this, ClientesListTask.class); \t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tintent.putExtra(\"idusuario\", idusuario);\r\n\t\t\t\t\t\t\t\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n\t\t\t\t\t\t\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\tToast.makeText(ClientesListTask.this, \"Necesita conexión a internet para nofiticar\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t});\t\t\r\n\t\t\t\t\tAlertDialog alertDialog = alertDialogBuilder.create();\t\t \r\n\t\t\t\t\talertDialog.show();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tToast.makeText(ClientesListTask.this, \"Usted ya envió notifaciones el dia de hoy.\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t}\t\t\t\r\n\t\t\t}",
"public void onClick(View v) {\n\t\t\t\tfinal String toEmail=email.getText().toString();\n\t\t\t\tfinal String toDescr=description.getText().toString();\n\t\t\t\tfinal String[] args={toDescr,toEmail};\n\t\t\t\t\n\t\t\t\tnew EndpointsTask().execute(args);\n\t\t\t}",
"public Sesion(String codigoCliente) {\n cliente = new Cliente(codigoCliente);\n estado = Estado.inicioBot;\n accion = Accion.registrar;\n valor = ValorAIngresar.nombre;\n mensajeRecibido = null;\n respuesta = new Respuesta();\n }",
"public void enviarMensajeInfoSalas(int idUsuario, MensajeInfoSalas mensaje) {\n comunicador.enviarMensaje(idUsuario, TipoMensaje.INFO_SALAS, mensaje);\n System.out.println(\"ControladorServidor: info de salas enviado\");\n }",
"@FXML void pagoCredito(ActionEvent event) {\n pagar(CREDITO);\n }",
"@Override\n public String generateResourceLink(SoapEvent soapEvent) {\n return SLASH + WEB + SLASH + SOAP + SLASH + PROJECT + SLASH + soapEvent.getProjectId() + SLASH + PORT + SLASH +\n soapEvent.getPortId() + SLASH + OPERATION + SLASH + soapEvent.getOperationId();\n }",
"private void listaClient() {\n\t\t\r\n\t\tthis.listaClient.add(cliente);\r\n\t}",
"@Path(\"saludar2/{nombre}/{apellido}\")\n\t@Produces(MediaType.TEXT_HTML)\n\t@GET\n\tpublic String saludar(@PathParam(\"nombre\")String nombreCompleto,@PathParam(\"apellido\") String apellido ){\n\t\treturn \"Buenas tardes \"+nombreCompleto+\" \"+apellido;\n\t}",
"@Override\n public void onClick(View v) {\n toonSessie();\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tUser user = User.getInstance();\n\t\t\t\tuser.emailRecipe(currentRecipe, getApplicationContext());\n\t\t\t}",
"public java.lang.String getReferenciado();",
"public String obtnerEmailClientes() {\n ArrayList tempAL = new ArrayList();\n RowKeySet rowKeys = Cliente.getClienteInstance().getClienteBinding().getTblClientes().getSelectedRowKeys();\n Iterator iterador = rowKeys.iterator();\n while (iterador.hasNext()){\n Object valor = iterador.next();\n Cliente.getClienteInstance().getClienteBinding().getTblClientes().setRowKey(valor);\n ClienteData row = (ClienteData) Cliente.getClienteInstance().getClienteBinding().getTblClientes().getRowData();\n tempAL.add(row);\n }\n String to = \"\";\n for(int i = 0; i < tempAL.size(); i++){\n to += \";\" + ((ClienteData)tempAL.get(i)).getEmail();\n }\n if(to.length() > 0){\n to = to.substring(1, to.length());\n }\n emailData.setTo(to);\n //emailData.setTo(emailBinding.getTblClientes().get);\n RequestContext rc = RequestContext.getCurrentInstance();\n rc.returnFromDialog(emailData.getTo(), null);\n //return null;\n return \"success\";\n }",
"@Override\n\tpublic void onClick(IClientContext context, IGuiElement emitter) throws Exception\n\t{\n PropertyAccessor accessor = PropertyAccessor.getInstance();\n Property ivrAdmin = accessor.getProperty(\n context, IVR_ADMIN_PROPERTY, context.getDataAccessor(), true\n );\n if (ivrAdmin != null && ivrAdmin.isSet())\n {\n IUrlDialog dialog = context.createUrlDialog(ivrAdmin.asString());\n dialog.enableNavigation(false);\n dialog.setModal(false);\n dialog.enableScrollbar(true);\n dialog.show(800, 600);\n }\n else\n {\n context.createMessageDialog(\"Could not launch IVR Admin\").show();\n }\n\t}",
"public void emprestar(ClienteLivro cliente) {\n\t\tcliente.homem = 100;\n\n\t}",
"@Override\r\n\tprotected String getUrl() {\n\t\treturn urlWS + \"/ActualizarCompromiso\";\r\n\t}",
"@Override\n public void onClick(View view) {\n cliente.post(getActivity(), Helpers.URLApi(\"altausuariopassword\"), Helpers.ToStringEntity(json), \"application/json\", new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n super.onSuccess(statusCode, headers, responseBody);\n\n // Respuesta\n JSONObject respuesta = Helpers.ResponseBodyToJSON(responseBody);\n\n try {\n // Guardamos el token del usuario\n Helpers.setTokenAcceso(getActivity(), respuesta.getJSONObject(\"usuario\").getString(\"token\"));\n\n // Guardamos el nombre del usuario\n Helpers.setNombre(getActivity(), respuesta.getJSONObject(\"usuario\").getString(\"nombre\"));\n\n // Obtenemos la imagen del usuario\n ObtenerImagenUsuario(respuesta.getJSONObject(\"usuario\").getString(\"imagen\"));\n }\n catch (Exception ex) { }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n super.onFailure(statusCode, headers, responseBody, error);\n\n // Mostramos el mensaje de error\n Helpers.MostrarError(getActivity(), \"No se ha podido volver a activar el usuario en Noctua\");\n }\n });\n }",
"@GetMapping(\"/clients/clientLogin\")\n\tpublic String pageLoginClientGet() {\n\t\tClientController.LOGGER.info(\"La page login client est demandée\");\n\t\treturn \"/clients/clientLogin\";\n\t}",
"public void ClickVtube_Customer_service(View view){\n redirectActivity(this,Vtube_Customer_service.class);\n }",
"@UiHandler(\"go\")\n void connexion(ClickEvent e) {\n loginField.setFocus(false);\n passwordField.setFocus(false);\n domains.setFocus(false);\n\n String login = loginField.getText();\n String password = passwordField.getText();\n login(login, password, domains.getValue(domains.getSelectedIndex()));\n\n\n }",
"@Override\r\n public String getAGBLink() {\r\n return HOSTER + \"/regulamin\";\r\n }",
"public void addClient() {\n String name = getToken(\"Enter client company: \");\n String address = getToken(\"Enter address: \");\n String phone = getToken(\"Enter phone: \");\n Client result;\n result = warehouse.addClient(name, address, phone);\n if (result == null) {\n System.out.println(\"Client could not be added.\");\n }\n System.out.println(result);\n }",
"public void setIdcliente(java.lang.String idcliente) {\n this.idcliente = idcliente;\n }",
"@Override\n\tpublic void editar(Cliente cliente) throws ExceptionUtil {\n\t\t\n\t}",
"public String enviarAServidor() {\n return \"\";\n }",
"public void apagarClienteConta(ApagarDadosFaturamentoHelper helper) throws ErroRepositorioException;",
"@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tSendToServer(ph);\n\t\t\t\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n public void onClick(View view) {\n Intent i = new Intent(getActivity(), CadastroDespesaItem.class);\n i.putExtra(\"Reembolso\", Reembolso);\n Bundle params = new Bundle();\n params.putString(\"CU_LOGIN\", prpUsuario_Logado);\n params.putString(\"CU_ID\", prpUsuario_ID);\n params.putString(\"TIPO_PESQUISA\", _gsTIPOPESQUISA);\n i.putExtras(params);\n\n startActivity(i);\n }"
] |
[
"0.6077099",
"0.58045584",
"0.5796004",
"0.57907075",
"0.5746823",
"0.57393855",
"0.5726444",
"0.5693838",
"0.5673267",
"0.5643441",
"0.560449",
"0.5596487",
"0.5569663",
"0.55663806",
"0.5547804",
"0.5544705",
"0.54867554",
"0.5477882",
"0.54439056",
"0.54319775",
"0.54271287",
"0.5409352",
"0.53932405",
"0.53725207",
"0.5344456",
"0.5339811",
"0.5333049",
"0.5314436",
"0.53139997",
"0.53093815",
"0.5301172",
"0.5295663",
"0.52933586",
"0.52923715",
"0.5289083",
"0.5278775",
"0.5276979",
"0.52769375",
"0.52754176",
"0.52130634",
"0.5200098",
"0.5195128",
"0.5183508",
"0.51748234",
"0.51660633",
"0.5161772",
"0.516177",
"0.5157746",
"0.51469165",
"0.51369524",
"0.5128424",
"0.5114653",
"0.50815105",
"0.5074316",
"0.50726193",
"0.5069969",
"0.5064351",
"0.5056027",
"0.50518525",
"0.5036777",
"0.50329053",
"0.5027172",
"0.50268185",
"0.5007515",
"0.5005451",
"0.5004458",
"0.50012267",
"0.49986854",
"0.49960095",
"0.49952677",
"0.4980176",
"0.49779195",
"0.497598",
"0.49751246",
"0.49675617",
"0.49609494",
"0.49569416",
"0.49513733",
"0.49492365",
"0.49469435",
"0.49381965",
"0.49376178",
"0.49357876",
"0.49353522",
"0.4934852",
"0.49324256",
"0.4927277",
"0.49257827",
"0.49253586",
"0.4923939",
"0.49235645",
"0.49060482",
"0.4905452",
"0.4903013",
"0.48974597",
"0.4888925",
"0.48823282",
"0.48813084",
"0.48806477",
"0.48780295"
] |
0.53305256
|
27
|
grava uma nova solicitacao e edita caso ID seja diferente de null
|
public String gravar() {
System.out.println("Gravando Solicitação ");
if (solicitacao.equals("null")) {
throw new RuntimeException("Usuario deve ter pelomenos nome");
}
if (this.solicitacao.getId() == null) {
new DAO<Solicitacao>(Solicitacao.class).adiciona(this.solicitacao);
} else {
new DAO<Solicitacao>(Solicitacao.class).atualiza(this.solicitacao);
}
this.solicitacao = new Solicitacao();
return "solicitacoes?faces-redirect=true";
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void editar() {\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Atualizar(cliente);\n\n JSFUtil.AdicionarMensagemSucesso(\"Cliente editado com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic Cliente editarCliente(Integer idcliente) {\n\t\treturn clienteDao.editarCliente(idcliente);\n\t}",
"public Result viaje_edit(Long id){\n \n Viaje viaje=Viaje.find.byId(id);\n List<Cabezal> cabezales = Cabezal.find.where().eq(\"activo\",true).findList();\n List<Cliente> clientes = Cliente.find.where().eq(\"activo\",true).findList();\n List<Motorista> motoristas = Motorista.find.where().eq(\"activo\",true).findList();\n \n if(viaje==null){\n return redirect(routes.LogisticaController.viajes());\n }\n\n return ok(viaje_edit.render(viaje,cabezales,motoristas,clientes));\n\n }",
"@Override\n\tpublic ModelAndView edit(String id) {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic Loja editar(String nomeResponsavel, int telefoneEmpresa, String rua, String cidade, String estado, String pais,\r\n\t\t\tint cep, int cnpj, String razaoSocial, String email, String nomeEmpresa, String senha) {\n\t\treturn null;\r\n\t}",
"@RequestMapping(value = { \"/edit-{id}\" }, method = RequestMethod.GET)\n\tpublic String editEntity(@PathVariable ID id, ModelMap model,\n\t\t\t@RequestParam(required = false) Integer idEstadia) {\n\t\tENTITY entity = abm.buscarPorId(id);\n\t\tmodel.addAttribute(\"entity\", entity);\n\t\tmodel.addAttribute(\"edit\", true);\n\n\t\tif(idEstadia != null){\n\t\t\tmodel.addAttribute(\"idEstadia\", idEstadia);\n\t\t}\n\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn viewBaseLocation + \"/form\";\n\t}",
"public void setIdCliente(Integer id_cliente){\n this.id_cliente=id_cliente;\n }",
"public void recupera() {\n Cliente clienteActual;\n clienteActual=clienteDAO.buscaId(c.getId());\n if (clienteActual!=null) {\n c=clienteActual;\n } else {\n c=new Cliente();\n }\n }",
"@Override\n\tpublic Usuario edit(Usuario obj) {\n\t\treturn null;\n\t}",
"public String editar()\r\n/* 59: */ {\r\n/* 60: 74 */ if ((getMotivoLlamadoAtencion() != null) && (getMotivoLlamadoAtencion().getIdMotivoLlamadoAtencion() != 0)) {\r\n/* 61: 75 */ setEditado(true);\r\n/* 62: */ } else {\r\n/* 63: 77 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_seleccionar\"));\r\n/* 64: */ }\r\n/* 65: 79 */ return \"\";\r\n/* 66: */ }",
"protected void editarContato(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t\tSystem.out.println(request.getParameter(\"id\"));\n\t\tSystem.out.println(request.getParameter(\"nome\"));\n\t\tSystem.out.println(request.getParameter(\"telefone\"));\n\t\tSystem.out.println(request.getParameter(\"email\"));\n\t\t\n\n\t\t// fim do teste//\n\n\t\tcontato.setId(request.getParameter(\"id\"));\n\t\tcontato.setNome(request.getParameter(\"nome\"));\n\t\tcontato.setFone(request.getParameter(\"telefone\"));\n\t\tcontato.setEmail(request.getParameter(\"email\"));\n\t\t// executar o metodo alterarContato - execute method alterarContato\n\t\tdao.alterarContato(contato);\n\t\t// redirecionar para agenda.jsp - redirect to agenda.jsp\n\t\tresponse.sendRedirect(\"main\");\n\n\t}",
"@Override\r\n public ReactivoDTO obtener(Integer id) {\n return null;\r\n }",
"T edit(long id, T obj);",
"@Override\n\tpublic int editarCliente(ClienteBean cliente) throws Exception {\n\t\treturn 0;\n\t}",
"@PostMapping(\"/actualizarCliente\")\r\n public @ResponseBody\r\n Map<String, Object> actualizarCliente(\r\n @RequestParam(\"id\") int id,\r\n @RequestParam(\"tipoDocumento\") String tipoDocumento,\r\n @RequestParam(\"documento\") String documento,\r\n @RequestParam(\"nombre\") String nombre,\r\n @RequestParam(\"pais\") String pais,\r\n @RequestParam(\"ciudad\") String ciudad,\r\n @RequestParam(\"direccion\") String direccion,\r\n @RequestParam(\"telefono\") String telefono,\r\n @RequestParam(\"correo\") String correo) {\r\n try {\r\n\r\n Cliente CL = clienteRepository.getOne(id);\r\n\r\n CL.setTipoDocumento(tipoDocumento);\r\n CL.setDocumento(documento);\r\n CL.setNombre(nombre);\r\n CL.setPais(pais);\r\n CL.setCiudad(ciudad);\r\n CL.setDireccion(direccion);\r\n CL.setTelefono(telefono);\r\n CL.setCorreo(correo.toLowerCase());\r\n\r\n clienteRepository.save(CL);\r\n\r\n return ResponseUtil.mapOK(\"Proceso exitoso\");\r\n } catch (Exception e) {\r\n return ResponseUtil.mapError(\"Error en el proceso \" + e);\r\n }\r\n }",
"public void editar(AplicacionOferta aplicacionOferta){\n try{\n aplicacionOfertaDao.edit(aplicacionOferta);\n }catch(Exception e){\n Logger.getLogger(AplicacionOfertaServicio.class.getName()).log(Level.SEVERE, null, e);\n }\n }",
"@Override\r\n public void editarCliente(Cliente cliente) throws Exception {\r\n entity.getTransaction().begin();//inicia la edicion\r\n entity.merge(cliente);//realiza la edicion.\r\n entity.getTransaction().commit();//finaliza la edicion\r\n }",
"DenialReasonDto edit(int id, DenialReasonDto denialReason);",
"public String editar()\r\n/* 86: */ {\r\n/* 87:112 */ if (getDimensionContable().getId() != 0)\r\n/* 88: */ {\r\n/* 89:113 */ this.dimensionContable = this.servicioDimensionContable.cargarDetalle(this.dimensionContable.getId());\r\n/* 90:114 */ String[] filtro = { \"indicadorValidarDimension\" + getDimension(), \"true\" };\r\n/* 91:115 */ this.listaCuentaContableBean.agregarFiltro(filtro);\r\n/* 92:116 */ this.listaCuentaContableBean.setIndicadorSeleccionarTodo(true);\r\n/* 93:117 */ verificaDimension();\r\n/* 94:118 */ setEditado(true);\r\n/* 95: */ }\r\n/* 96: */ else\r\n/* 97: */ {\r\n/* 98:120 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_seleccionar\"));\r\n/* 99: */ }\r\n/* 100:123 */ return \"\";\r\n/* 101: */ }",
"@Override\n\tpublic void editar(Cliente cliente) throws ExceptionUtil {\n\t\t\n\t}",
"@Override\n\tpublic Editore getOneById(int id) {\n\t\treturn null;\n\t}",
"@GetMapping(\"editar/{id}\")\n public String preActualizar(@PathVariable(\"id\") Long id, ModelMap model) {\n model.addAttribute(\"departamento\", departamentoService.pesquisarPorId(id));\n\n return \"/admin/pages/departamentos/add-departamento\";\n }",
"public void setId(int idNuevo)\n { \n this.id = idNuevo;\n }",
"private void modi() { \n try {\n cvo.getId_cliente();\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.actualizar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Modificado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para Modificar registro!\");\n }\n }",
"public void editarProveedor() {\n try {\n proveedorFacadeLocal.edit(proTemporal);\n this.proveedor = new Proveedor();\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Proveedor editado\", \"Proveedor editado\"));\n } catch (Exception e) {\n \n }\n\n }",
"public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}",
"@Override\n\tpublic void editar(Contato contato) {\n\t\tthis.dao.editar(contato);\n\t\t\n\t}",
"public Reserva updateReserva(Reserva reserva){\n /**\n * Verificar que el objeto auditorio recibido tenga un ID.\n */\n if (reserva.getIdReservation()!=null){\n /**\n * Verificar la existencia del objeto en BD.\n */\n Optional<Reserva> existeReserva = getReserva(reserva.getIdReservation());\n /**\n * Si el objeto existe en la BD, editarlo. Si no,retornarlo como\n * está.\n */\n if (!existeReserva.isEmpty()){\n /**\n * Si el objeto reserva tiene un valor startDate, asignarlo a\n * existeCliente.\n */\n if (reserva.getStartDate()!=null){\n existeReserva.get().setStartDate(reserva.getStartDate());\n }\n /**\n * Si el objeto cliente tiene un valor devolutionDate, asignarlo\n * a existeCliente.\n */\n if (reserva.getDevolutionDate()!=null){\n existeReserva.get().setDevolutionDate(reserva.getDevolutionDate());\n }\n /**\n * Si el objeto reserva tiene un valor status, asignarlo a\n * existeCliente.\n */\n if (reserva.getStatus()!=null){\n existeReserva.get().setStatus(reserva.getStatus());\n }\n /**\n * Si el objeto reserva tiene un valor audience, asignarlo\n * a existeCliente.\n */\n if (reserva.getAudience()!=null){\n existeReserva.get().setAudience(reserva.getAudience());\n }\n /**\n * Si el objeto reserva tiene un valor client, asignarlo\n * a existeCliente.\n */\n if (reserva.getClient()!=null){\n existeReserva.get().setClient(reserva.getClient());\n }\n /**\n * Devolver existeCliente con valores ajustados.\n */\n return repositorioReserva.save(existeReserva.get());\n } else {\n return reserva;\n }\n } else {\n return reserva;\n }\n }",
"public void alterar() {\n //metodo para alterar\n String sql = \"UPDATE empresa SET empresa = ?, cnpj = ?, \"\n + \"endereco = ?, telefone = ?, email = ? WHERE (id = ?)\";\n try {\n pst = conexao.prepareStatement(sql);\n pst.setString(1, txtEmpNome.getText());\n pst.setString(2, txtEmpCNPJ.getText());\n pst.setString(3, txtEmpEnd.getText());\n pst.setString(4, txtEmpTel.getText());\n pst.setString(5, txtEmpEmail.getText());\n pst.setString(6, txtEmpId.getText());\n if ((txtEmpNome.getText().isEmpty()) || (txtEmpCNPJ.getText().isEmpty())) {\n JOptionPane.showMessageDialog(null, \"Preencha todos os campos obrigatórios\");\n } else {\n //a linha abaixo atualiza a tabela usuarios com os dados do formulario\n // a esttrutura abaixo confirma a ALTERACAO dos dados na tabela\n int adicionado = pst.executeUpdate();\n if (adicionado > 0) {\n JOptionPane.showMessageDialog(null, \"Dados do cliente alterado com sucesso\");\n txtEmpNome.setText(null);\n txtEmpEnd.setText(null);\n txtEmpTel.setText(null);\n txtEmpEmail.setText(null);\n txtEmpId.setText(null);\n txtEmpCNPJ.setText(null);\n btnAdicionar.setEnabled(true);\n }\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }",
"@FXML\r\n private void editar(ActionEvent event) {\n selecionado = tabelaCliente.getSelectionModel()\r\n .getSelectedItem();\r\n\r\n //Se tem algum cliente selecionado\r\n if (selecionado != null) { //tem clienteonado\r\n //Pegar os dados do cliente e jogar nos campos do\r\n //formulario\r\n textFieldNumeroCliente.setText(\r\n String.valueOf( selecionado.getIdCliente() ) );\r\n textfieldNome.setText( selecionado.getNome() ); \r\n textFieldEmail.setText(selecionado.getEmail());\r\n textFieldCpf.setText(selecionado.getCpf());\r\n textFieldRg.setText(selecionado.getRg());\r\n textFieldRua.setText(selecionado.getRua());\r\n textFieldCidade.setText(selecionado.getCidade());\r\n textFieldBairro.setText(selecionado.getBairro());\r\n textFieldNumeroCasa.setText(selecionado.getNumeroCasa());\r\n textFieldDataDeNascimento.setValue(selecionado.getDataNascimemto());\r\n textFieldTelefone1.setText(selecionado.getTelefone1());\r\n textFieldTelefone2.setText(selecionado.getTelefone2());\r\n textFieldCep.setText(selecionado.getCep());\r\n \r\n \r\n \r\n }else{ //não tem cliente selecionado na tabela\r\n mensagemErro(\"Selecione um cliente.\");\r\n }\r\n\r\n }",
"public void editarEmpresa (Empresa empresa) throws Exception{\r\n\t\tEmpresa emp = daoEmpresa.buscarEmpresa(empresa.getId());\r\n\t\t\r\n\t\tif(emp != null){\r\n\t\t\tdaoEmpresa.editarEmpresa(empresa);\r\n\t\t}else{\r\n\t\t\tthrow new ExcepcionNegocio(\"No hay empresa registrada con este ID\");\r\n\t\t}\r\n\t}",
"public void editarMateria() {\n materia.setIdDepartamento(departamento);\n ejbFacade.edit(materia);\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaEditDialog').hide()\");\n ejbFacade.limpiarCache();\n items = ejbFacade.findAll();\n departamento = new Departamento();\n materia = new Materia();\n// FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se editó con éxito\"));\n// requestContext.execute(\"PF('mensajeRegistroExitoso').show()\");\n\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se editó con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n\n requestContext.update(\"msg\");//Actualiza la etiqueta growl para que el mensaje pueda ser mostrado\n\n requestContext.update(\"MateriaListForm\");\n requestContext.update(\"MateriaCreateForm\");\n\n }",
"@POST\n @Path(\"Editar\")\n @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})\n public String Editar (@FormParam(\"codigo\") Integer codigo, @FormParam(\"nif\") String nif , @FormParam(\"nombre\") String nombre , \n @FormParam(\"apellido1\") String apellido1 , @FormParam(\"apellido2\") String apellido2){\n Empleado objeto = super.find(codigo);\n \n objeto.setNif(nif);\n objeto.setNombre(nombre);\n objeto.setApellido1(apellido1);\n objeto.setApellido2(apellido2);\n \n super.edit(objeto);\n return \"Se edito con exito\";\n \n }",
"public void setIdcliente(java.lang.String idcliente) {\n this.idcliente = idcliente;\n }",
"@PostMapping(\"/edit\")\r\n public String editDetails(Model model,@RequestParam int id) {\r\n \t\r\n try {\r\n Trainee trainee = service.findById(id);\r\n \r\n model.addAttribute(\"trainee\", trainee);\r\n }catch(Exception ex) {\r\n System.out.println(\"Error \"+ex.getMessage());\r\n model.addAttribute(\"msg\",\"No record found!\");\r\n }\r\n return \"modify\";\r\n }",
"public void edit(RequestBean request) {\n\t\t\r\n\t}",
"@Override\n public void definirId(Endereco objeto, int id) {\n objeto.setId(id);\n }",
"public Cliente(){\r\n this.nome = \"\";\r\n this.email = \"\";\r\n this.endereco = \"\";\r\n this.id = -1;\r\n }",
"@GetMapping(\"/editar/{id_persona}\")\n public String editar(Persona persona, Model model){\n persona = personaService.encontrarPersona(persona);\n model.addAttribute(\"persona\", persona);\n return \"modificar\";\n }",
"public static Result alterar(Long id) {\r\n\t\t\t\tForm<Funcionario> form = funcionarioForm.bindFromRequest();\r\n\t\t\t\tForm.form(Funcionario.class).fill(Funcionario.find.byId(id));\r\n\r\n\t\t\t\tForm<Funcionario> alterarForm = Form.form(Funcionario.class).bindFromRequest();\r\n\t\t\t\tif (alterarForm.hasErrors()) {\r\n\t\t\t\t\treturn badRequest(views.html.alterarFuncionario.render(id, alterarForm));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\talterarForm.get().update(id);\r\n\t\t\t\tflash(\"sucesso\", \" alterado com sucesso\");\r\n\r\n\t\t\t\treturn redirect(routes.FuncionarioCrud.listaFuncionario());\r\n\t\t\t}",
"@RequestMapping(value=\"/reservas/{id}\", method=RequestMethod.PUT)\r\n\tpublic void modificarReserva(@RequestBody @Valid Reserva r) throws SistemaReservaException{\n\t\tif(!reservaRpository.obtenerTraslapes(r.getFechaInicio(), r.getFechaFin()).isEmpty()){\r\n\t\t\tthrow new SistemaReservaException(); \r\n\t\t }\r\n\t\t\r\n\t\tReserva encontrado = reservaRpository.findOne(r.getId());\r\n\t\tencontrado.setFechaInicio(r.getFechaInicio());\r\n\t\tencontrado.setFechaFin(r.getFechaFin());\r\n\t\tencontrado.setSala(salaRepository.findOne(r.getSala().getId()));\r\n\t\treservaRpository.save(encontrado);\r\n\t}",
"@Override\n\tpublic String alterarAluno(String id, Aluno aluno) {\n\t\treturn null;\n\t}",
"@Restrict(@Group(Application.ADMIN_ROLE))\n public CompletionStage<Result> updateCampo(Long id) {\n MessageDispatcher jdbcDispatcher = AkkaDispatcher.jdbcDispatcher;\n\n JsonNode nCampo = request().body().asJson();\n CampoEntity campo = Json.fromJson( nCampo , CampoEntity.class ) ;\n CampoEntity campoViejo = CampoEntity.FINDER.byId(id);\n return CompletableFuture.supplyAsync(\n ()->{\n if(campoViejo == null)\n {\n return campoViejo;\n }else\n { campo.setId(id);\n campo.update();\n return campo;\n }\n }\n ).thenApply(\n campoEntity -> {\n if(campoEntity == null)\n {\n return notFound();\n }else\n {\n return ok(Json.toJson(campoEntity));\n }\n }\n\n );\n }",
"public String elimiinaClienteId(Long id){\n\t\tOptional <Cliente> optCliente = clienteRepository.findById(id);\n\t\tif(optCliente.isEmpty()){\n\t\t\tthrow new IllegalArgumentException(\"No se encontró el id del usuario\");\n\t\t}\n\t\tCliente cliente = optCliente.get();\n\t\t// Elimina sus tickets\n\t\tticketRepository.deleteAll(ticketRepository.findByClienteId(cliente.getId()));\n\t\t// Elimina el cliente\n\t\tcliente.setNegocio(null);\n\t\tclienteRepository.save(cliente);\n\t\tclienteRepository.delete(cliente);\n\t\t\n\t\treturn \"Se elimino el cliente con el id : \" + id;\n\t}",
"@PUT\n @JWTTokenNeeded\n @Consumes({MediaType.APPLICATION_JSON})\n @Produces({MediaType.APPLICATION_JSON})\n public Response update(EscenarioDTO entidad) {\n logger.log(Level.INFO, \"entidad:{0}\", entidad);\n \n try {\n \tConciliacion entidadPadreJPA = null;\n if (entidad.getIdConciliacion() != null) {\n entidadPadreJPA = padreDAO.find(entidad.getIdConciliacion());\n if (entidadPadreJPA == null) {\n throw new DataNotFoundException(Response.Status.NOT_FOUND.getReasonPhrase() + entidad.getIdConciliacion());\n }\n }\n //Hallar La entidad actual para actualizarla\n Escenario entidadJPA = managerDAO.find(entidad.getId());\n if (entidadJPA != null) {\n entidadJPA.setFechaActualizacion(Date.from(Instant.now()));\n entidadJPA.setNombre(entidad.getNombre() != null ? entidad.getNombre() : entidadJPA.getNombre());\n entidadJPA.setImpacto(entidad.getImpacto() != null ? entidad.getImpacto() : entidadJPA.getImpacto());\n entidadJPA.setDescripcion(entidad.getDescripcion() != null ? entidad.getDescripcion() : entidadJPA.getDescripcion());\n \n Boolean actualizarConciliacion = false;\n entidadJPA.setConciliacion(entidad.getIdConciliacion() != null ? (entidadPadreJPA != null ? entidadPadreJPA : null) : entidadJPA.getConciliacion());\n \n Conciliacion conciliacionpadreactual = null;\n \n \n if (entidadJPA.getConciliacion() != null && !Objects.equals(entidadJPA.getConciliacion().getId(), entidad.getIdConciliacion())){\n actualizarConciliacion = true;\n conciliacionpadreactual = padreDAO.find(entidadJPA.getConciliacion().getId());\n }\n //entidadJPA.setConciliacion(entidad.getIdConciliacion() != null ? (entidadPadreJPA != null ? entidadPadreJPA : null) : entidadJPA.getConciliacion());\n managerDAO.edit(entidadJPA);\n if (actualizarConciliacion){\n if ((entidadPadreJPA != null)) {\n entidadPadreJPA.addEscenario(entidadJPA);\n padreDAO.edit(entidadPadreJPA);\n conciliacionpadreactual.removeEscenario(entidadJPA);\n padreDAO.edit(conciliacionpadreactual);\n }\n }\n LogAuditoria logAud = new LogAuditoria(this.modulo, Constantes.Acciones.EDITAR.name(), Date.from(Instant.now()), entidad.getUsername(), entidadJPA.toString());\n logAuditoriaDAO.create(logAud);\n \n ResponseWrapper wraper = new ResponseWrapper(true,I18N.getMessage(\"escenario.update\", entidad.getNombre()) ,entidadJPA.toDTO());\n \treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n }\n \n ResponseWrapper wraper = new ResponseWrapper(false,I18N.getMessage(\"escenario.notfound\", entidad.getNombre()));\n \treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n }catch (Exception e) {\n \tif(e.getCause() != null && (e.getCause() instanceof DataAlreadyExistException || e.getCause() instanceof DataNotFoundException)) {\n \t\tlogger.log(Level.SEVERE, e.getMessage(), e);\n \t\tResponseWrapper wraper = new ResponseWrapper(false, e.getCause().getMessage(), 500);\n \t\treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n \t}else {\n \t\tlogger.log(Level.SEVERE, e.getMessage(), e);\n \t\tResponseWrapper wraper = new ResponseWrapper(false, I18N.getMessage(\"general.readerror\"), 500);\n \t\treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n \t}\n }\n }",
"public void cancelarCita(int id) {\n try {\n PreparedStatement preparedStatement = con.prepareStatement(\"UPDATE paciente SET estatus='cancelado' WHERE id_paciente=?;\");\n preparedStatement.setInt(1,id);\n preparedStatement.executeUpdate();\n }catch (SQLException e) {\n e.printStackTrace();\n } \n }",
"@Override\n protected Response doUpdate(Long id, JSONObject data) {\n return null;\n }",
"@Override\r\n public ExpedienteGSMDTO editarExpedienteOrdenServicio(ExpedienteGSMDTO expedienteDTO, String codigoTipoSupervisor, PersonalDTO personalDest, UsuarioDTO usuarioDTO) throws ExpedienteException {\r\n LOG.error(\"editarExpediente\");\r\n ExpedienteGSMDTO retorno= new ExpedienteGSMDTO();\r\n try {\r\n PghExpediente registro = crud.find(expedienteDTO.getIdExpediente(), PghExpediente.class);\r\n registro.setIdFlujoSiged(new PghFlujoSiged(expedienteDTO.getFlujoSiged().getIdFlujoSiged()));\r\n registro.setIdProceso(new PghProceso(expedienteDTO.getProceso().getIdProceso()));\r\n registro.setIdObligacionTipo(new PghObligacionTipo(expedienteDTO.getObligacionTipo().getIdObligacionTipo()));\r\n registro.setAsuntoSiged(expedienteDTO.getAsuntoSiged());\r\n registro.setIdUnidadSupervisada(new MdiUnidadSupervisada(expedienteDTO.getUnidadSupervisada().getIdUnidadSupervisada()));\r\n registro.setIdEmpresaSupervisada(new MdiEmpresaSupervisada(expedienteDTO.getEmpresaSupervisada().getIdEmpresaSupervisada()));\r\n registro.setDatosAuditoria(usuarioDTO);\r\n if(expedienteDTO.getObligacionSubTipo()!=null && expedienteDTO.getObligacionSubTipo().getIdObligacionSubTipo()!=null){\r\n registro.setIdObligacionSubTipo(new PghObligacionSubTipo(expedienteDTO.getObligacionSubTipo().getIdObligacionSubTipo()));\r\n }else{\r\n registro.setIdObligacionSubTipo(null);\r\n }\r\n crud.update(registro);\r\n retorno = ExpedienteGSMBuilder.toExpedienteDto(registro); \r\n \r\n Long idLocador=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)?expedienteDTO.getOrdenServicio().getLocador().getIdLocador():null;\r\n Long idSupervisoraEmpresa=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)?expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa():null;\r\n \r\n String flagConfirmaTipoAsignacion=(!StringUtil.isEmpty(expedienteDTO.getFlagEvaluaTipoAsignacion())?Constantes.ESTADO_ACTIVO:null);\r\n OrdenServicioDTO OrdenServicioDTO=ordenServicioDAO.editarExpedienteOrdenServicio(expedienteDTO.getOrdenServicio().getIdOrdenServicio(), expedienteDTO.getOrdenServicio().getIdTipoAsignacion(), codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO,flagConfirmaTipoAsignacion);\r\n \r\n EstadoProcesoDTO estadoProcesoDto=estadoProcesoDAO.find(new EstadoProcesoFilter(Constantes.IDENTIFICADOR_ESTADO_PROCESO_OS_REGISTRO)).get(0);\r\n MaestroColumnaDTO tipoHistoricoOS=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_ORDEN_SERVICIO).get(0);\r\n HistoricoEstadoDTO historicoEstadoOS=historicoEstadoDAO.registrar(null, OrdenServicioDTO.getIdOrdenServicio(), estadoProcesoDto.getIdEstadoProceso(), expedienteDTO.getPersonal().getIdPersonal(), personalDest.getIdPersonal(), tipoHistoricoOS.getIdMaestroColumna(),null,null, null, usuarioDTO); \r\n LOG.info(\"historicoEstadoOS:\"+historicoEstadoOS);\r\n \r\n retorno.setOrdenServicio(new OrdenServicioDTO(OrdenServicioDTO.getIdOrdenServicio(),OrdenServicioDTO.getNumeroOrdenServicio()));\r\n \r\n }catch(Exception e){\r\n LOG.error(\"error en editarExpediente\",e);\r\n throw new ExpedienteException(e.getMessage(), e);\r\n }\r\n return retorno;\r\n }",
"boolean edit(InvoiceDTO invoiceDTO);",
"public Boolean execEdit(ContentInterventoRequestBean req){\n System.out.println(\"InterventoLogics - execEdit: \"+ req.toString());\n InterventoClient client = new InterventoClient(req);\n try {\n //CERCO L'UUID\n client.getByFk();\n List<InterventoWorkableBean> reqList = client.getResList();\n\n //MODIFICO SE CONTENUTO è PRESENTE\n if(!reqList.isEmpty()){\n System.out.println(\"Contenuto trovato - execEdit\");\n\n req.setUuid(reqList.get(0).getUuid());\n client = new InterventoClient(req);\n\n if(req.getAllegato()!= null && req.getAllegato().getFile() != null){\n client.postFile(\"field_allegato\");\n\n FileWorkableBean workableFile = client.getResFile();\n req.getAllegato().setUuid(workableFile.getUuid());\n req.getAllegato().setDescription(workableFile.getDescription());\n GenericFile gf = new GenericFile();\n gf.setUuid(workableFile.getUuid());\n gf.setFile(req.getAllegato().getFile());\n gf.setName(req.getAllegato().getName());\n gf.setDescription(workableFile.getDescription());\n\n client.patchUpdateContentFile(\"field_allegato\", gf);\n }\n\n client.patch();\n }else{\n System.out.println(\"Contenuto non trovato - execEdit: \"+ req.toString());\n return false;\n }\n }catch(Exception e){\n e.printStackTrace();\n return false;\n }\n\n return true;\n }",
"private void editarResidencia(Residencias residencia, Residenciasobservaciones obs) {\n\t\t\n\t\t\n\t\tif(obs==null) {\t\t\t\t\n\t\t\thibernateController.updateResidencia(residencia);\t\t\t\n\t\t\t\n\t\t}else {\t\t\t\n\t\t\thibernateController.updateResidenciaObservacion(residencia, obs);\n\t\t}\n\t\t\n\t\tupdateContent();\t\n\t\t\n\t}",
"public ClienteModel(int id,\n String nome,\n String email,\n String cpf,\n String sexo,\n String nascimento,\n String estadoCivil,\n String celular,\n String telefone,\n String endereco) {\n\n this.id = id;\n this.nome = nome;\n this.email = email;\n this.cpf = cpf;\n this.nascimento = nascimento;\n this.sexo = sexo;\n this.estadoCivil = estadoCivil;\n this.celular = celular;\n this.telefone = telefone;\n this.endereco = endereco;\n }",
"public void setId(int id){ this.id = id; }",
"public void editarAlimento(int id_alimento, String nombre, String estado, float caloria, float proteinas,float grasas ,float hidratos_de_carbono, float H20, float NE, float vitamina_a, float vitamina_B1, float vitamina_B2, float vitamina_C, float Niac, float sodio, float potasio, float calcio, float magnesio, float cobre, float hierro, float fosforo, float azufre, float cloro, float Fen, float Ileu, float Leu, float Lis, float Met, float Tre, float Tri, float Val, float Acid, float AlCAL);",
"public Edificio( String id )\n {\n identificador = id;\n salones = new ArrayList<Salon>( );\n }",
"public void setIdCliente(int value) {\n this.idCliente = value;\n }",
"public void setID(String idIn) {this.id = idIn;}",
"@RequestMapping(value=\"/{id}\", method=RequestMethod.PUT)\n\tpublic ResponseEntity<Void> update(@Valid @RequestBody ClienteDTO objDto, @PathVariable Integer id) {\n\t\t//Garantir que a categoria que vai ser atualizada é a que eu passar o código na URL\n\t\t//Criei um metodo que transforma uma Cliente em ClienteDTO\n\t\t//Que contem as validação.\n\t\tCliente obj = servico.fromDTO(objDto);\n\t\tobj.setId(id);\n\t\tobj = servico.update(obj);\n\t\t//conteudo vázio = noContent.\n\t\treturn ResponseEntity.noContent().build();\n\t}",
"RequesterVO get(int id);",
"public boolean getEditando() {\n return this.aluno.getId() != null;\n }",
"public void updateEditService(){\r\n \tMap<String,String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();\r\n\t\tint serviceId = Integer.parseInt(params.get(\"serviceId\"));\r\n\t\tthis.getLog().info(\"serviceId:\" + serviceId);\r\n\t\t\r\n\t\tif(serviceId == 0){\r\n\t\t\teditService = new ServiceDTO();\r\n\t\t}else{\r\n\t\t\tfor (ServiceDTO s : this.getServiceList().getAvailableServiceList()) {\r\n\t\t\t\tif(s.getId() == serviceId){\r\n\t\t\t\t\teditService = s;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t}",
"public void modificar(Long id, G entity, HttpServletRequest httpRequest) throws AppException;",
"@RequestMapping(value = \"/edit.json\", method = RequestMethod.PUT)\n\t@ResponseBody\n\tpublic ResultDto edit( HttpServletRequest request,\n\t\t\tHttpServletResponse reponse, @RequestBody String message) {\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\ttry {\n\t\t\tUser user = mapper.readValue(message, User.class);\n\t\t\tif(user.getRoleid()==null){\n\t\t\t\treturn new ResultDto(Constant.NACK, \"The role is null \", null);\n\t\t\t}\n\t\t\tif(user.getRoleid()==1 && user.getClientids().size()<=0){\n\t\t\t\treturn new ResultDto(Constant.NACK, \"The clientids is null \", null);\n\t\t\t}\n\t\t\tuserService.editById(user);\n\t\t\treponse.setStatus(Constant.HTTP_OK);\n\t\t\treturn new ResultDto(Constant.ACK, Constant.SUCCEED, null);\n\t\t} catch (IOException e) {\n\t\t\treponse.setStatus(Constant.SERVER_ERROR);\n\t\t\tlogger.error(e.toString());\n\t\t\treturn new ResultDto(Constant.NACK, \"edit parameter error \", null);\n\t\t} catch (SQLException e) {\n\t\t\treponse.setStatus(Constant.SERVER_ERROR);\n\t\t\tlogger.error(e.toString());\n\t\t\treturn new ResultDto(Constant.NACK, \"edit sql error \", null);\n\t\t}\n\t}",
"public void editar(HttpServletRequest request, HttpServletResponse response) throws Exception{\n int id=Integer.parseInt(request.getParameter(\"id\"));\n GestionMov_diversos modelo=new GestionMov_diversos(); \n MovDiversos movimiento=modelo.obtenerPorId(id);\n \n //int id_bendiv=movimiento.getId_bendiv();\n //Obteniendo el catalogo de beneficiarios diversos\n GestionBendiv modelo_benDiv= new GestionBendiv();\n ArrayList beneficiarios=modelo_benDiv.obtenerTodos();\n \n //Obteniendo el catalogo de movimientos diversos\n GestionClaveDiversos modelo_claveDiv= new GestionClaveDiversos();\n ArrayList clavediv=modelo_claveDiv.obtenerTodos();\n \n //Obteniendo el catalogo de programas\n GestionProgramas modelo_programas= new GestionProgramas();\n ArrayList programas=modelo_programas.obtenerTodos();\n \n //Obteniendo el catalogo de emisores\n GestionEmisor modelo_emisores= new GestionEmisor();\n ArrayList emisores=modelo_emisores.obtenerTodos();\n \n request.setAttribute(\"movimiento\", movimiento);\n request.setAttribute(\"beneficiarios\", beneficiarios);\n request.setAttribute(\"clavediv\", clavediv);\n request.setAttribute(\"programas\", programas);\n request.setAttribute(\"emisores\", emisores);\n \n RequestDispatcher rd=request.getRequestDispatcher(\"frm_modificamov_diversos.jsp\");\n rd.forward(request,response);\n }",
"public void localizarDados(int idOrcamento){\n OrcamentoCursoController orcamentoCursoController = new OrcamentoCursoController();\n this.orcamentocurso = orcamentoCursoController.consultar(idOrcamento);\n if (orcamentocurso!=null){\n ClienteController clienteController = new ClienteController();\n cliente = clienteController.consultar(orcamentocurso.getCliente());\n if (cliente!=null){\n parajTextField.setText(cliente.getEmail());\n }\n }\n }",
"public void setIdPreventivo(int idPreventivo) {\n this.idPreventivo = idPreventivo;\n }",
"public void ponerUsuarioInactivo(String idUsuario);",
"public Equipamento editar(Equipamento eq) {\r\n\t\t\tthis.conexao.abrirConexao();\r\n\t\t\tString sqlUpdate = \"UPDATE equipamentos SET nome=?,descricao=?, id_usuario=? WHERE id_equipamentos=?\";\r\n\t\t\ttry {\r\n\t\t\t\tPreparedStatement statement = (PreparedStatement) this.conexao.getConexao().prepareStatement(sqlUpdate);\r\n\t\t\t\tstatement.setString(1, eq.getNome());\r\n\t\t\t\tstatement.setString(2, eq.getDescricao());\r\n\t\t\t\tstatement.setLong(3, eq.getUsuario().getId());\r\n\t\t\t\tstatement.setLong(4, eq.getId());\r\n\t\t\t\t/*int linhasAfetadas = */statement.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tthis.conexao.fecharConexao();\r\n\t\t\t}\r\n\t\t\treturn eq;\r\n\t\t}",
"public void modificar() {\n try {\n if(!fecha.equals(null)){\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n \n calendar.setTime((Date) this.fecha);\n this.Selected.setApel_fecha_sesion(calendar.getTime());\n\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n apelacionesDao.IME_APELACIONES(2, Selected); \n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.Selected.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"1\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue modificada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n this.Selected = new ApelacionesBean();\n addMessage(\"Guadado Exitosamente\", 1);\n }else\n {\n addMessage(\"Es requerida la fecha\",1 );\n }\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al insertar el registro, contacte al administrador del sistema\", 1);\n }\n }",
"public void onClick$editClientButton() {\n\n\t\tClient client = buildClient();\n\t\tclient.setId(clientToEdit.getId());\n\n\t\tClientService clientService = ServiceLocator.getClientService();\n\n\t\ttry {\n\t\t\tclientService.saveOrUpdate(client);\n\t\t} catch (Exception e) {\n\t\t\tmessageLabel.setValue(\"Error al crear el cliente\");\n\t\t\tLOGGER.error(e);\n\t\t}\n\t\tExecutions.sendRedirect(\"queryClients.zul\");\n\t\tmessageLabel.setValue(\"Cliente creado exitosamente.\");\n\t}",
"private void editar(HttpPresentationComms comms) throws HttpPresentationException, KeywordValueException {\n/* 149 */ int idRecurso = 0;\n/* */ try {\n/* 151 */ idRecurso = Integer.parseInt(comms.request.getParameter(\"idRecurso\"));\n/* */ }\n/* 153 */ catch (Exception e) {}\n/* */ \n/* */ \n/* 156 */ PrcRecursoDAO ob = new PrcRecursoDAO();\n/* 157 */ PrcRecursoDTO reg = ob.cargarRegistro(idRecurso);\n/* 158 */ if (reg != null) {\n/* 159 */ this.pagHTML.getElementIdRecurso().setValue(\"\" + reg.getIdRecurso());\n/* 160 */ this.pagHTML.getElementDescripcionRecurso().setValue(\"\" + reg.getDescripcionRecurso());\n/* 161 */ this.pagHTML.getElementUsuarioInsercion().setValue(\"\" + reg.getUsuarioInsercion());\n/* 162 */ this.pagHTML.getElementFechaInsercion().setValue(\"\" + reg.getFechaInsercion());\n/* 163 */ this.pagHTML.getElementUsuarioModificacion().setValue(\"\" + reg.getUsuarioModificacion());\n/* 164 */ this.pagHTML.getElementFechaModificacion().setValue(\"\" + reg.getFechaModificacion());\n/* 165 */ HTMLSelectElement combo = this.pagHTML.getElementIdTipoRecurso();\n/* 166 */ comboMultivalores(combo, \"tipo_recurso\", \"\" + reg.getIdTipoRecurso(), true);\n/* */ \n/* 168 */ combo = this.pagHTML.getElementIdProcedimiento();\n/* 169 */ llenarCombo(combo, \"prc_procedimientos\", \"id_procedimiento\", \"objetivo\", \"1=1\", \"\" + reg.getIdProcedimiento(), true);\n/* */ \n/* 171 */ combo = this.pagHTML.getElementEstado();\n/* 172 */ comboMultivalores(combo, \"estado_activo_inactivo\", \"\" + reg.getEstado(), true);\n/* */ \n/* */ \n/* 175 */ this.pagHTML.getElementIdRecurso().setReadOnly(true);\n/* */ } \n/* 177 */ this.pagHTML.getElement_operacion().setValue(\"M\");\n/* 178 */ activarVista(\"nuevo\");\n/* */ }",
"public void setId(int id) { this.id = id; }",
"public void setId(int id) { this.id = id; }",
"@Override\n\tpublic void editAction(int id) {\n\t\t\n\t}",
"Meal editMeal(MealEditDTO mealEditDTO);",
"User editUser(User user);",
"public Integer getId_solicitud() {\n return id_solicitud;\n }",
"@PutMapping(\"/edit\")\n public ResponseEntity<?> editPenerbit(@RequestBody PenerbitDto dto){\n try {\n StatusMessageDto<PenerbitDto> response = new StatusMessageDto<>();\n if(dto.getNamaPenerbit().isEmpty() == true){\n response.setStatus(HttpStatus.BAD_REQUEST.value());\n response.setMessage(\"Penerbit kosong!\");\n response.setData(dto);\n return ResponseEntity.badRequest().body(response);\n }\n \n PenerbitDto penerbitDto = penerbitService.update(dto);\n if(penerbitDto == null){\n response.setStatus(HttpStatus.BAD_REQUEST.value());\n response.setMessage(\"Penerbit gagal diubah!\");\n response.setData(penerbitDto);\n return ResponseEntity.badRequest().body(response);\n }\n else{\n response.setStatus(HttpStatus.OK.value());\n response.setMessage(\"Penerbit berhasil diubah!\");\n response.setData(penerbitDto);\n return ResponseEntity.ok().body(response);\n }\n } catch (Exception e) {\n return ResponseEntity.badRequest().body(e);\n }\n }",
"public Optional<?> confirmarTarefa(Long idTarefa){\n\t\treturn tarefaRepository.findById(idTarefa)\n\t\t\t\t.map(tarefa -> {\n\t\t\t\ttarefa.setStatus(true);\n\t\t\t\ttarefaRepository.save(tarefa);\n\t\t\t\treturn Optional.of(tarefa);\n\t\t\t\t}).orElse(Optional.empty());\n\t}",
"public void modificarUsuario(Long id, String nombre);",
"@Override\n\tpublic CLIENTE pesquisar(int id_cliente) {\n\t\t\n\t\tString sql = \"SELECT * FROM CLIENTE WHERE ID_CLIENTE = ?\";\n\t\t\n\t\tConnection conexao;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tconexao = JdbcUtil.getConexao();\n\t\t\t\n\t\t\tPreparedStatement ps = conexao.prepareStatement(sql);\n\t\t\t\n\t\t\tps.setInt(1, id_cliente);\n\t\t\t\n\t\t\tResultSet res = ps.executeQuery();\n\t\t\t\n\t\t\twhile(res.next()){\n\t\t\t\t\n\t\t\t\tcliente.setId_cliente(res.getInt(\"ID_CLIENTE\"));\n\t\t\t\tcliente.setNomeCliente(res.getString(\"NOME_CLIENTE\"));\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tps.close();\n\t\t\tconexao.close();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn cliente;\n\t}",
"private void handleOptionOne() {\n\n ClientData clientData = view.askForClientPersonalDataAndCreateClientData(); // zwracamy stworzonego w widoku clienta z wrpowadoznych scanerem danych\n clientModel.save(clientData); // zapisujemy clienta do bazy danych\n view.showClientInformation(clientData); // wyswietlamy info o jego pinie itp.\n\n }",
"public String edit(Entidades entidade) {\n\t\tif(verificaPermissao()) {\n\t\t\tEntidadesDAO.saveOrUpdate(entidade);\n\t\t\tthis.entidades = new Entidades();\n\t\t}\n\t\treturn \"/Consulta/consulta_entidades\";\n\t}",
"public void editPrioritaet(int prioID, String bezeichnung) throws Exception;",
"public void editHandler(View v) {\n LinearLayout vwParentRow = (LinearLayout)v.getParent();\n TextView id =(TextView) vwParentRow.findViewById(R.id._id);\n Intent intent = new Intent(Hates.this, Formulario.class);\n\n intent.putExtra(C_MODO, C_EDITAR);\n intent.putExtra(C_TIPO, love_hate);\n intent.putExtra(mDbHelper.ID, Long.valueOf((String)id.getText()));\n\n\n this.startActivityForResult(intent, C_EDITAR);\n }",
"public void editarHospede() {\n int i;\n if (hospedesCadastrados.isEmpty()) {\n System.err.println(\"Nao existe hospedes cadastrados\\n\");\n } else {\n listarHospedes();\n int cpf = verifica();\n for (i = 0; i < hospedesCadastrados.size(); i++) {\n if (hospedesCadastrados.get(i).getCpf() == cpf) {//hospede\n System.err.println(\"O que deseja editar:\\n Nome(1)\\n\"\n + \"Cpf(2)\\nE-MAIL(3)\");\n int a = verifica();\n switch (a) {\n case 1:\n System.err.println(\"Digite o novo nome do hospede:\\n\");\n String nome = ler.next();\n hospedesCadastrados.get(i).setNome(nome);\n System.err.println(\"Atualzacao concluida!\\n\");\n break;\n case 2:\n System.err.println(\"Digite o novo CPF do hospede:\\n\");\n int cpf1 = verifica();\n hospedesCadastrados.get(i).setCpf(cpf1);\n System.err.println(\"Atualzacao concluida!\\n\");\n break;\n case 3:\n System.err.println(\"Digite o novo E-MAIL do hospede:\\n\");\n String email = ler.next();\n hospedesCadastrados.get(i).setEmail(email);\n System.err.println(\"Atualzacao concluida!\\n\");\n break;\n }\n\n } else if (hospedesCadastrados.size() == i) {\n System.err.println(\"Nao existem hospedes com esse cpf cadastrados!\\n\");\n }\n }\n }\n }",
"public void setEstadoEleicaoEncerrada(int idEleicao){\n this.eleicaoDB.setEstadoEleicaoEncerrada(idEleicao);\n }",
"public ResultadoDTO modificarUsuario(String id, String nombre, UsuarioDTO usuarioDTO)throws IllegalArgumentException;",
"public String actualizarComentario(int id){\r\n\t\t Comentarios com = comDao.getComentario(id);\r\n\t\t this.com=com;\r\n\t\treturn null;\r\n\t}",
"protected void edit(HttpServletRequest request, HttpServletResponse response, EcAnonymousPaymentInfoForm _EcAnonymousPaymentInfoForm, EcAnonymousPaymentInfo _EcAnonymousPaymentInfo) throws Exception{\n\r\n _EcAnonymousPaymentInfo.setAnonymousUserId(WebParamUtil.getLongValue(_EcAnonymousPaymentInfoForm.getAnonymousUserId()));\r\n _EcAnonymousPaymentInfo.setFirstName(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getFirstName()));\r\n _EcAnonymousPaymentInfo.setMiddleInitial(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getMiddleInitial()));\r\n _EcAnonymousPaymentInfo.setLastName(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getLastName()));\r\n _EcAnonymousPaymentInfo.setAddress1(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getAddress1()));\r\n _EcAnonymousPaymentInfo.setAddress2(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getAddress2()));\r\n _EcAnonymousPaymentInfo.setCity(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getCity()));\r\n _EcAnonymousPaymentInfo.setState(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getState()));\r\n _EcAnonymousPaymentInfo.setZip(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getZip()));\r\n _EcAnonymousPaymentInfo.setCountry(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getCountry()));\r\n _EcAnonymousPaymentInfo.setPaymentType(WebParamUtil.getIntValue(_EcAnonymousPaymentInfoForm.getPaymentType()));\r\n _EcAnonymousPaymentInfo.setPaymentNum(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getPaymentNum()));\r\n _EcAnonymousPaymentInfo.setPaymentExpireMonth(WebParamUtil.getIntValue(_EcAnonymousPaymentInfoForm.getPaymentExpireMonth()));\r\n _EcAnonymousPaymentInfo.setPaymentExpireYear(WebParamUtil.getIntValue(_EcAnonymousPaymentInfoForm.getPaymentExpireYear()));\r\n _EcAnonymousPaymentInfo.setPaymentExtraNum(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getPaymentExtraNum()));\r\n _EcAnonymousPaymentInfo.setTimeCreated(WebParamUtil.getDateValue(_EcAnonymousPaymentInfoForm.getTimeCreated()));\r\n\r\n m_actionExtent.beforeUpdate(request, response, _EcAnonymousPaymentInfo);\r\n m_ds.update(_EcAnonymousPaymentInfo);\r\n m_actionExtent.afterUpdate(request, response, _EcAnonymousPaymentInfo);\r\n }",
"public void aceptarPresupuesto(Long idPresupuesto) {\n\n Presupuesto presupuesto = buscarPresupuesto(idPresupuesto);\n\n EstadoPresupuesto estadoAceptado = estadoPresupuestoRepository\n .findByNombreEstado(globales.NOMBRE_ESTADO_PRESUPUESTO_ACEPTADO);\n if (presupuesto.getEstadoPresupuesto().equals(estadoAceptado)) {\n\n // este presupuesto ya fue aceptado\n // avisar por pantalla la fecha de aceptacion\n LocalDate fechaAceptado = presupuesto.getFechaAceptado();\n\n } else {\n // cambio el estado del presupuesto a aceptado y tambien del pedido de repuesto\n EstadoPresupuesto estadoCreado = estadoPresupuestoRepository\n .findByNombreEstado(globales.NOMBRE_ESTADO_PRESUPUESTO_CREADO);\n if (presupuesto.getEstadoPresupuesto().equals(estadoCreado)) {\n\n presupuesto.setEstadoPresupuesto(estadoAceptado);\n presupuesto.setFechaAceptado(LocalDate.now());\n\n EstadoPedidoRepuesto estadoPendienteDePedido = estadoPedidoRepuestoRepository\n .findByNombreEstado(globales.NOMBRE_ESTADO_PEDIDO_REPUESTO_PENDIENTE_DE_PEDIDO);\n\n PedidoRepuesto pedido = pedidoRepuestoRepository.findByPresupuesto(presupuesto);\n\n pedido.setEstadoPedidoRepuesto(estadoPendienteDePedido);\n\n // GUARDAR\n pedidoRepuestoRepository.save(pedido);\n }\n }\n }",
"int updateEstancia(final Long srvcId);",
"SeminarioDTO findOne(Long id);",
"public ActionForward editarUbicacion(ActionMapping mapping,\n\t\t\tActionForm form, HttpServletRequest request,\n\t\t\tHttpServletResponse response) {\n\t\tlong idOferta = Utils.parseLong(request.getParameter(\"idOferta\").toString());\n\t\trequest.setAttribute(\"idOferta\", idOferta+\"\");\n\t\t\n\t\t\n\t\ttry {\n\t\t\tlong idEmpresa = Utils.parseLong(request.getSession().getAttribute(\"idEmpresa\").toString());\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tArrayList<RegistroEntidadesVO> listaEntidadesSeleccionadas = (ArrayList<RegistroEntidadesVO>) request\n\t\t\t\t\t.getSession().getAttribute(\"listaEntidadesSeleccionadas\");\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tArrayList<String> listaSectoresSeleccionados = (ArrayList<String>) request\n\t\t\t\t\t.getSession().getAttribute(\"listaSectoresSeleccionados\");\n\t\t\tRegistroUbicacionForm f = (RegistroUbicacionForm) form;\n\n\t\t\tif (listaEntidadesSeleccionadas == null\n\t\t\t\t\t&& f.getPrefiereCandidatosEntidad() != null) {\n\t\t\t\tArrayList<RegistroEntidadesVO> listaEnt = new ArrayList<RegistroEntidadesVO>();\n\t\t\t\tRegistroEntidadesVO entidad = new RegistroEntidadesVO();\n\t\t\t\tentidad.setEntidad(Utils.parseLong(f\n\t\t\t\t\t\t.getPrefiereCandidatosEntidad()));\n\t\t\t\tentidad.setMunicipio(Utils.parseLong(f\n\t\t\t\t\t\t.getPrefiereCandidatosMunicipio()));\n\t\t\t\tlistaEnt.add(entidad);\n\t\t\t\trequest.getSession().setAttribute(\n\t\t\t\t\t\t\"listaEntidadesSeleccionadas\", listaEnt);\n\t\t\t}\n\n\t\t\tif (listaEntidadesSeleccionadas != null\n\t\t\t\t\t&& f.getPrefiereCandidatosEntidad() != null) {\n\t\t\t\tRegistroEntidadesVO entidad = new RegistroEntidadesVO();\n\t\t\t\tentidad.setEntidad(Utils.parseLong(f\n\t\t\t\t\t\t.getPrefiereCandidatosEntidad()));\n\t\t\t\tentidad.setMunicipio(Utils.parseLong(f\n\t\t\t\t\t\t.getPrefiereCandidatosMunicipio()));\n\t\t\t\tlistaEntidadesSeleccionadas.add(entidad);\n\t\t\t\trequest.getSession().setAttribute(\n\t\t\t\t\t\t\"listaEntidadesSeleccionadas\",\n\t\t\t\t\t\tlistaEntidadesSeleccionadas);\n\t\t\t}\n\n\t\t\tif (listaSectoresSeleccionados == null && f.getSector() != null) {\n\t\t\t\tArrayList<String> listaSectores = new ArrayList<String>();\n\t\t\t\tString sector = f.getSector();\n\t\t\t\tlistaSectores.add(sector);\n\t\t\t\trequest.getSession().setAttribute(\"listaSectoresSeleccionados\",\n\t\t\t\t\t\tlistaSectores);\n\t\t\t}\n\n\t\t\tif (listaSectoresSeleccionados != null && f.getSector() != null) {\n\t\t\t\tString sector = f.getSector();\n\t\t\t\tlistaSectoresSeleccionados.add(sector);\n\t\t\t\trequest.getSession().setAttribute(\"listaSectoresSeleccionados\",\n\t\t\t\t\t\tlistaSectoresSeleccionados);\n\t\t\t}\n\n\t\t\tRegistroUbicacionVO registroUbicacionVO = converterUbicacion(form,\n\t\t\t\t\tidEmpresa);\n\t\t\tregistroUbicacionVO.setIdOferta(idOferta);\n\t\t\trequest.getSession().setAttribute(\"listaPrestaciones\",\n\t\t\t\t\tregistroUbicacionVO.getPrestaciones());\n\n\t\t\trequest.getSession().setAttribute(\"registroUbicacionVO\",\n\t\t\t\t\tregistroUbicacionVO);\n\n\t\t\t// idOferta = services.guardarUbicacion(registroUbicacionVO);\n\t\t\t// idOferta = services.editarUbicacion(registroUbicacionVO);\n\n\t\t\t// request.getSession().setAttribute(\"id_oferta\", \"\" + idOferta);\n\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e); // TODO Notificar error al usuario\n\t\t}\n\n\t\t// request.getSession().setAttribute(BODY_JSP,\n\t\t// mapping.findForward(FORWARD_NEXT).getPath());\n\t\treturn mapping.findForward(FORWARD_NEXT);\n\t}",
"@RequestMapping(value = \"/{id}\", method = RequestMethod.PUT)\n\t\tpublic ResponseEntity<Void> atualizar(@RequestBody Pedido obj, @PathVariable Integer id) {\n\t\t\ttry {\n\t\t\t\tobj = service.atualiza(obj);\n\t\t\t} catch (Exception e) {\n\t\t\t\tobj = null;\n\t\t\t}\n\n\t\t\treturn ResponseEntity.noContent().build();\n\t\t}",
"public static boolean edit(String name, String id) {\n Boolean flag = true;\n if(doPut(name,id) == 200) {\n System.out.println(\"Response Body:\");\n String res = \"\";\n String print = read(id);\n try {\n JSONObject json = new JSONObject(print);\n json.put(\"success\", flag);\n res = json.toString();\n } catch (JSONException ex) {\n Logger.getLogger(RestaurantApiClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n System.out.println(res);\n return true;\n }\n \n return false;\n }",
"public void setIdAutorizacionEmpresaSRI(int idAutorizacionEmpresaSRI)\r\n/* 79: */ {\r\n/* 80:122 */ this.idAutorizacionEmpresaSRI = idAutorizacionEmpresaSRI;\r\n/* 81: */ }",
"public void prepareIdEmpleado(ActionEvent event) {\n Rentadevolucion selected = this.getSelected();\n if (selected != null && idEmpleadoController.getSelected() == null) {\n idEmpleadoController.setSelected(selected.getIdEmpleado());\n }\n }",
"@Override\n public boolean modificar(ModelCliente cliente) {\n strSql = \"UPDATE CLIENTE \" +\n \"SET \" +\n \"NOMBRE = '\" + cliente.getNombre() + \"', \" +\n \"APELLIDO = '\" + cliente.getApellido()+ \"', \" + \n \"NIT = '\" + cliente.getNit() + \"', \" + \n \"TELEFONO = '\" + cliente.getTelefono() + \"', \" +\n \"DIRECCION = '\" + cliente.getDireccion()+ \"' \" +\n \"WHERE ID_CLIENTE = \" + cliente.getIdCliente()+\n \" AND ID_EMPRESA = \" + cliente.getIdEmpresa();\n try {\n //se abre una conexión hacia la BD\n conexion.open();\n //Se ejecuta la instrucción y retorna si la ejecución fue satisfactoria\n respuesta = conexion.executeSql(strSql);\n //Se cierra la conexión hacia la BD\n conexion.close();\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); \n return false;\n } catch(Exception ex){\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); \n }\n return respuesta;\n }",
"@Override\n\tpublic void cancelRequest(int id) {\n\t\tSession session = factory.getCurrentSession();\n\t\tQuery query = session\n\t\t\t\t.createQuery(\"update Booking b set b.bookingStatus='' where b.bookingId=\"+id );\n\t\tint i = query.executeUpdate();\n\t\t\n\t\t\n\t}",
"public RespuestaBD modificarRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismomismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioModificacion) {\n/* 437 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* */ try {\n/* 440 */ String s = \"update wkf_detalle set servicio_inicio=\" + servicioInicio + \",\" + \" accion=\" + accion + \",\" + \" codigo_estado=\" + codigoEstado + \",\" + \" servicio_destino=\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \" nombre_procedimiento='\" + nombreProcedimiento + \"',\" + \" correo_destino='\" + correoDestino + \"',\" + \" enviar_solicitud='\" + enviar + \"',\" + \" ind_mismo_proveedor='\" + mismoProveedor + \"',\" + \" ind_mismo_cliente='\" + mismomismoCliente + \"',\" + \" estado='\" + estado + \"',\" + \" caracteristica=\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + \" valor_caracteristica=\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + \" caracteristica_correo=\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + \" metodo_seleccion_proveedor=\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + \" ind_correo_clientes=\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + \" enviar_hermana=\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + \" enviar_si_hermana_cerrada=\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + \" ind_cliente_inicial=\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \" usuario_modificacion='\" + usuarioModificacion + \"',\" + \" fecha_modificacion=\" + Utilidades.getFechaBD() + \"\" + \" where\" + \" codigo_flujo=\" + codigoFlujo + \" and secuencia=\" + secuencia + \"\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 465 */ rta = this.dat.executeUpdate2(s);\n/* */ }\n/* 467 */ catch (Exception e) {\n/* 468 */ e.printStackTrace();\n/* 469 */ Utilidades.writeError(\"FlujoDetalleDAO:modificarRegistro \", e);\n/* 470 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 472 */ return rta;\n/* */ }"
] |
[
"0.6524091",
"0.64075035",
"0.63616985",
"0.63464385",
"0.6333753",
"0.6298146",
"0.6277807",
"0.6277178",
"0.62692606",
"0.6170112",
"0.61385894",
"0.6135195",
"0.6053645",
"0.6039578",
"0.60359323",
"0.60299075",
"0.602018",
"0.60029143",
"0.5989719",
"0.597118",
"0.59706163",
"0.5964668",
"0.59409994",
"0.5933645",
"0.59335303",
"0.5916149",
"0.59137815",
"0.5870046",
"0.5869587",
"0.58655363",
"0.58554375",
"0.5854795",
"0.58483446",
"0.5842036",
"0.5837249",
"0.58166015",
"0.58158696",
"0.5792005",
"0.5763681",
"0.5713547",
"0.57089233",
"0.5707099",
"0.56991404",
"0.5676064",
"0.56744534",
"0.5668689",
"0.56596076",
"0.56546265",
"0.56511694",
"0.5642714",
"0.56136847",
"0.56112987",
"0.5599206",
"0.558867",
"0.55761755",
"0.55759126",
"0.5571697",
"0.5570302",
"0.55669457",
"0.55656594",
"0.5564987",
"0.5564828",
"0.55645216",
"0.5546804",
"0.55359447",
"0.55156755",
"0.5513277",
"0.55045015",
"0.54906356",
"0.54857236",
"0.5485292",
"0.54848623",
"0.54848623",
"0.5483595",
"0.5479144",
"0.5471121",
"0.54696727",
"0.5467615",
"0.5462895",
"0.5461702",
"0.54559",
"0.5454235",
"0.54526454",
"0.54506975",
"0.5444767",
"0.54394686",
"0.54342884",
"0.54338163",
"0.542766",
"0.5420428",
"0.5412561",
"0.5412249",
"0.54122293",
"0.540895",
"0.5408531",
"0.54061955",
"0.5404716",
"0.54041445",
"0.54037064",
"0.5398705",
"0.5391352"
] |
0.0
|
-1
|
remove uma solicitacao do banco
|
public void remover(Solicitacao solicitacao) {
System.out.println("Removendo livro");
DAO<Solicitacao> dao = new DAO<Solicitacao>(Solicitacao.class);
dao.remove(solicitacao);
//recarrega a pagina devido ao cache
this.solicitacoes = dao.listaTodos();
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void removerClienteDoBanco(){\n\t\tdao.removerCliente(doCadastroController);\r\n\t}",
"public void removeMotorista() {\n\t\tConector con = new Conector();\r\n\t\tString params[] = new String[2];\r\n\r\n\t\tparams[0] = \"op=8\";\r\n\t\tparams[1] = \"email=\" + usuario;\r\n\r\n\t\tcon.sendHTTP(params);\r\n\t}",
"public void removeBorda(String host) {\r\n for(Borda b:bordas){\r\n if(b.getEndereco().equals(host)){\r\n bordas.remove(b);\r\n break;\r\n }\r\n }\r\n }",
"@Override\n\tpublic void removeBan(String ip) throws Exception {\n\n\t}",
"public void eliminar(String sentencia){\n try {\n Statement stmt = Conexion.getInstancia().createStatement();\n stmt.executeUpdate(sentencia);\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }",
"public void eliminarBodegaActual(){\n Nodo_bodega_actual.obtenerAnterior().definirSiguiente(Nodo_bodega_actual.obtenerSiguiente());\n if(Nodo_bodega_actual.obtenerSiguiente() != null){\n Nodo_bodega_actual.obtenerSiguiente().definirAnterior(Nodo_bodega_actual.obtenerAnterior());\n } \n }",
"@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n if (i == 0) { // if the user click on cancel btn\n\n //i want to remove that request from the requests fragment//\n //first, we need to remove for sender\n RequestsRef.child(currentUserID).child(userID)\n .removeValue()\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n //then for receiver\n if (task.isSuccessful()){\n RequestsRef.child(userID).child(currentUserID)\n .removeValue()\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n Toast.makeText(getContext(), \"You have cancelled the chat request.\", Toast.LENGTH_SHORT).show();\n }\n });\n }\n }\n });\n }\n\n }",
"public void deletar() {\n if(Sessao.isConfirm()){\n Usuario use = new Usuario();\n use.setId(Sessao.getId());\n Delete_Banco del = new Delete_Banco();\n del.Excluir_Usuario(use);\n this.setVisible(false);\n Sessao.setId(0);\n tela_Principal prin = Sessao.getPrin();\n prin.atualizar_Tela();\n }\n }",
"public static void delBan(String ip, String sender) {\n String query = \"DELETE FROM `\" + mysql_db + \"`.`banlist` WHERE `ip` = ?\";\n try (Connection con = getConnection(); PreparedStatement pst = con.prepareStatement(query)) {\n pst.setString(1, ip);\n if (pst.executeUpdate() <= 0) {\n bot.blockingIRCMessage(sender, \"IP does not exist.\");\n } else {\n // Temporary list to avoid concurrent modification exception\n List<Server> tempList = new LinkedList<>(bot.servers);\n for (Server server : tempList) {\n server.in.println(\"delban \" + ip);\n }\n bot.blockingIRCMessage(sender, \"Removed \" + ip + \" from banlist.\");\n }\n } catch (SQLException e) {\n\n logMessage(LOGLEVEL_IMPORTANT, \"Could not delete ip from banlist\");\n }\n }",
"private void deleteBuyer() {\n progressDialogHelper.show();\n StringRequest request = new StringRequest(Request.Method.DELETE, apiUrl, response -> {\n try {\n JSONObject resp = new JSONObject(response);\n\n if(resp.getBoolean(\"status\")) {\n alert.setTitle(\"Sukses!\");\n alert.setOnDismissListener(l -> {\n onBackPressed();\n });\n }\n alert.setMessage(resp.getJSONObject(\"data\").getString(\"message\")).show();\n } catch (JSONException e) {\n e.printStackTrace();\n alert.setMessage(e.getMessage()).show();\n }\n\n progressDialogHelper.dismiss();\n\n }, error -> {\n progressDialogHelper.dismiss();\n alert.setMessage(error.getMessage()).show();\n }) {\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return RequestGlobalHeaders.get(getApplicationContext());\n }\n };\n\n requestQueue.add(request);\n }",
"private void enviarRequisicaoRemover() {\n servidor.removerPalito(nomeJogador);\n atualizarPalitos();\n }",
"private void eliminar(HttpServletRequest request, HttpServletResponse response) {\n\t\n\t\ttry {\n\t\t\tString numero =request.getParameter(\"idCliente\");//leo parametro numeroHabitacion de la vista\n\t\t\t\n\t\t\t//llamo a un metodo del modelo para que elimine el editorial de la bd y consulto si se pudo eliminar\n\t\t\tif(modelo.eliminarCliente(numero) > 0) {\n\t\t\t\t\n\t\t\t\t//paso un atributo de exito si se pudo eliminar\n\t\t\t\trequest.setAttribute(\"exito\", \"Cliente eliminado exitosamente\");\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//paso un atributo de fracaso. \n\t\t\t\trequest.setAttribute(\"fracaso\", \"No se puede eliminar Cliente\");\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//redirecciono sin importar si se pudo o no eliminar\n\t\t\trequest.getRequestDispatcher(\"/clientes.do?op=listar\").forward(request, response);\n\t\t} catch (SQLException | ServletException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\n\t}",
"public void eliminarMensaje(InfoMensaje m) throws Exception;",
"@Override\n public void onClick(View view) {\n CharSequence options[] =new CharSequence[] {\n \"Cancel Chat Request\"\n };\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder.setTitle(name + \" Already Sent Request\");\n builder.setItems(options, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n //i = position of CharSequence\n if (i == 0) { // if the user click on cancel btn\n\n //i want to remove that request from the requests fragment//\n //first, we need to remove for sender\n RequestsRef.child(currentUserID).child(userID)\n .removeValue()\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n //then for receiver\n if (task.isSuccessful()){\n RequestsRef.child(userID).child(currentUserID)\n .removeValue()\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n Toast.makeText(getContext(), \"You have cancelled the chat request.\", Toast.LENGTH_SHORT).show();\n }\n });\n }\n }\n });\n }\n\n }\n });\n builder.show();\n }",
"public void excluirClienteConta(Integer idFaturamentoGrupo , Integer anoMesReferencia) throws ErroRepositorioException ;",
"public void eliminaCliente(Utente u) {\n\t\ttry {\n\t\t\tPreparedStatement prst = connection.prepareStatement(DbManagerUtils.CANCELLA_UTENTE);\n\t\t\tprst.setString(1, u.getUsername());\n\t\t\tprst.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void elimina(DTOAcreditacionGafetes acreGafete) throws Exception;",
"public void deleteTbagendamento() {\n\n if (agendamentoLogic.removeTbagendamento(tbagendamentoSelected)) {\n AbstractFacesContextUtils.addMessageInfo(\"Agendamento removido com sucesso.\");\n listTbagendamentos = agendamentoLogic.findAllTbagendamentoFromCurrentDay();\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falha ao remover agendamento.\");\n }\n\n }",
"void eliminarPedido(UUID idPedido);",
"public void deletar() throws Exception {\n // Verifica se o bean existe\n if(b == null)\n throw new Exception(Main.recursos.getString(\"bd.objeto.nulo\"));\n\n String sql = \"DELETE FROM banca WHERE idBanca = \" + b.getIdBanca();\n\n Transacao.executar(sql);\n }",
"@Override\n\tpublic void deleteBanque(Banque b) {\n\t\t\n\t}",
"private void clearAddFriendBToServer() {\n if (reqCase_ == 2) {\n reqCase_ = 0;\n req_ = null;\n }\n }",
"private void eliminar(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n Connection con = null;//Objeto para la conexion\r\n Statement sentencia = null;//Objeto para definir y ejecutar las consultas sql\r\n int resultado = 0;//resultado de las filas borradas sql\r\n String sql = \"\";\r\n try {\r\n\r\n //ESTABLECER CONEXION\r\n con = conBD.getCConexion();\r\n System.out.println(\"Conectado a BD...\");\r\n\r\n //OBTENER EL DATO A ELIMINAR\r\n String emailUsuario = request.getParameter(\"ID\");\r\n\r\n //Definición de Sentencia SQL\r\n sql = \"DELETE FROM USUARIOS WHERE semail='\" + emailUsuario + \"'\";\r\n\r\n //Ejecutar sentencia\r\n sentencia = con.createStatement();\r\n resultado = sentencia.executeUpdate(sql);\r\n System.out.println(\"Borrado exitoso !\");\r\n request.setAttribute(\"mensaje\", \"Registro borrado exitosamente !\");\r\n //cerrar la conexion\r\n //con.close();\r\n\r\n //listar de nuevo los datos\r\n todos(request, response);\r\n\r\n } catch (SQLException ex) {\r\n System.out.println(\"No se ha podido establecer la conexión, o el SQL esta mal formado \" + sql);\r\n request.getRequestDispatcher(\"/Error.jsp\").forward(request, response);\r\n }\r\n }",
"@RequestMapping(value = \"/bancos/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteBanco(@PathVariable Long id) {\n log.debug(\"REST request to delete Banco : {}\", id);\n bancoService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"banco\", id.toString())).build();\n }",
"public synchronized static void borrarProduccion(String usuario){\n if(!produccion.isEmpty())\n for(Construcciones construccion : produccion){\n if(construccion.usuario.equalsIgnoreCase(usuario))\n produccion.remove(construccion);\n }\n}",
"private void clearDeleteFriendServerToB() {\n if (rspCase_ == 18) {\n rspCase_ = 0;\n rsp_ = null;\n }\n }",
"protected void cmdRemove() throws Exception{\n\t\t//Determinamos los elementos a eliminar. De cada uno sacamos el id y el timestamp\n\t\tVector entities = new Vector();\n\t\tStringTokenizer claves = new StringTokenizer(conectorParametro(\"idSelection\"), \"|\");\n\t\tStringTokenizer timestamps = new StringTokenizer(conectorParametro(\"timestamp\"), \"|\");\n\t\ttraza(\"MMG::Se van a borrar \" + claves.countTokens() + \" y son \" + conectorParametro(\"idSelection\"));\n\t\twhile(claves.hasMoreTokens() && timestamps.hasMoreTokens()){\n\t\t\tCobGrupoUsuarCobraData cobGrupoUsuarCobra = new CobGrupoUsuarCobraData();\n\t\t\tcobGrupoUsuarCobra.setId(new Long(claves.nextToken()));\n\t\t\t//cobGrupoUsuarCobra.jdoSetTimeStamp(Long.parseLong(timestamps.nextToken()));\n\t\t\tentities.addElement(cobGrupoUsuarCobra);\n\t\t}\n\t\t\n\t\t//Construimos el DTO para realizar la llamada\n\t\tVector datos = new Vector();\n\t\tMareDTO dto = new MareDTO();\n\t\tdto.addProperty(\"entities\", entities);\n\t\tdatos.add(dto);\n\t\tdatos.add(new MareBusinessID(BUSINESSID_REMOVE));\n\t\t\n\t\t\n\t\t\n\t\t//Invocamos la lógica de negocio\n\t\ttraza(\"MMG:: Iniciada ejecución Remove de entidad CobGrupoUsuarCobra\");\n\t\tDruidaConector conectorCreate = conectar(CONECTOR_REMOVE, datos);\n\t\ttraza(\"MMG:: Finalizada ejecución Remove de entidad CobGrupoUsuarCobra\");\n\t\t\n\t\t\n\n\t\t//metemos en la sesión las query para realizar la requery\n\t\tconectorParametroSesion(SESSION_ATTRIBUTE_LAST_QUERY, conectorParametro(VAR_LAST_QUERY_TO_SESSION));\n\t\t\n\t\t//Redirigimos a la LP de StartUp con la acción de StartUp y requery\n\t\tconectorAction(\"CobGrupoUsuarCobraLPStartUp\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ORIGEN, \"menu\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ACCION, ACCION_REMOVE);\n\t\tconectorActionParametro(VAR_PERFORM_REQUERY, \"true\");\n\t}",
"public void eliminar(Long id) throws AppException;",
"@Override\n\tpublic void delete(BatimentoCardiaco t) {\n\t\t\n\t}",
"public void eliminar(AplicacionOferta aplicacionOferta){\n try{\n aplicacionOfertaDao.remove(aplicacionOferta);\n }catch(Exception e){\n Logger.getLogger(AplicacionOfertaServicio.class.getName()).log(Level.SEVERE, null, e);\n }\n }",
"private static void deleteBb() {\n // get the name of the billboard to delete from the Jlist\n String name = (String) list.getSelectedValue();\n // ensure that there is a name selected\n if (name == null || name.equals(\"\")) {\n lbl_message.setText(\"No billboard selected\");\n Log.Confirmation(\"No billboard selected\");\n return;\n }\n // set the action request to the server\n user.setAction(\"Delete Billboard\");\n // Attempt connection to server\n if (AttemptConnect()) {\n try {\n // Send user object to server\n objectStreamer.Send(user);\n // send the name of the billboard to be deleted from the database\n dos.writeUTF(name);\n // check if deleted successfully\n if (dis.readBoolean()) {\n // remove the billboard from the list\n listUserBillboards.userBillboards.remove(name);\n listBillboards.billboards.remove(name);\n if (usersListModel != null) {\n usersListModel.removeElement(name);\n }\n if (billboardListModel != null) {\n billboardListModel.removeElement(name);\n }\n if (allListModel != null) {\n allListModel.removeElement(name);\n } else if (listModel != null) {\n listModel.removeElement(name);\n }\n // display confirmation message to the user and post log confirmation\n lbl_message.setText(\"Billboard deleted\");\n Log.Confirmation(\"Billboard successfully deleted\");\n getSchedulesList();\n scheduleListModel.clear();\n scheduleListModel.addAll(listSchedules.schedules);\n }\n // If billboard not deleted then display message to the user\n else {\n lbl_message.setText(\"Billboard not deleted\");\n Log.Error(\"Error when attempting to delete billboard\");\n }\n }\n // catch any unanticipated exceptions and print to console\n catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n Log.Error(\"Failed to delete billboard\");\n }\n // Disconnect from server\n AttemptDisconnect();\n }\n // Post message to user if unable to connect to server\n else {\n Log.Error(\"Unable to connect to server\");\n }\n resetFields();\n fieldsEnabled(false);\n }",
"protected void removerContato(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tString id = request.getParameter(\"id\");\n\t\t// System.out.println(id);//teste de recebimento do ID\n\n\t\t// evio do ID - Send ID\n\t\tcontato.setId(id);\n\t\t// executando a exclusão - execute\n\t\tdao.deletarContato(contato);\n\t\t// redirecionar para agenda.jsp - redirect to agenda.jsp\n\t\tresponse.sendRedirect(\"main\");\n\n\t}",
"@Test\n public void testRemoveRequest() throws Exception {\n System.out.println(\"removeRequest\");\n Sendable s = sendAMessage();\n\n String a = s.getMessageId();\n String comment = \"\";\n instance.removeRequest(a, comment);\n }",
"public void excluirConta(Integer idFaturamentoGrupo , Integer anoMesReferencia) throws ErroRepositorioException ;",
"public void eliminar() {\n try {\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n apelacionesDao.IME_APELACIONES(3, this.Selected);\n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.Selected.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"2\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue eliminada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n addMessage(\"Eliminado Exitosamente\", 1);\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al eliminar el registro, contacte al administrador del sistema\", 2);\n }\n }",
"public void delete(Long viajerosId) {\n LOGGER.log(Level.INFO, \"Borrando viajero con id = {0}\", viajerosId);\n ViajeroEntity viajero = em.find(ViajeroEntity.class, viajerosId);\n em.remove(viajero);\n }",
"public void eliminar(Provincia provincia) throws BusinessErrorHelper;",
"@Override\n\tpublic void excluir(Cliente o) {\n\t\t\n\t}",
"public void eliminaBD() {\r\n CBD.openConexion();\r\n //------Reune los datos de producto con id--------------//\r\n String A = CBD.getInveID(II.lblid.getText());\r\n String B[] = A.split(\",\");\r\n //------Reune los datos de producto con id--------------//\r\n //------Verifica si la cantidad es 0--------------//\r\n if (Integer.parseInt(B[5]) == 0) {\r\n //------Elimina--------------//\r\n if(CBD.deleteDBProd(\"[ID PRODUCTO]\", B[7])){\r\n JOptionPane.showMessageDialog(II, \"Producto eliminado\");\r\n }else{\r\n JOptionPane.showMessageDialog(II, \"Error producto no pudo ser eliminado\");\r\n }\r\n //------Elimina--------------//\r\n } else {\r\n JOptionPane.showMessageDialog(II, \"No puedes eliminar un producto si su existencia es mayor a 0\");\r\n }\r\n CBD.closeConexion();\r\n }",
"public void eliminar() {\n try {\n userFound = clientefacadelocal.find(this.idcliente);\n if (userFound != null) {\n clientefacadelocal.remove(userFound);\n FacesContext fc = FacesContext.getCurrentInstance();\n fc.getExternalContext().redirect(\"../index.xhtml\");\n System.out.println(\"Usuario Eliminado\");\n } else {\n System.out.println(\"Usuario No Encontrado\");\n }\n } catch (Exception e) {\n System.out.println(\"Error al eliminar el cliente \" + e);\n }\n }",
"public void eliminar(){\n conexion = base.GetConnection();\n try{\n PreparedStatement borrar = conexion.prepareStatement(\"DELETE from usuarios where Cedula='\"+this.Cedula+\"'\" );\n \n borrar.executeUpdate();\n // JOptionPane.showMessageDialog(null,\"borrado\");\n }catch(SQLException ex){\n System.err.println(\"Ocurrió un error al borrar: \"+ex.getMessage());\n \n }\n }",
"public void deleteBeneficioDeuda(Map parametros);",
"void eliminarPedidosUsuario(String idUsuario);",
"public void elimina(Long id) {\n\n final EntityManager em = getEntityManager();\n\n try {\n\n final EntityTransaction tx = em.getTransaction();\n\n tx.begin();\n\n // Busca un conocido usando su llave primaria.\n\n final Conocido modelo = em.find(Conocido.class, id);\n\n if (modelo != null) {\n\n /* Si la referencia no es nula, significa que el modelo se encontró la\n\n * referencia no es nula y se elimina. */\n\n em.remove(modelo);\n\n }\n\n tx.commit();\n\n } finally {\n\n em.close();\n\n }\n\n }",
"public void removerDebitoCobrado(Conta conta)\n\t\t\tthrows ErroRepositorioException;",
"public void eliminarGrupoLocal(GrupoLocalRequest grupoLocalRequest);",
"private void remove() {\n disableButtons();\n clientgui.getClient().sendDeleteEntity(cen);\n cen = Entity.NONE;\n }",
"public void eliminarUsuario(String id) throws BLException;",
"@Override\r\n\tpublic void excluir(Telefone vo) throws Exception {\n\t\t\r\n\t}",
"protected void cmdRemove() throws Exception{\n\t\t//Determinamos los elementos a eliminar. De cada uno sacamos el id y el timestamp\n\t\tVector entities = new Vector();\n\t\tStringTokenizer claves = new StringTokenizer(conectorParametro(\"idSelection\"), \"|\");\n\t\tStringTokenizer timestamps = new StringTokenizer(conectorParametro(\"timestamp\"), \"|\");\n\t\ttraza(\"MMG::Se van a borrar \" + claves.countTokens() + \" y son \" + conectorParametro(\"idSelection\"));\n\t\twhile(claves.hasMoreTokens() && timestamps.hasMoreTokens()){\n\t\t\tZonSecciData zonSecci = new ZonSecciData();\n\t\t\tzonSecci.setId(new Integer(claves.nextToken()));\n\t\t\t//zonSecci.jdoSetTimeStamp(Long.parseLong(timestamps.nextToken()));\n\t\t\tentities.addElement(zonSecci);\n\t\t}\n\t\t\n\t\t//Construimos el DTO para realizar la llamada\n\t\tVector datos = new Vector();\n\t\tMareDTO dto = new MareDTO();\n\t\tdto.addProperty(\"entities\", entities);\n\t\tdatos.add(dto);\n\t\tdatos.add(new MareBusinessID(BUSINESSID_REMOVE));\n\t\t\n\t\t\n\t\t\n\t\t//Invocamos la lógica de negocio\n\t\ttraza(\"MMG:: Iniciada ejecución Remove de entidad ZonSecci\");\n\t\tDruidaConector conectorCreate = conectar(CONECTOR_REMOVE, datos);\n\t\ttraza(\"MMG:: Finalizada ejecución Remove de entidad ZonSecci\");\n\t\t\n\t\t\n\n\t\t//metemos en la sesión las query para realizar la requery\n\t\tconectorParametroSesion(SESSION_ATTRIBUTE_LAST_QUERY, conectorParametro(VAR_LAST_QUERY_TO_SESSION));\n\t\t\n\t\t//Redirigimos a la LP de StartUp con la acción de StartUp y requery\n\t\tconectorAction(\"ZonSecciLPStartUp\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ORIGEN, \"menu\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ACCION, ACCION_REMOVE);\n\t\tconectorActionParametro(VAR_PERFORM_REQUERY, \"true\");\n\t}",
"@Transactional\n\tpublic void excluir(Fabricante fabricanteSelecionado) throws NegocioException{\n\t\tFabricante fabricanteTemp= em.find(Fabricante.class, fabricanteSelecionado.getCodigo());\n\t\t\n\t\tem.remove(fabricanteTemp);\n\t\tem.flush();\n\t}",
"private void remover() {\n int confirma = JOptionPane.showConfirmDialog(null, \"Tem certeza que deseja remover este cliente\", \"Atenção\", JOptionPane.YES_NO_OPTION);\n if (confirma == JOptionPane.YES_OPTION) {\n String sql = \"delete from empresa where id=?\";\n try {\n pst = conexao.prepareStatement(sql);\n pst.setString(1, txtEmpId.getText());\n int apagado = pst.executeUpdate();\n if (apagado > 0) {\n JOptionPane.showMessageDialog(null, \"Empresa removida com sucesso!\");\n txtEmpId.setText(null);\n txtEmpNome.setText(null);\n txtEmpTel.setText(null);\n txtEmpEmail.setText(null);\n txtEmpCNPJ.setText(null);\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }\n }",
"protected abstract void removeRequest ();",
"private void removeRequest(InstanceRequest request) {\r\n\t\t\r\n\t}",
"@Override\n\tpublic MensajeBean elimina(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.elimina(nuevo);\n\t}",
"public void remover(Usuario u) {\n listaUse.remove(u);\n\n }",
"private void eliminaAccount(HttpServletRequest request, HttpServletResponse response) {\r\n HttpSession session = request.getSession();\r\n Medico medico = (Medico) session.getAttribute(\"utente\");\r\n if (medico != null) {\r\n\r\n if (PazienteModel.getPazientiSeguiti(medico.getCodiceFiscale()).size() != 0) {\r\n // non è possibile effettuare l'eliminazione, notificare al medico che non può\r\n // proseguire con l'opeazione fino a che\r\n // segue dei pazienti.\r\n } else {\r\n MedicoModel.removeMedico(medico.getCodiceFiscale());\r\n request.setAttribute(\"notifica\", \"Account eliminato con successo\");\r\n session.removeAttribute(\"utente\");\r\n session.setAttribute(\"accessDone\", false);\r\n }\r\n\r\n }\r\n\r\n }",
"void removeConfirmedTransaction(int transId, String userId);",
"public void deleteUserRequest(UserRequest request){\n userRequests.remove(request);\n }",
"public void removeGuest(Invitato in){\n AssegnamentiTavolo.remove(in);\n num_posti++;\n openAssignment();\n }",
"public void eliminarUsuario(Long idUsuario);",
"public void deletar(int codigo) throws SQLException{\r\n conecta = FabricaConexao.conexaoBanco();\r\n sql = \"delete from conserto where concodigo =? \";\r\n pstm = conecta.prepareStatement(sql);\r\n pstm.setInt(1, codigo);\r\n pstm.execute();\r\n FabricaConexao.fecharConexao();\r\n \r\n }",
"public void remove(Aluno a) {\n\t\ttry {\n\t\t\tConnection con = DBUtil.getInstance().getConnection();\n\t\t\tPreparedStatement stmt = con.prepareStatement(\"DELETE FROM Aluno WHERE idAluno = ? \");\n\t\t\tstmt.setInt(1, a.getNumero());\n\t\t\tstmt.executeUpdate();\n\t\t\tJOptionPane.showMessageDialog(null,\"Removido com sucesso!\");\n\t\t} \n\t\tcatch(com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Numero ja existe\", \"ERRO\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t\t catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Erro no Sql, verifique a senha, ou o banco\", \"ERRO\", JOptionPane.ERROR_MESSAGE);\n\n\t\t\t}\n\n\t\t}",
"public void removeBydescricao(String descricao);",
"@Override\r\n\tpublic void remove(int codigoLivro) throws BaseDadosException {\n\t\t\r\n\t}",
"int deleteByExample(SmsCleanBagLineExample example);",
"public void borrarTodo(){\n diccionario.clear();\n }",
"public void removerCarro() {\n\n if (carrosCadastrados.size() > 0) {//verifica se existem carros cadastrados\n listarCarros();\n System.out.println(\"Digite o id do carro que deseja excluir\");\n int idCarro = verifica();\n for (int i = 0; i < carrosCadastrados.size(); i++) {\n if (carrosCadastrados.get(i).getId() == idCarro) {\n if (carrosCadastrados.get(i).getEstado()) {//para verificar se o querto está sendo ocupado\n System.err.println(\"O carrp está sendo utilizado por um hospede nesse momento\");\n } else {\n carrosCadastrados.remove(i);\n System.err.println(\"cadastro removido\");\n }\n }\n\n }\n } else {\n System.err.println(\"Não existem carros cadastrados\");\n }\n }",
"public String eliminarEstudiante(HttpServletRequest request,String codEstudiante){\n String salida=\"\";\n if(request==null){\n return \"\";\n }\n if(connection!=null && codEstudiante!=null && codEstudiante.length()>0){\n try {\n StringBuilder query=new StringBuilder();\n query.append(\"delete from estudiante \");\n query.append(\" where idestudiante=? \");\n deleteEstudiante=connection.prepareStatement(query.toString());\n //pasando el parametro\n deleteEstudiante.setInt(1, Integer.parseInt(codEstudiante));\n //ejecutando la consulta\n int nroRegistros=deleteEstudiante.executeUpdate();\n if(nroRegistros==1){\n salida=\"Registro Eliminado de forma correcta\";\n }\n else{\n salida=\"Existo un error al tratar de eliminar el registro\";\n }\n } catch (SQLException e) {\n salida=\"Existo un error SQL\";\n System.out.println(\"Error en el proceso \");\n e.printStackTrace();\n }\n }\n return salida;\n }",
"@Override\n\tpublic int eliminarCliente(int id) throws Exception {\n\t\treturn 0;\n\t}",
"public static void remove(int id_cancion, int id_lista){\n try{\n\t \t manager = Connection.connectToMysql();\n\t \t manager.getTransaction().begin();\n\t \t \n\t \t Lista l = manager.find(Lista.class, id_lista);\n\t \t Cancion c = manager.find(Cancion.class, id_cancion);\n\t\n\t \t List<Cancion> lista_canciones = l.getCanciones();\n\t \t lista_canciones.remove(c);\n\t \t l.setCanciones(lista_canciones);\n\t \n\t \t manager.getTransaction().commit();\n }catch (Exception ex) {\n System.out.println(ex);\n }\n }",
"private void btnRemoverActionPerformed(java.awt.event.ActionEvent evt) {\n\n if (tblSecoes.getSelectedRow() >= 0){\n\n if (JOptionPane.showConfirmDialog(RootPane, \"Deseja Remover esta Seção?\") == 0){\n Secao secaoselect = (Secao) tblSecoes.getValueAt(tblSecoes.getSelectedRow(), 0);\n\n if (secoes.contains(secaoselect)){\n secoes.remove(secaoselect);\n secoesapagar.add(secaoselect);\n }\n\n JOptionPane.showMessageDialog(RootPane, \"Seção Removida com Sucesso!\");\n adicionasecaotable();\n }\n } else {\n JOptionPane.showMessageDialog(RootPane, \"Selecione uma Seção Por Favor!\");\n }\n }",
"public void deleteParticipacao(Integer id) {\n participacaoRepository.deleteById(id);\n //listClient();\n \n}",
"@Override\n\tpublic void eliminar() {\n\t\tLOG.info(\"Se elimino el usuario de la bd\");\n\t}",
"public void eliminarcola(){\n Cola_banco actual=new Cola_banco();// se crea un metodo actual para indicar los datos ingresado\r\n actual=primero;//se indica que nuestro dato ingresado va a ser actual\r\n if(primero != null){// se usa una condiccion si nuestro es ingresado es diferente de null\r\n while(actual != null){//se usa el while que recorra la cola indicando que actual es diferente de null\r\n System.out.println(\"\"+actual.nombre);// se imprime un mensaje con los datos ingresado con los datos ingresado desde el teclado\r\n actual=actual.siguiente;// se indica que el dato actual pase a ser igual con el apuntador siguente\r\n }\r\n }else{// se usa la condicion sino se cumple la condicion\r\n System.out.println(\"\\n la cola se encuentra vacia\");// se indica al usuario que la cola esta vacia\r\n }\r\n }",
"public void removerEncomendaInsumo(int insumoId){\t\t\n\t\tEncomenda_insumoController encomenda_insumoController = new Encomenda_insumoController();\n\t\tSystem.out.println(insumoId);\n\t\tencomenda_insumoController.setup();\n\t\tString resposta = encomenda_insumoController.delete(insumoId);\n\t\t\n\t\tencomendaController = new EncomendaController();\n\t\tencomendaController.setup();\t\t\t\n\t\t\n\t\tif(!resposta.equals(\"ok\")) {\n\t\t\texibirMsgErro(resposta);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tgetAllEncomendas();\n\t}",
"public int eliminar(Connection conn, alertas objeto) {\r\n\t\ttry {\r\n\r\n\t\t\tPreparedStatement statement = conn\r\n\t\t\t\t\t.prepareStatement(\"delete from alertas where ID_ALERTA = ?\");\r\n\t\t\tstatement.setInt(1, objeto.getAlerta());\r\n\t\t\tstatement.execute();\r\n\t\t\tstatement.close();\r\n\t\t\tJOptionPane.showMessageDialog(null,\r\n\t\t\t\t\t\"Se ha Eliminado un Registro! \", \"Aviso!\",\r\n\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\treturn 1;\r\n\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t\tJOptionPane.showMessageDialog(null, \"No se Eliminó Registro :\"\r\n\t\t\t\t\t+ e.getMessage(), \"Alerta!\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t}",
"private void eliminar() {\n\n int row = vista.tblClientes.getSelectedRow();\n cvo.setId_cliente(Integer.parseInt(vista.tblClientes.getValueAt(row, 0).toString()));\n int men = JOptionPane.showConfirmDialog(null, \"Estas seguro que deceas eliminar el registro?\", \"pregunta\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n\n if (men == JOptionPane.YES_OPTION) {\n try {\n cdao.eliminar(cvo);\n cvo.setId_cliente(row);\n } catch (Exception e) {\n System.out.println(\"Mensaje eliminar\" + e.getMessage());\n }\n }\n }",
"@DeleteMapping(\"/bebidas/{id}\")\n @Timed\n public ResponseEntity<Void> deleteBebida(@PathVariable Long id) {\n log.debug(\"REST request to delete Bebida : {}\", id);\n bebidaRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"public static void removeMesas() {\n\t\tScanner sc = new Scanner(System.in);\t\n\t\tString idE, local;\n\t\tint check = 0;\n\t\t\n\t\tSystem.out.println(\"\\nInsira o id da eleicao da qual pretende remover uma mesa de voto:\");\n\t\tidE = sc.nextLine();\n\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nInsira o departamento em que se encontra a mesa de voto:\");\n\t\t\tlocal = sc.nextLine();\n\t\t\tif(verificarLetras(local) && local.length()>0) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nO nome do departamento so pode conter letras\");\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\t\t\n\t\tString msgServer = \"\";\n\t\t\n\t\tcheck = 0;\n\t\tint tries = 0;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tmsgServer = rmiserver.removeMesaVoto(idE, local);\n\t\t\t\tSystem.out.println(msgServer);\n\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\tcheck = 1;\n\t\t\t} catch (RemoteException e1) {\n\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\tif(tries == 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\t}",
"@Override\n\tpublic void remove(Integer bno) throws Exception {\n\t\tdao.delete(bno);\n\t}",
"BrainTreeCustomerResult removeCustomer(BrainTreeCustomerRequest request);",
"@DeleteMapping(value = \"/relacions/delete/solicitudrecibida\", params = {\"amigoId\", \"usuarioId\"})\n @Timed\n public ResponseEntity<Void> deleteSolicitudRecibida(@RequestParam(\"amigoId\") Long amigoId, @RequestParam(\"usuarioId\") Long usuarioId) {\n relacionRepository.deleteByUsuario_IdAndAmigoId(amigoId, usuarioId);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, \"deleteSolicitudRecibida\")).build();\n }",
"@Override\n public void onClickButtonCancel(Object roomToCancel) {\n // durante il caricamento della stanza il giocatore annulla il tentativo di creazione stanza\n String room =(String) roomToCancel;\n\n DatabaseReference roomToDelete = firebaseDatabase.getReference(ROOMS_NODE).child(room);\n\n roomToDelete.removeValue( new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(@Nullable DatabaseError error, @NonNull DatabaseReference ref) {\n loadingDialog.dismissDialog();\n dialogCodeRoom.dismiss();\n }\n });\n\n }",
"void btnRemoveDelivery(Delivery delivery);",
"public void removeEmpleado(){\n //preguntar al empleado si realmente eliminar o no al objeto empleado\n this.mFrmMantenerEmpleado.messageBox(Constant.APP_NAME, \"<html>\"\n + \"¿Deseas remover el empleado del sistema?<br> \"\n + \"<b>OJO: EL EMPLEADO SERÁ ELIMINADO PERMANENTEMENTE.</b> \"\n + \"</html>\",\n new Callback<Boolean>(){\n @Override\n public void execute(Boolean[] answer) {\n //si la respuesta fue YES=true, remover al empleado y limpiar el formulario\n if(answer[0]){\n mEmpleado.remove();\n clear();\n }\n //si la respuesta es NO=false, no hacer nada\n }\n }\n );\n \n }",
"public void borrarcliente(ClienteHabitual cliente)throws SQLException{\n Connection conexion = null;\n \n try{\n conexion = GestionSQL.openConnection();\n if(conexion.getAutoCommit()){\n conexion.setAutoCommit(false);\n }\n ClientesHabitualesDatos clientesdatos = new ClientesHabitualesDatos();\n clientesdatos.delete(cliente);\n conexion.commit();\n System.out.println(\"Cliente borrado con exito\");\n }catch(SQLException e){\n e.printStackTrace();\n System.out.println(\"Error en borrado\");\n try{\n conexion.rollback();\n }catch(SQLException ex){\n System.out.println(\"Error en rollback\");\n }\n }finally{\n if(conexion != null){\n conexion.close();\n }\n }\n }",
"public JSONObject deleteBigBudget(JSONObject message, Session session, Connection conn) {\n\t\ttry {\n\t\t\tStatement st = conn.createStatement();\n\t\t\tint id = message.getInt(\"bigBudgetID\");\n\t\t\t\n\t\t\tResultSet rs = st.executeQuery(\"SELECT * FROM Budgets WHERE bigBudgetID=\" + id + \";\");\n\t\t\tStatement st1 = conn.createStatement();\n\t\t\twhile (rs.next()) {\n\t\t\t\tst1.execute(\"DELETE FROM Transactions WHERE budgetID=\" + rs.getInt(\"budgetID\") + \";\");\n\t\t\t}\n\t\t\t\n\t\t\tString deleteBudgetcmd = \"DELETE FROM Budgets WHERE bigBudgetID=\" + id + \";\"; \n\t\t\tst1.execute(deleteBudgetcmd);\n\t\t\t\n\t\t\tString deleteBigBudget = \"DELETE FROM BigBudgets WHERE bigBudgetID=\" + id + \";\";\n\t\t\tst1.execute(deleteBigBudget);\n\t\t\t\n\t\t\tresponse.put(\"message\", \"removebigbudgetsuccess\");\n\t\t\tresponse.put(\"removebigbudgetsuccess\", \"You removed a budget and its categories.\");\n\t\t\treturn response;\n\t\t\t\n\t\t} catch (SQLException sqle) {\n\t\t\ttry {\n\t\t\t\tsqle.printStackTrace();\n\t\t\t\tresponse.put(\"message\", \"removebigbudgetfailure\");\n\t\t\t\tresponse.put(\"removebigbudgetfailure\", \"SQLException in backend. ID not removed.\");\n\t\t\t\treturn response;\n\t\t\t} catch (JSONException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn response;\n\t\t} catch (JSONException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn response;\n\t}",
"boolean removeBankAccount(String IBAN, Klant klant) throws SessionExpiredException, IllegalArgumentException, RemoteException;",
"public void eliminar(){\n inicio = null;\r\n // Reinicia el contador de tamaño de la lista a 0.\r\n tamanio = 0;\r\n }",
"public void removerPorReferencia(String referencia){\n if (buscar(referencia)) {\r\n // Consulta si el nodo a eliminar es el pirmero\r\n if (inicio.getValor() == referencia) {\r\n // El primer nodo apunta al siguiente.\r\n inicio = inicio.getSiguiente();\r\n } else{\r\n // Crea ua copia de la lista.\r\n Nodo aux = inicio;\r\n // Recorre la lista hasta llegar al nodo anterior \r\n // al de referencia.\r\n while(aux.getSiguiente().getValor() != referencia){\r\n aux = aux.getSiguiente();\r\n }\r\n // Guarda el nodo siguiente del nodo a eliminar.\r\n Nodo siguiente = aux.getSiguiente().getSiguiente();\r\n // Enlaza el nodo anterior al de eliminar con el \r\n // sguiente despues de el.\r\n aux.setSiguiente(siguiente); \r\n }\r\n // Disminuye el contador de tamaño de la lista.\r\n tamanio--;\r\n }\r\n }",
"public void removerPorReferencia(int referencia){\n if (buscar(referencia)) {\n // Consulta si el nodo a eliminar es el pirmero\n if (inicio.getEmpleado().getId() == referencia) {\n // El primer nodo apunta al siguiente.\n inicio = inicio.getSiguiente();\n // Apuntamos con el ultimo nodo de la lista al inicio.\n ultimo.setSiguiente(inicio);\n } else{\n // Crea ua copia de la lista.\n NodoEmpleado aux = inicio;\n // Recorre la lista hasta llegar al nodo anterior\n // al de referencia.\n while(aux.getSiguiente().getEmpleado().getId() != referencia){\n aux = aux.getSiguiente();\n }\n if (aux.getSiguiente() == ultimo) {\n aux.setSiguiente(inicio);\n ultimo = aux;\n } else {\n // Guarda el nodo siguiente del nodo a eliminar.\n NodoEmpleado siguiente = aux.getSiguiente();\n // Enlaza el nodo anterior al de eliminar con el\n // sguiente despues de el.\n aux.setSiguiente(siguiente.getSiguiente());\n // Actualizamos el puntero del ultimo nodo\n }\n }\n // Disminuye el contador de tama�o de la lista.\n size--;\n }\n }",
"@RequestMapping(path = \"/remove\", method = RequestMethod.POST)\n\tpublic ResponseEntity<RestResponse<CompanyDTO>> remove(@RequestBody CompanyDTO request) {\n\n\t\tCompanyDTO result = companyService.remove(request);\n\t\t\n\t\tRestResponse<CompanyDTO> restResponse = \n\t\t\t\tnew RestResponse<CompanyDTO>(RestResponseCodes.OK.getCode(), RestResponseCodes.OK.getDescription(), result);\n\t\t\n\t\treturn new ResponseEntity<RestResponse<CompanyDTO>>(restResponse, HttpStatus.OK);\n\t\t\t\n\t}",
"public void eliminarManoObra(ActionEvent actionEvent) {\r\n manoobraDao manobraDao = new manoobraDaoImpl();\r\n String msg;\r\n if (manobraDao.eliminarManoObra(this.manoobra.getCodigoManob())) {\r\n msg = \"Mano de Obra eliminada correctamente\";\r\n FacesMessage message1 = new FacesMessage(FacesMessage.SEVERITY_INFO, msg, null);\r\n FacesContext.getCurrentInstance().addMessage(null, message1);\r\n } else {\r\n msg = \"No se elimino la Mano de Obra\";\r\n FacesMessage message2 = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, null);\r\n FacesContext.getCurrentInstance().addMessage(null, message2);\r\n }\r\n \r\n }",
"public void borrarSesionesAnteriores()\r\n\t{\r\n\t\tint numerosesiones = 0;//numero de convocatorias en la BD\r\n\t\tList sesiones = null;\r\n\t\ttry\r\n {\r\n Conector conector = new Conector();\r\n conector.iniciarConexionBaseDatos();\r\n sesiones= SesionBD.listar(conector);\r\n conector.terminarConexionBaseDatos();\r\n }\r\n catch (Exception e)\r\n\t\t{\r\n \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n if(sesiones != null)\r\n {\r\n \tnumerosesiones = sesiones.size();\r\n }\r\n for (int i = 0; i < numerosesiones; i++)\r\n\t\t{\r\n \tSesion sesionaux = (Sesion)sesiones.get(i);\r\n\t\t\tint idsesion = sesionaux.getIdsesion();\r\n\t\t\tString fechasesion = sesionaux.getFechasesion();\r\n\t\t\tboolean esanterior = fechaSesionAnterior(fechasesion);\r\n\t\t\tif(esanterior == true)\r\n\t\t\t{\r\n\t\t\t\ttry \r\n\t \t\t{\r\n\t \t\t\tConector conector = new Conector();\r\n\t \t\t\tconector.iniciarConexionBaseDatos();\r\n\t \t\t\tSesionBD.eliminar(idsesion, conector);\r\n\t \t\t\tconector.terminarConexionBaseDatos();\r\n\t \t\t}\r\n\t \t\tcatch (Exception e)\r\n\t \t\t{\r\n\t \t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t \t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void removeBomb();",
"void eliminar(Long id);",
"public void removePendingRequest(final String id);",
"public void removeProdotto(String codice, int quantita, Request request) throws Exception {\n\t\tgetSession().getCarrello().removeByCodice(codice, quantita);\n\t\treturn;\n\t}",
"public String vistaEliminar(String codaloja, String codactiv) {Alojamiento alojbusc = alojamientoService.find(codaloja);\n// Actividad actbusc = actividadService.find(codactiv);\n// Alojamiento_actividad aloact = new Alojamiento_actividad();\n// Alojamiento_actividad_PK aloact_pk = new Alojamiento_actividad_PK();\n// aloact_pk.setActividad(actbusc);\n// aloact_pk.setAlojamiento(alojbusc);\n// aloact.setId(aloact_pk);\n// \n// actividadAlojamientoService.remove(aloact);\n// \n// \n// \n return \"eliminarAsignacion\";\n }"
] |
[
"0.66938037",
"0.63228065",
"0.62048864",
"0.6196028",
"0.6088392",
"0.60822463",
"0.6024216",
"0.59948164",
"0.59919107",
"0.59873056",
"0.5968846",
"0.5938657",
"0.59291035",
"0.5926651",
"0.58964777",
"0.5887032",
"0.5878132",
"0.5849617",
"0.5834961",
"0.58241636",
"0.5820651",
"0.5816944",
"0.5797322",
"0.5791256",
"0.5786072",
"0.57763815",
"0.57694525",
"0.57633513",
"0.574646",
"0.5739743",
"0.5726944",
"0.572099",
"0.57147294",
"0.57105345",
"0.5710062",
"0.57078606",
"0.5694759",
"0.5679479",
"0.5674912",
"0.5655368",
"0.56526667",
"0.5652069",
"0.5642894",
"0.5639659",
"0.5636551",
"0.5633677",
"0.563206",
"0.5628555",
"0.5625136",
"0.55941933",
"0.559244",
"0.559175",
"0.55899364",
"0.55887353",
"0.558631",
"0.55665785",
"0.556291",
"0.5562161",
"0.55467194",
"0.553751",
"0.55369633",
"0.5524797",
"0.5524761",
"0.5522607",
"0.5512802",
"0.5505112",
"0.5502271",
"0.5490372",
"0.5487429",
"0.54872245",
"0.5486941",
"0.5481684",
"0.5479287",
"0.5474413",
"0.5473592",
"0.5467095",
"0.5463488",
"0.5462282",
"0.54566556",
"0.544792",
"0.54464",
"0.5443105",
"0.5442274",
"0.5441809",
"0.54414654",
"0.54408485",
"0.5435036",
"0.5434563",
"0.54274154",
"0.54160416",
"0.5415819",
"0.5415211",
"0.54104424",
"0.54096764",
"0.54028326",
"0.54018074",
"0.53969127",
"0.5392069",
"0.53903365",
"0.53873634"
] |
0.62209207
|
2
|
loads tiles from a folder
|
public static ArrayList<BufferedImage> loadTileImages(String folder, int tileWidth, int tileHeight){
ArrayList<String> fileNames = new ArrayList<String>();
File newFolder = new File(folder);
String child [] = newFolder.list();
if (child == null){
System.out.println("Folder does not exist!");
System.exit(1);
} else {
for(int l=0; l<child.length; l++){
fileNames.add(child[l]);
}
}
ArrayList<BufferedImage> tileImages = new ArrayList<BufferedImage>();
for(int x=0; x<fileNames.size(); x++) {
BufferedImage tileScale;
tileScale = readImage(folder + "/" +fileNames.get(x));
tileScale = ScaleImage.scaleImage(tileScale, tileWidth, tileHeight);
tileImages.add(tileScale);
}
return tileImages;
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void loadTileImages() {\n // keep looking for tile A,B,C, etc. this makes it\n // easy to drop new tiles in the images/ directory\n tiles = new ArrayList();\n char ch = 'A';\n while (true) {\n String name = \"tile_\" + ch + \".png\";\n File file = new File(\"images/\" + name);\n if (!file.exists()) {\n break;\n }\n tiles.add(loadImage(name));\n ch++;\n }\n }",
"public void loadMapTiles(String[] paths) throws FileNotFoundException {\n\t\tthis.paths=paths;\n\t\tfor (int i = 0; i < tileMap.length; i++) {\n\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\n\t\t\t\tif (tileMap[i][j] < 0) {\n\t\t\t\t\ttiles[i][j] = null;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tTile tile = new Tile();\n\t\t\t\ttile.getPosition().setX(j*tileDimensions.getX());\n\t\t\t\ttile.getPosition().setY(i*tileDimensions.getY());\n\t\t\t\ttile.getDimensions().setX(tileDimensions.getX());\n\t\t\t\ttile.getDimensions().setY(tileDimensions.getY());\n\t\t\t\tFileInputStream fin = new FileInputStream(paths[tileMap[i][j]]);\n\t\t\t\tImage img = new Image(fin, tileDimensions.getX(), tileDimensions.getY(), false, false);\n\t\t\t\tSprite sprite = new Sprite(img);\n\t\t\t\ttile.setSprite(sprite);\n\t\t\t\ttiles[i][j] = tile;\n\t\t\t}\n\t\t}\n\t}",
"public static void loadTiles() {\n\t\tTILE_SETS.put(\"grass\", TileSet.loadTileSet(\"plains\"));\n\t}",
"TiledMap loadMap(String path);",
"private void loadTiles(Board board) {\n TileSetCache tileSetCache = new TileSetCache();\n board.initializeTileSetCache(tileSetCache);\n board.createLayers();\n\n for (BoardLayer layer : board.getLayers()) {\n BoardLayerView layerView = new BoardLayerView(layer);\n this.addLayerView(layerView);\n }\n }",
"private void loadTiles(String filename) {\n\t\ttry {\n\t\t\tScanner s;\n\n\t\t\tif (StealthGame.EXPORT)\n\t\t\t\ts = new Scanner(ResourceLoader.load(filename));\n\t\t\telse\n\t\t\t\ts = new Scanner(new File(filename));\n\n\t\t\tif (s.hasNextLine()) {\n\t\t\t\tname = s.nextLine();\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Room has no name\");\n\t\t\t}\n\t\t\txSize = s.nextInt();\n\t\t\tySize = s.nextInt();\n\t\t\ttiles = new Tile[xSize][ySize];\n\t\t\tint xPos = 0;\n\t\t\tint yPos = 0;\n\t\t\tint tileNum = 0;\n\n\t\t\t// List of doors to be given destinations\n\n\t\t\twhile (s.hasNext()) {\n\n\t\t\t\tif (s.hasNextInt()) {\n\t\t\t\t\tparseInt(s, xPos, yPos, tileNum);\n\n\t\t\t\t\txPos++;\n\t\t\t\t\ttileNum++;\n\n\t\t\t\t\tif (xPos >= xSize) {\n\t\t\t\t\t\txPos = 0;\n\t\t\t\t\t\tyPos++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Not a basic floor, door or wall\n\t\t\t\telse {\n\t\t\t\t\tString str = s.next();\n\t\t\t\t\tif (str.length() == 1) {\n\t\t\t\t\t\tparseChar(xPos, yPos, tileNum, str);\n\n\t\t\t\t\t\txPos++;\n\t\t\t\t\t\ttileNum++;\n\n\t\t\t\t\t\tif (xPos >= xSize) {\n\t\t\t\t\t\t\txPos = 0;\n\t\t\t\t\t\t\tyPos++;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (str.equals(\"door\")) {\n\t\t\t\t\t\t\tparseDoorDestination(s);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ts.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Room - Error loading file - IOException : \"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t}",
"private void loadWorld(String path) {\r\n StringBuilder builder = new StringBuilder();\r\n \r\n try {\r\n BufferedReader br = new BufferedReader(new FileReader(path));\r\n String line;\r\n while ((line = br.readLine()) != null) {\r\n builder.append(line + \"\\n\");\r\n }\r\n br.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n \r\n String file = builder.toString();\r\n String[] tokens = file.split(\"\\\\s+\");\r\n width = Integer.parseInt(tokens[0]);\r\n height = Integer.parseInt(tokens[1]);\r\n spawnX = Integer.parseInt(tokens[2]);\r\n spawnY = Integer.parseInt(tokens[3]);\r\n winX = Integer.parseInt(tokens[4]);\r\n winY = Integer.parseInt(tokens[5]);\r\n \r\n tiles = new int[width][height];\r\n for (int y = 0;y < height;y++) {\r\n for (int x = 0;x < width;x++) {\r\n tiles[x][y] = Integer.parseInt(tokens[(x + y * width) + 6]);\r\n }\r\n }\r\n \r\n assert (tiles != null);\r\n }",
"public void initTiles() throws IOException \n\t{\n\t\n\t}",
"private static void loadImagesInDirectory(String dir){\n\t\tFile file = new File(Files.localize(\"images\\\\\"+dir));\n\t\tassert file.isDirectory();\n\t\n\t\tFile[] files = file.listFiles();\n\t\tfor(File f : files){\n\t\t\tif(isImageFile(f)){\n\t\t\t\tString name = dir+\"\\\\\"+f.getName();\n\t\t\t\tint i = name.lastIndexOf('.');\n\t\t\t\tassert i != -1;\n\t\t\t\tname = name.substring(0, i).replaceAll(\"\\\\\\\\\", \"/\");\n\t\t\t\t//Image image = load(f,true);\n\t\t\t\tImageIcon image;\n\t\t\t\tFile f2 = new File(f.getAbsolutePath()+\".anim\");\n\t\t\t\tif(f2.exists()){\n\t\t\t\t\timage = evaluateAnimFile(dir,f2,load(f,true));\n\t\t\t\t}else{\n\t\t\t\t\timage = new ImageIcon(f.getAbsolutePath());\n\t\t\t\t}\n\t\t\t\tdebug(\"Loaded image \"+name+\" as \"+f.getAbsolutePath());\n\t\t\t\timages.put(name, image);\n\t\t\t}else if(f.isDirectory()){\n\t\t\t\tloadImagesInDirectory(dir+\"\\\\\"+f.getName());\n\t\t\t}\n\t\t}\n\t}",
"private void loadImages(){\n try{\n System.out.println(System.getProperty(\"user.dir\"));\n\n t1img = read(new File(\"resources/tank1.png\"));\n t2img = read(new File(\"resources/tank1.png\"));\n backgroundImg = read(new File(\"resources/background.jpg\"));\n wall1 = read(new File(\"resources/Wall1.gif\"));\n wall2 = read(new File(\"resources/Wall2.gif\"));\n heart = resize(read(new File(\"resources/Hearts/basic/heart.png\")), 35,35);\n heart2 = resize(read( new File(\"resources/Hearts/basic/heart.png\")), 25,25);\n bullet1 = read(new File(\"resources/bullet1.png\"));\n bullet2 = read(new File(\"resources/bullet2.png\"));\n\n }\n catch(IOException e){\n System.out.println(e.getMessage());\n }\n }",
"File getTilePathBase();",
"private <T> void loadAllFromFolder(String name,Class<T> type){\n\t\tFileHandle dirHandle;\n\t\tif (Gdx.app.getType() == ApplicationType.Desktop) {\n\t\t dirHandle = new FileHandle(\"./bin/\"+name);\n\t\t \n\t\t} else {\n\t\t dirHandle = Gdx.files.internal(name);\n\t\t}\n\t\t \n\t\tfor (FileHandle entry: dirHandle.list()) {\n\t\t assetManager.load(entry.path(),type);\n\t\t}\n\t}",
"private void loadGameFiles(){\n\t}",
"public void gatherAssets(AssetDirectory directory) {\r\n\r\n\t\tassets = directory;\r\n\t\tavatarTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Idle\",Texture.class));\r\n\t\tcombinedTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_stand\",Texture.class));\r\n\r\n\t\t// Tiles\r\n\t\tlightTexture = new TextureRegion(directory.getEntry( \"shared:solidCloud_light\", Texture.class ));\r\n\t\tdarkTexture = new TextureRegion(directory.getEntry( \"shared:solidCloud_dark\", Texture.class ));\r\n\t\tallTexture = new TextureRegion(directory.getEntry( \"shared:solidCloud_all\", Texture.class ));\r\n\t\trainLightTexture = new TextureRegion(directory.getEntry( \"shared:rain_cloud_light\", Texture.class ));\r\n\t\trainDarkTexture = new TextureRegion(directory.getEntry( \"shared:rain_cloud_dark\", Texture.class ));\r\n\t\trainAllTexture = new TextureRegion(directory.getEntry( \"shared:rain_cloud_all\", Texture.class ));\r\n\t\tlightningLightTexture = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_light\", Texture.class ));\r\n\t\tlightningDarkTexture = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_dark\", Texture.class ));\r\n\t\tlightningAllTexture = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_all\", Texture.class ));\r\n\t\tcrumbleLightTexture = new TextureRegion(directory.getEntry( \"shared:rain_crumble_light\", Texture.class ));\r\n\t\tcrumbleDarkTexture = new TextureRegion(directory.getEntry( \"shared:rain_crumble_dark\", Texture.class ));\r\n\t\tcrumbleAllTexture = new TextureRegion(directory.getEntry( \"shared:rain_crumble_all\", Texture.class ));\r\n\r\n\t\trainLightTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_cloud_light_reduced\", Texture.class ));\r\n\t\trainDarkTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_cloud_dark_reduced\", Texture.class ));\r\n\t\trainAllTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_cloud_all_reduced\", Texture.class ));\r\n\t\tlightningLightTextureReduced = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_light_reduced\", Texture.class ));\r\n\t\tlightningDarkTextureReduced = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_dark_reduced\", Texture.class ));\r\n\t\tlightningAllTextureReduced = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_all_reduced\", Texture.class ));\r\n\t\tcrumbleLightTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_crumble_light_reduced\", Texture.class ));\r\n\t\tcrumbleDarkTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_crumble_dark_reduced\", Texture.class ));\r\n\t\tcrumbleAllTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_crumble_all_reduced\", Texture.class ));\r\n\r\n\t\t// Tutorial\r\n\t\ttutorial_signs = new TextureRegion[]{\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:camera_pan\", Texture.class)), //0\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_dash\", Texture.class)), //1\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_jump\", Texture.class)), //2\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_propel\", Texture.class)), //3\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_walk\", Texture.class)), //4\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_dash\", Texture.class)), //5\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_jump\", Texture.class)), //6\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_propel\", Texture.class)), //7\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_walk\", Texture.class)), //8\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:spirit_switch\", Texture.class)), //9\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:spirit_separate\", Texture.class)), //10\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:spirit_unify\", Texture.class)), //11\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:dash_catch\", Texture.class)),\t //12\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:propel_dash_vertical\", Texture.class))\t //13\r\n\r\n\t\t};\r\n\r\n\t\t// Base models\r\n\t\tsomniTexture = new TextureRegion(directory.getEntry(\"platform:somni_stand\",Texture.class));\r\n\t\tsomniIdleTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Idle\",Texture.class));\r\n\t\tsomniWalkTexture = new TextureRegion(directory.getEntry(\"platform:somni_walk_cycle\",Texture.class));\r\n\t\tsomniDashSideTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Jump_Dash\",Texture.class));\r\n\t\tsomniDashUpTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Falling\",Texture.class));\r\n\t\tsomniFallTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Falling\", Texture.class));\r\n\r\n\t\tphobiaTexture = new TextureRegion(directory.getEntry(\"platform:phobia_stand\",Texture.class));\r\n\t\tphobiaIdleTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Idle\",Texture.class));\r\n\t\tphobiaWalkTexture = new TextureRegion(directory.getEntry(\"platform:phobia_walk_cycle\",Texture.class));\r\n\t\tphobiaDashSideTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Jump_Dash\",Texture.class));\r\n\t\tphobiaDashUpTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Falling\",Texture.class));\r\n\t\tphobiaFallTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Falling\", Texture.class));\r\n\r\n\r\n\t\t// Combined models\r\n\t\tsomniPhobiaTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_stand\",Texture.class));\r\n\t\tsomniPhobiaWalkTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_walk\",Texture.class));\r\n\t\tsomniPhobiaDashSideTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_dash_side\",Texture.class));\r\n\t\tsomniPhobiaDashUpTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_dash_up\",Texture.class));\r\n\t\tphobiaSomniTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_stand\",Texture.class));\r\n\t\tphobiaSomniWalkTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_walk\",Texture.class));\r\n\t\tphobiaSomniDashSideTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_dash_side\",Texture.class));\r\n\t\tphobiaSomniDashUpTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_dash_up\",Texture.class));\r\n\r\n\t\tsomniPhobiaHandsTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_hands\",Texture.class));\r\n\t\tphobiaSomniHandsTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_hands\",Texture.class));\r\n\t\tblueRingBigTexture = new TextureRegion(directory.getEntry(\"platform:blue_ring_big\",Texture.class));\r\n\t\tyellowRingBigTexture = new TextureRegion(directory.getEntry(\"platform:yellow_ring_big\",Texture.class));\r\n\t\tblueRingSmallTexture = new TextureRegion(directory.getEntry(\"platform:blue_ring_small\",Texture.class));\r\n\t\tyellowRingSmallTexture = new TextureRegion(directory.getEntry(\"platform:yellow_ring_small\",Texture.class));\r\n\t\tsomniHandFrontTexture = new TextureRegion(directory.getEntry(\"platform:somni_hand_front\",Texture.class));\r\n\t\tsomniHandBackTexture = new TextureRegion(directory.getEntry(\"platform:somni_hand_back\",Texture.class));\r\n\t\tphobiaHandFrontTexture = new TextureRegion(directory.getEntry(\"platform:phobia_hand_front\",Texture.class));\r\n\t\tphobiaHandBackTexture = new TextureRegion(directory.getEntry(\"platform:phobia_hand_back\",Texture.class));\r\n\r\n\t\tbackgrounds = new TextureRegion[] {\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_forest\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_forest\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_gear\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_gear\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_dreams\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_dreams\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_house\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_house\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_statues\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_statues\", Texture.class)),\r\n\r\n\t\t};\r\n\r\n\r\n\t\tTextureRegion [] somnis = {somniIdleTexture,somniWalkTexture,somniDashSideTexture,somniDashUpTexture, somniFallTexture, somniDashUpTexture};\r\n\t\tsomnisTexture = somnis;\r\n\t\tTextureRegion [] phobias = {phobiaIdleTexture,phobiaWalkTexture,phobiaDashSideTexture,phobiaDashUpTexture, phobiaFallTexture, phobiaDashUpTexture};\r\n\t\tphobiasTexture = phobias;\r\n\t\tTextureRegion [] somniphobias = {somniPhobiaTexture,somniPhobiaWalkTexture,somniPhobiaDashSideTexture,somniPhobiaDashUpTexture, somniPhobiaDashUpTexture};\r\n\t\tsomniphobiasTexture = somniphobias;\r\n\t\tTextureRegion [] phobiasomnis = {phobiaSomniTexture,phobiaSomniWalkTexture,phobiaSomniDashSideTexture,phobiaSomniDashUpTexture, phobiaSomniDashUpTexture};\r\n\t\tphobiasomnisTexture = phobiasomnis;\r\n\t\tTextureRegion [] somniHands = {somniHandFrontTexture, somniHandBackTexture, somniPhobiaHandsTexture};\r\n\t\tsomniHandsTextures = somniHands;\r\n\t\tTextureRegion [] phobiaHands = {phobiaHandFrontTexture, phobiaHandBackTexture, phobiaSomniHandsTexture};\r\n\t\tphobiaHandsTextures = phobiaHands;\r\n\r\n\t\tanimationSpeed = new float[]{0.1f, 0.5f, 0.1f, 0.1f, 0.1f, 0.1f};\r\n\t\tframePixelWidth = new double[]{32, 64, 32, 32, 32, 32};\r\n\t\toffsetsX = new float[]{12, 19, 0, 0, 15, 0};\r\n\t\toffsetsY = new float[]{0, 0, 0, 0, 0, 0};\r\n\t\tsecOffsetsX = new float[]{-20, -16, 52, 60, -18, 35, -18};\r\n\t\tsecOffsetsY = new float[]{0, 0, -80, -60, 0, -70, 0};\r\n\t\tthirdOffsetsX = new float[]{0, -18, -22, -22, 0, -22, 10, -15, 0, 0, 5, 0, 0, -20, 0, 0, -2, 0};\r\n\t\tthirdOffsetsY = new float[]{0, 0, 0, 0, 0, 0};\r\n\t\tdashAngles = new float[] {0, 0, -1.55f, 0, 0, 3.14f};\r\n\t\tpropelAngles = new float[] {0, 0, 0, 1.55f, 0, -1.55f};\r\n\r\n\r\n\t\t// Setup masking\r\n\t\tcircle_mask = new TextureRegion(directory.getEntry(\"circle_mask\",Texture.class));\r\n\t\tVector2 mask_size = new Vector2(circle_mask.getRegionWidth(), circle_mask.getRegionHeight());\r\n\t\tMIN_MASK_DIMENSIONS = new Vector2(mask_size).scl(mask_shrink_factor);\r\n\t\tmaskWidth = MIN_MASK_DIMENSIONS.x;\r\n\t\tmaskHeight = MIN_MASK_DIMENSIONS.y;\r\n\r\n\t\tsliderBarTexture = directory.getEntry( \"platform:sliderbar\", Texture.class);\r\n\t\tsliderKnobTexture = directory.getEntry( \"platform:sliderknob\", Texture.class);\r\n\r\n\t\tjumpSound = directory.getEntry( \"platform:jump\", SoundBuffer.class );\r\n\t\tfireSound = directory.getEntry( \"platform:pew\", SoundBuffer.class );\r\n\t\tplopSound = directory.getEntry( \"platform:plop\", SoundBuffer.class );\r\n\r\n\t\tconstants = directory.getEntry( \"constants\", JsonValue.class );\r\n\r\n\r\n\r\n\r\n\r\n//Gather sound assets\r\n\t\twinTrack = directory.getEntry(\"winTrack\", SoundBuffer.class);\r\n\t\tSoundController.getInstance().setWinTrack(winTrack);\r\n\r\n\t\tfailTrack = directory.getEntry(\"failTrack\", SoundBuffer.class);\r\n\t\tSoundController.getInstance().setFailTrack(failTrack);\r\n\r\n\r\n\r\n//\t\tsomniTrack = directory.getEntry(\"somniTrack\", SoundBuffer.class);\r\n//\t\tphobiaTrackPath = directory.getEntry(\"phobiaTrack\", SoundBuffer.class);\r\n//\t\tcombinedTrackPath = directory.getEntry(\"combinedTrack\", SoundBuffer.class);\r\n\r\n\r\n//\t\tmenu drawables\r\n\t\torangeUnderline = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pausemenu_underline_red\", Texture.class));\r\n\t\tblueUnderline = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pausemenu_underline\", Texture.class));\r\n\t\tblueRectangle = new TextureRegionDrawable(directory.getEntry(\"pause_menu:bluerectangle\", Texture.class));\r\n\t\tblueExit = new TextureRegionDrawable(directory.getEntry(\"pause_menu:exit_blue\", Texture.class));\r\n\t\tblueResume = new TextureRegionDrawable(directory.getEntry(\"pause_menu:resume_blue\", Texture.class));\r\n\t\tblueRestart = new TextureRegionDrawable(directory.getEntry(\"pause_menu:restart_blue\", Texture.class));\r\n\t\torangeRectangle = new TextureRegionDrawable(directory.getEntry(\"pause_menu:orangerectangle\", Texture.class));\r\n\t\torangeExit = new TextureRegionDrawable(directory.getEntry(\"pause_menu:exit_orange\", Texture.class));\r\n\t\torangeResume = new TextureRegionDrawable(directory.getEntry(\"pause_menu:resume_orange\", Texture.class));\r\n\t\torangeRestart = new TextureRegionDrawable(directory.getEntry(\"pause_menu:restart_orange\", Texture.class));\r\n\t\t//\t\tSliders\r\n\t\torangeSlider = new TextureRegionDrawable(directory.getEntry(\"pause_menu:slider_orange\", Texture.class));\r\n\t\tblueSlider = new TextureRegionDrawable(directory.getEntry(\"pause_menu:slider_blue\", Texture.class));\r\n\t\torangeKnob = new TextureRegionDrawable(directory.getEntry(\"pause_menu:knob_orange\", Texture.class));\r\n\t\tblueKnob = new TextureRegionDrawable(directory.getEntry(\"pause_menu:knob_blue\", Texture.class));\r\n\t\torangeSound = new TextureRegionDrawable(directory.getEntry(\"pause_menu:sound_orange\", Texture.class));\r\n\t\tblueSound = new TextureRegionDrawable(directory.getEntry(\"pause_menu:sound_blue\", Texture.class));\r\n\t\tblueMusicNote = new TextureRegionDrawable(directory.getEntry(\"pause_menu:musicnote_blue\", Texture.class));\r\n\t\torangeMusicNote = new TextureRegionDrawable(directory.getEntry(\"pause_menu:musicnote_orange\", Texture.class));\r\n\r\n\t\tblueNext = new TextureRegionDrawable(directory.getEntry(\"pause_menu:nextblue\", Texture.class));\r\n\t\torangeNext = new TextureRegionDrawable(directory.getEntry(\"pause_menu:nextorange\", Texture.class));\r\n\r\n\t\tbluePauseButton = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pause_button_blue\", Texture.class));\r\n\t\torangePauseButton = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pause_button_red\", Texture.class));\r\n\t\tblurBackground = new TextureRegion(directory.getEntry(\"pause_menu:blur\", Texture.class));\r\n\r\n\r\n\t\tsuper.gatherAssets(directory);\r\n\r\n\r\n\t}",
"public TileSet(String path, int TILE_SIZE) {\n // A tile set requires only a relative path and the tileSize (32 fixed for now)\n // See if tileSet already exists\n boolean sameFound = false;\n int sameIndex = 0;\n for(int i=0; i<tileSetCache.size(); i++) {\n if(tileSetCache.get(i).getTileSetPath().equals(path)) {\n sameFound = true;\n sameIndex = i;\n break;\n }\n }\n if(sameFound) {\n // If it exists we will copy already existing info over.\n tileSetPath = path;\n tileSetSrc = tileSetCache.get(sameIndex).getTileSetSrc();\n tiles = tileSetCache.get(sameIndex).getTiles();\n blank = tileSetCache.get(sameIndex).getBlank();\n Integer[] boxedArray = Arrays.stream(tileSetCache.get(sameIndex).getRemovedTileID()).boxed().toArray(Integer[]::new);\n Collections.addAll(removedTileIDList, boxedArray);\n totalTiles = tileSetCache.get(sameIndex).getTotalTiles();\n } else {\n // If it doesn't already exist in cache then attempt to load from disk\n tileSetPath = path;\n tileSetSrc = new Image(\"file:\"+ Run.GAME_DATA_PATH + \"/Art/\" + path);\n tiles = makeTiles(tileSetSrc, TILE_SIZE);\n // The last tile of a tileset should be the 'blank' tile for the set\n // To compare other tiles with for reducing Image[] size\n if (tiles.length == 0) {\n // Something has gone horribly wrong.\n System.err.println(\"NO TILES DETECTED\");\n } else {\n // If nothing bad happened from makeTiles() then we should be good\n blank = tiles[tiles.length - 1];\n int sizeOriginal = tiles.length;\n for (int step = 0; step < tiles.length; step++) {\n if (areImagesSame(tiles[step], blank)) {\n removedTileIDList.add(step);\n }\n }\n tiles = removeSameElements(tiles, blank);\n int removedTilesCount = sizeOriginal - tiles.length;\n totalTiles = tiles.length;\n if(Run.DEBUG_OUTPUT) {\n System.out.println(String.format(\"Tiles Removed: %d\", removedTilesCount));\n }\n }\n TileSet.tileSetCache.add(this); // After finishing the tileSet we add to master cache\n tileSetCache.trimToSize();\n }\n }",
"public static Image loadTileset(String name) {\n\t\treturn loadBitmap(TILESETS_DIR + name);\n\t}",
"private void loadMap(String path) {\n\t\ttry {\n\t\t\tfor(Player p : players)\tp.clear();\n\t\t\tmap.players = players;\n\t\t\tmap.setPlayerNumber(playerNumber);\n\t\t\tfor(Player p : map.players) {\n\t\t\t\tp.setMap(map);\n\t\t\t\tp.setArmies(map.getInitialArmiesNumber());\n\t\t\t}\n\t\t\tmap.setPlayerNumber(map.players.size());\n\t\t\tmap.load(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void loadStaticEntity(String path) {\r\n assert (entityManager != null);\r\n \r\n try {\r\n Scanner sc = new Scanner(new File(path));\r\n while (sc.hasNext()) {\r\n int id = sc.nextInt();\r\n float x = sc.nextFloat();\r\n float y = sc.nextFloat();\r\n int kwidth = sc.nextInt();\r\n int kheight = sc.nextInt();\r\n entityManager.addEntity(new StaticEntity(handler, id, Tile.TILEWIDTH * x, \r\n Tile.TILEHEIGHT * y, Tile.TILEWIDTH * kwidth, Tile.TILEHEIGHT * kheight));\r\n }\r\n sc.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public void initTiles()\n {\n PropertiesManager props = PropertiesManager.getPropertiesManager(); \n String imgPath = props.getProperty(MahjongSolitairePropertyType.IMG_PATH);\n int spriteTypeID = 0;\n SpriteType sT;\n \n // WE'LL RENDER ALL THE TILES ON TOP OF THE BLANK TILE\n String blankTileFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_IMAGE_NAME);\n BufferedImage blankTileImage = miniGame.loadImageWithColorKey(imgPath + blankTileFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileImage(blankTileImage);\n \n // THIS IS A HIGHLIGHTED BLANK TILE FOR WHEN THE PLAYER SELECTS ONE\n String blankTileSelectedFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_SELECTED_IMAGE_NAME);\n BufferedImage blankTileSelectedImage = miniGame.loadImageWithColorKey(imgPath + blankTileSelectedFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileSelectedImage(blankTileSelectedImage);\n \n // FIRST THE TYPE A TILES, OF WHICH THERE IS ONLY ONE OF EACH\n // THIS IS ANALOGOUS TO THE SEASON TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeATiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_A_TILES);\n for (int i = 0; i < typeATiles.size(); i++)\n {\n String imgFile = imgPath + typeATiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_A_TYPE);\n spriteTypeID++;\n }\n \n // THEN THE TYPE B TILES, WHICH ALSO ONLY HAVE ONE OF EACH\n // THIS IS ANALOGOUS TO THE FLOWER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeBTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_B_TILES);\n for (int i = 0; i < typeBTiles.size(); i++)\n {\n String imgFile = imgPath + typeBTiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_B_TYPE);\n spriteTypeID++;\n }\n \n // AND THEN TYPE C, FOR WHICH THERE ARE 4 OF EACH \n // THIS IS ANALOGOUS TO THE CHARACTER AND NUMBER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeCTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_C_TILES);\n for (int i = 0; i < typeCTiles.size(); i++)\n {\n String imgFile = imgPath + typeCTiles.get(i);\n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID); \n for (int j = 0; j < 4; j++)\n {\n initTile(sT, TILE_C_TYPE);\n }\n spriteTypeID++;\n }\n }",
"public void loadTemplates()\n {\n for (PageTemplate template : templates.values())\n {\n template.load(pageDirectory);\n }\n }",
"public void loadMapsModule(){\n Element rootElement = FileOperator.fileReader(MAPS_FILE_PATH);\n if(rootElement!=null){\n Iterator i = rootElement.elementIterator();\n while (i.hasNext()) {\n Element element = (Element) i.next();\n GridMap map =new GridMap();\n map.decode(element);\n mapsList.add(map);\n }\n }\n }",
"private void init() {\n\n File folder = new File(MAP_PATH);\n File[] listOfFiles = folder.listFiles();\n\n for (int i = 0; i < Objects.requireNonNull(listOfFiles).length; i++) {\n this.mapFiles.add(new File(MAP_PATH + listOfFiles[i].getName()));\n }\n }",
"public void loadWorld() {\n\t\tint[][] tileTypes = new int[100][100];\n\t\tfor (int x = 0; x < 100; x++) {\n\t\t\tfor (int y = 0; y < 100; y++) {\n\t\t\t\ttileTypes[x][y] = 2;\n\t\t\t\tif (x > 40 && x < 60 && y > 40 && y < 60) {\n\t\t\t\t\ttileTypes[x][y] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tEntityList entities = new EntityList(0);\n\t\tPlayer player = new Player(Direction.SOUTH_WEST, 50, 50);\n\t\tentities.addEntity(player);\n\t\tentities.addEntity(new Tree(Direction.SOUTH_WEST,49, 49));\n\t\tworld = new World(new Map(tileTypes), player, entities);\n\t}",
"public void populateCachedImages(File dir)\n {\n if (dir.exists())\n {\n File[] files = dir.listFiles();\n for (int i = 0; i < files.length; i++)\n {\n File file = files[i];\n if (!file.isDirectory())\n {\n //Record all filenames from the cache so we know which photos to retrieve from database\n cachedFileNames.add(file.getName());\n imageList.add(file);\n }\n }\n }\n }",
"private void loadRoute(String path){\n try{\n RouteFinder rf = RouteFinder.load(path);\n VisualMaze newVMaze = new VisualMaze(rf);\n if(tileBox.getChildren().size() > 0)\n tileBox.getChildren().remove(vMaze.getTiles());\n vMaze = newVMaze;\n tileBox.getChildren().add(vMaze.getTiles());\n\n mainMessage.setText(\"Successfully loaded!\");\n stage.setScene(main);\n } catch (IOException e){\n inputMessage.setText(\"Unable to read file.\");\n } catch(ClassNotFoundException e){\n inputMessage.setText(\"Cannot find specified class.\");\n }\n }",
"void loadCheckerBoard(int tileSize);",
"public void loadCache() {\n if (!directory.exists()) {\n directory.mkdirs();\n }\n File[] files = this.directory.listFiles();\n if (files == null) {\n return;\n }\n for (File file : files) {\n if (file.getName().endsWith(\".json\")) {\n cache.put(file.getName().split(\".json\")[0], new JsonDocument(file));\n }\n }\n }",
"public static void loadSprites(MediaTracker m)\r\n\t{\r\n\t\tsprites = new ArrayList<String>();\r\n\t\t\r\n\t\t//Get list of files in pedestrian sprite directory\r\n\t\tFile folder = new File(\"res/pedestrians\");\r\n\t\tString[] files = folder.list();\r\n\t\t\r\n\t\t//Load all .gif files from the directory\r\n\t\tfor(String fileName : files){\r\n\t\t\tif (fileName.endsWith(\".gif\")) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (fileName.endsWith(\"Walk1.gif\")) {\r\n\t\t\t\t\t\tsprites.add(fileName);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tnew Sprite(\"pedestrians/\"+fileName, m);\r\n\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t\tSystem.err.println(\"ERROR: Unable to load pedestrian sprite \"+fileName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Ensure at least one sprite was loaded\r\n\t\tif (sprites.isEmpty()) {\r\n\t\t\tSystem.err.println(\"ERROR: Unable to load any pedestrian sprites\");\r\n\t\t}\r\n\t}",
"public static void populateAndLoadLootList(File capsuleConfigDir, String[] lootTemplatesPaths, Map<String, LootPathData> outLootTemplatesData) {\n for (String path : lootTemplatesPaths) {\r\n LootPathData data = outLootTemplatesData.get(path);\r\n\r\n File templateFolder = new File(capsuleConfigDir.getParentFile().getParentFile(), path);\r\n\r\n if (!templateFolder.exists()) {\r\n templateFolder.mkdirs();\r\n // initial with example capsule the first time\r\n LOGGER.info(\"First load: initializing the loots in \" + path + \". You can change the content of folder with any nbt structure block, schematic, or capsule file. You can remove the folders from capsule.config to remove loots.\");\r\n String assetPath = \"assets/capsule/loot/common\";\r\n if (templateFolder.getPath().contains(\"uncommon\")) assetPath = \"assets/capsule/loot/uncommon\";\r\n if (templateFolder.getPath().contains(\"rare\")) assetPath = \"assets/capsule/loot/rare\";\r\n populateFolder(templateFolder, assetPath);\r\n }\r\n\r\n data.files = new ArrayList<>();\r\n iterateTemplates(templateFolder, templateName -> {\r\n data.files.add(templateName);\r\n });\r\n }\r\n }",
"public void loadTilemap(File fileToLoad) \n {\n File levelFile = fileToLoad;\n boolean roverPainted = false; //Used to check if rover is painted twice\n try\n {\n Scanner scanner = new Scanner(levelFile);\n //Strict capture, instead of hasNextLine()\n // to enforce level grid size\n //Collect data for each column in row, then go to next row\n // 0 = surface, 1 = rover, 2 = rock, 3 = mineral\n for(int y = 0; y < Level.MAX_ROWS; y++)\n {\n for(int x = 0; x < Level.MAX_COLUMNS; x++)\n {\n if(scanner.hasNext())\n {\n tilemap[x][y] = scanner.nextInt();\n \n //Check if this tile paint was a rover\n if(tilemap[x][y] == 1)\n {\n //If rover has already been painted\n if(roverPainted)\n {\n System.out.println(\"WARNING: Multiple rovers exist. \"\n + \"Please fix level file. \");\n }\n roverPainted = true; //Set roverPainted to true\n }\n }\n else\n {\n tilemap[x][y] = 0;\n }\n }\n }\n scanner.close();\n repaint();\n }\n catch (FileNotFoundException e) \n {\n System.out.println(\"Invalid Level File\");\n e.printStackTrace();\n }\n }",
"public void run() {\r\n /*\r\n * 3 strikes and you're out. Attempt to load the url. If it fails,\r\n * decrement the number of tries left and try again. Log failures.\r\n * If I run out of try s just get out. This way, if there is some\r\n * kind of serious failure, I can get out and let other tiles\r\n * try to load.\r\n */\r\n final Tile tile = tileQueue.remove();\r\n \r\n int trys = 3;\r\n while (!tile.isLoaded() && trys > 0) {\r\n try {\r\n BufferedImage img = null;\r\n URI uri = getURI(tile);\r\n img = cache.get(uri);\r\n if(img == null) {\r\n byte[] bimg = cacheInputStream(uri.toURL());\r\n img = GraphicsUtilities.loadCompatibleImage(new ByteArrayInputStream(bimg));//ImageIO.read(new URL(tile.url));\r\n cache.put(uri,bimg,img);\r\n img = cache.get(uri);\r\n }\r\n if(img == null) {\r\n System.out.println(\"error loading: \" + uri);\r\n LOG.log(Level.INFO, \"Failed to load: \" + uri);\r\n trys--;\r\n } else {\r\n final BufferedImage i = img;\r\n SwingUtilities.invokeAndWait(new Runnable() {\r\n public void run() {\r\n tile.image = new SoftReference<BufferedImage>(i);\r\n tile.setLoaded(true);\r\n }\r\n });\r\n }\r\n } catch (OutOfMemoryError memErr) {\r\n cache.needMoreMemory();\r\n } catch (Throwable e) {\r\n LOG.log(Level.SEVERE,\r\n \"Failed to load a tile at url: \" + tile.getURL() + \", retrying\", e);\r\n //temp\r\n System.err.println(\"Failed to load a tile at url: \" + tile.getURL());\r\n e.printStackTrace();\r\n ///temp\r\n Object oldError = tile.getError();\r\n tile.setError(e);\r\n tile.firePropertyChangeOnEDT(\"loadingError\", oldError, e);\r\n if (trys == 0) {\r\n tile.firePropertyChangeOnEDT(\"unrecoverableError\", null, e);\r\n } else {\r\n trys--;\r\n }\r\n }\r\n }\r\n tile.setLoading(false);\r\n }",
"public void load() {\n loadDisabledWorlds();\n chunks.clear();\n for (World world : ObsidianDestroyer.getInstance().getServer().getWorlds()) {\n for (Chunk chunk : world.getLoadedChunks()) {\n loadChunk(chunk);\n }\n }\n }",
"private void loadMaze(String path){\n try{\n Maze m = Maze.fromTxt(path);\n VisualMaze newVMaze = new VisualMaze(m);\n if(tileBox.getChildren().size() > 0)\n tileBox.getChildren().remove(vMaze.getTiles());\n vMaze = newVMaze;\n tileBox.getChildren().add(vMaze.getTiles());\n\n mainMessage.setText(\"Successfully loaded!\");\n stage.setScene(main);\n } catch (IOException e){\n inputMessage.setText(\"Unable to read file.\");\n } catch(InvalidMazeException e){\n inputMessage.setText(e.getMessage());\n }\n }",
"protected static LinkedList<Location> generateLocations() {\n int i = 0;\n LinkedList<Location> list = new LinkedList<Location>();\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n ImagePacker gearImgs = new ImagePacker();\n\n try {\n gearImgs.readDirectory(new File(Objects.requireNonNull(classLoader.getResource(\"assets/gear-tiles\")).getPath()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n for (i = 0; i < GEARTILES; i++) {\n list.add(new Location(LocationType.GEAR).withImg(gearImgs.popImg()));\n }\n list.get((int)(Math.random()*list.size())).toggleStartingLoc();\n\n Image waterImg = new Image(Objects.requireNonNull(classLoader.getResource(\"assets/water/water-tile.jpg\")).toString());\n for (i = 0; i < WATERTILES; i++) {\n list.add(new Location(LocationType.WELL).withImg(waterImg));\n }\n\n Image waterFakeImg = new Image(Objects.requireNonNull(classLoader.getResource(\"assets/water/water-fake-tile.jpg\")).toString());\n for (i = 0; i < WATERFAKETILES; i++) {\n list.add(new Location(LocationType.MIRAGE).withImg(waterFakeImg));\n }\n\n //TODO: Finish images\n for (i = 0; i < LANDINGPADTILES; i++) {\n list.add(new Location(LocationType.LANDINGPAD).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/landing-pad.jpg\")).toString())));\n }\n for (i = 0; i < TUNNELTILES; i++) {\n list.add(new Location(LocationType.TUNNEL).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/tunnel.jpg\")).toString())));\n }\n list.add(new Clue(Artifact.COMPASS, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/compass-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.COMPASS, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/compass-LR.jpg\")).toString())));\n list.add(new Clue(Artifact.PROPELLER, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/propeller-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.PROPELLER, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/propeller-LR.jpg\")).toString())));\n list.add(new Clue(Artifact.ENGINE, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/motor-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.ENGINE, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/motor-LR.jpg\")).toString())));\n list.add(new Clue(Artifact.CRYSTAL, Clue.Orientation.NS).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/monolith-UD.jpg\")).toString())));\n list.add(new Clue(Artifact.CRYSTAL, Clue.Orientation.EW).withImg(new Image(Objects.requireNonNull(classLoader.getResource(\"assets/other-tiles/monolith-LR.jpg\")).toString())));\n\n return list;\n }",
"public void loadLevel(String tileMapPath)\r\n\t{\r\n\t\tTiledMap map= new TmxMapLoader().load(tileMapPath);\r\n\t\tcreateLights(map);\r\n\t}",
"public TileSheet(final String path) throws IOException {\n this.sheet = ImageIO.read(getClass().getResource(path));\n }",
"private void init() {\n\t\trunning = true;\n\t\timage = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB);\n\t\tg = (Graphics2D) image.getGraphics();\n\t\ttheMap.loadTiles(\"resizedTiles2.png\");\n\t}",
"public void loadMap() {\n\t\tchests.clear();\r\n\t\t// Load the chests for the map\r\n\t\tchestsLoaded = false;\r\n\t\t// Load data asynchronously\r\n\t\tg.p.getServer().getScheduler().runTaskAsynchronously(g.p, new AsyncLoad());\r\n\t}",
"private void importImages() {\n\n\t\t// Create array of the images. Each image pixel map contains\n\t\t// multiple images of the animate at different time steps\n\n\t\t// Eclipse will look for <path/to/project>/bin/<relative path specified>\n\t\tString img_file_base = \"Game_Sprites/\";\n\t\tString ext = \".png\";\n\n\t\t// Load background\n\t\tbackground = createImage(img_file_base + \"Underwater\" + ext);\n\t}",
"@Test\n\tpublic void testTiles() throws Exception {\n\n\t\tRelatedTilesUtils.testTiles(geoPackage);\n\n\t}",
"private void loadItem(String path) {\r\n assert (itemManager != null);\r\n \r\n try {\r\n Scanner sc = new Scanner(new File(path));\r\n while (sc.hasNext()) {\r\n int id = sc.nextInt();\r\n int x = sc.nextInt();\r\n int y = sc.nextInt();\r\n switch (id) {\r\n case 0: itemManager.addItem(Item.keyItem.createNew(x * Tile.TILEWIDTH, \r\n y * Tile.TILEHEIGHT)); \r\n break;\r\n case 1: itemManager.addItem(Item.candleItem.createNew(x * Tile.TILEWIDTH, \r\n y * Tile.TILEHEIGHT)); \r\n break;\r\n case 2: itemManager.addItem(Item.knifeItem.createNew(x * Tile.TILEWIDTH, \r\n y * Tile.TILEHEIGHT)); \r\n break;\r\n case 3: itemManager.addItem(Item.ghostAshItem.createNew(x * Tile.TILEWIDTH, \r\n y * Tile.TILEHEIGHT)); \r\n break;\r\n case 4: itemManager.addItem(Item.goldItem.createNew(x * Tile.TILEWIDTH, \r\n y * Tile.TILEHEIGHT)); \r\n break;\r\n default: itemManager.addItem(Item.ghostAshItem.createNew(x * Tile.TILEWIDTH, \r\n y * Tile.TILEHEIGHT)); \r\n break;\r\n }\r\n }\r\n sc.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"private BufferedImage[] loadImages(String directory, BufferedImage[] img) throws Exception {\n\t\tFile dir = new File(directory);\n\t\tFile[] files = dir.listFiles();\n\t\tArrays.sort(files, (s, t) -> s.getName().compareTo(t.getName()));\n\t\t\n\t\timg = new BufferedImage[files.length];\n\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\timg[i] = ImageIO.read(files[i]);\n\t\t}\n\t\treturn img;\n\t}",
"private void initTiles(){\n\t\ttiles = new Tile[size * size];\n\t\tfor(int i = 0; i < tiles.length; i++){\n\t\t\ttiles[i] = new Tile(KEYS[i]);\n\t\t}\n\t}",
"private void loadSprites() throws IOException {\n \t\tsprites.put(\"fullBin\", ImageIO.read(new File(\"user-trash-full64.png\")));\n \t\tsprites.put(\"emptyBin\", ImageIO.read(new File(\"user-trash64.png\")));\n \t\tsprites.put(\"sysfileLarge\", ImageIO.read(new File(\"sysfile1-48.png\")));\n \t\tsprites.put(\"sysfileMedium\", ImageIO.read(new File(\"sysfile2-32.png\")));\n \t\tsprites.put(\"sysfileSmall\", ImageIO.read(new File(\"sysfile3-16.png\")));\n \t\tsprites.put(\"junk\", ImageIO.read(new File(\"junk.png\")));\n \t\tsprites.put(\"grass\", ImageIO.read(new File(\"grass.jpg\")));\n \t}",
"public void load (){\n try{\n FileInputStream fis = new FileInputStream(\"game.data\");\n ObjectInputStream o = new ObjectInputStream(fis);\n for (int i = 0; i < 8; i++){\n for (int j = 0; j < 8; j++){\n String loaded = o.readUTF();\n if (loaded.equals(\"null\")){\n Tiles[i][j].removePiece();\n }else if (loaded.equals(\"WhiteLeftKnight\")){\n Tiles[i][j].setPiece(WhiteLeftKnight);\n }else if (loaded.equals(\"WhiteRightKnight\")){\n Tiles[i][j].setPiece(WhiteRightKnight);\n }else if (loaded.equals(\"WhiteLeftBishop\")){\n Tiles[i][j].setPiece(WhiteLeftBishop);\n }else if (loaded.equals(\"WhiteRightBishop\")){\n Tiles[i][j].setPiece(WhiteRightBishop);\n }else if (loaded.equals(\"WhiteLeftRook\")){\n Tiles[i][j].setPiece(WhiteLeftRook);\n }else if (loaded.equals(\"WhiteRightRook\")){\n Tiles[i][j].setPiece(WhiteRightRook);\n }else if (loaded.equals(\"WhiteQueen\")){\n Tiles[i][j].setPiece(WhiteQueen);\n }else if (loaded.equals(\"WhiteKing\")){\n Tiles[i][j].setPiece(WhiteKing);\n }else if (loaded.equals(\"WhitePromotedRookPawn\")){\n Rook WhitePromotedRookPawn = new Rook(\"WhitePromotedRookPawn\");\n WhitePromotedRookPawn.setIcon(WhiteRookImg);\n Tiles[i][j].setPiece(WhitePromotedRookPawn);\n }else if (loaded.equals(\"WhitePromotedBishopPawn\")){\n Bishop WhitePromotedBishopPawn = new Bishop(\"WhitePromotedBishopPawn\");\n WhitePromotedBishopPawn.setIcon(WhiteBishopImg);\n Tiles[i][j].setPiece(WhitePromotedBishopPawn);\n }else if (loaded.equals(\"WhitePromotedKnightPawn\")){\n Knight WhitePromotedKnightPawn = new Knight(\"WhitePromotedKnightPawn\");\n WhitePromotedKnightPawn.setIcon(WhiteKnightImg);\n Tiles[i][j].setPiece(WhitePromotedKnightPawn);\n }else if (loaded.equals(\"WhitePromotedQueenPawn\")){\n Queen WhitePromotedQueenPawn = new Queen(\"WhitePromotedQueenPawn\");\n WhitePromotedQueenPawn.setIcon(WhiteQueenImg);\n Tiles[i][j].setPiece(WhitePromotedQueenPawn);\n }else if (loaded.equals(\"BlackLeftKnight\")){\n Tiles[i][j].setPiece(BlackLeftKnight);\n }else if (loaded.equals(\"BlackRightKnight\")){\n Tiles[i][j].setPiece(BlackRightKnight);\n }else if (loaded.equals(\"BlackLeftBishop\")){\n Tiles[i][j].setPiece(BlackLeftBishop);\n }else if (loaded.equals(\"BlackRightBishop\")){\n Tiles[i][j].setPiece(BlackRightBishop);\n }else if (loaded.equals(\"BlackLeftRook\")){\n Tiles[i][j].setPiece(BlackLeftRook);\n }else if (loaded.equals(\"BlackRightRook\")){\n Tiles[i][j].setPiece(BlackRightRook);\n }else if (loaded.equals(\"BlackQueen\")){\n Tiles[i][j].setPiece(BlackQueen);\n }else if (loaded.equals(\"BlackKing\")){\n Tiles[i][j].setPiece(BlackKing);\n }else if (loaded.equals(\"BlackPromotedQueenPawn\")){\n Queen BlackPromotedQueenPawn = new Queen(\"BlackPromotedQueenPawn\");\n BlackPromotedQueenPawn.setIcon(BlackQueenImg);\n Tiles[i][j].setPiece(BlackPromotedQueenPawn);\n }else if (loaded.equals(\"BlackPromotedRookPawn\")){\n Rook BlackPromotedRookPawn = new Rook(\"BlackPromotedRookPawn\");\n BlackPromotedRookPawn.setIcon(BlackRookImg);\n Tiles[i][j].setPiece(BlackPromotedRookPawn);\n }else if (loaded.equals(\"BlackPromotedBishopPawn\")){\n Bishop BlackPromotedBishopPawn = new Bishop(\"BlackPromotedBishopPawn\");\n BlackPromotedBishopPawn.setIcon(BlackBishopImg);\n Tiles[i][j].setPiece(BlackPromotedBishopPawn);\n }else if (loaded.equals(\"BlackPromotedKnightPawn\")){\n Knight BlackPromotedKnightPawn = new Knight(\"BlackPromotedKnightPawn\");\n BlackPromotedKnightPawn.setIcon(BlackKnightImg);\n Tiles[i][j].setPiece(BlackPromotedKnightPawn);\n }else if (loaded.equals(\"WhitePawn0\")){\n Tiles[i][j].setPiece(WhitePawns[0]);\n }else if (loaded.equals(\"WhitePawn1\")){\n Tiles[i][j].setPiece(WhitePawns[1]);\n }else if (loaded.equals(\"WhitePawn2\")){\n Tiles[i][j].setPiece(WhitePawns[2]);\n }else if (loaded.equals(\"WhitePawn3\")){\n Tiles[i][j].setPiece(WhitePawns[3]);\n }else if (loaded.equals(\"WhitePawn4\")){\n Tiles[i][j].setPiece(WhitePawns[4]);\n }else if (loaded.equals(\"WhitePawn5\")){\n Tiles[i][j].setPiece(WhitePawns[5]);\n }else if (loaded.equals(\"WhitePawn6\")){\n Tiles[i][j].setPiece(WhitePawns[6]);\n }else if (loaded.equals(\"WhitePawn7\")){\n Tiles[i][j].setPiece(WhitePawns[7]);\n }else if (loaded.equals(\"BlackPawn0\")){\n Tiles[i][j].setPiece(BlackPawns[0]);\n }else if (loaded.equals(\"BlackPawn1\")){\n Tiles[i][j].setPiece(BlackPawns[1]);\n }else if (loaded.equals(\"BlackPawn2\")){\n Tiles[i][j].setPiece(BlackPawns[2]);\n }else if (loaded.equals(\"BlackPawn3\")){\n Tiles[i][j].setPiece(BlackPawns[3]);\n }else if (loaded.equals(\"BlackPawn4\")){\n Tiles[i][j].setPiece(BlackPawns[4]);\n }else if (loaded.equals(\"BlackPawn5\")){\n Tiles[i][j].setPiece(BlackPawns[5]);\n }else if (loaded.equals(\"BlackPawn6\")){\n Tiles[i][j].setPiece(BlackPawns[6]);\n }else if (loaded.equals(\"BlackPawn7\")){\n Tiles[i][j].setPiece(BlackPawns[7]);\n }\n }\n }\n player = o.readInt();\n if (player == 1){\n area.setText(\"\\t\\t\\tPlayer \"+player+\" (White)\");\n }else{\n area.setText(\"\\t\\t\\tPlayer \"+player+\" (Black)\");\n }\n o.close();\n OriginalColor();\n }catch (Exception ex){\n\n }\n }",
"public void open() {\r\n\t\tFile f = getOpenFile(\"Map Files\", \"tilemap\");\r\n\t\tif (f == null) return;\r\n\t\tfile = f;\r\n\t\tframe.setTitle(\"Tile Mapper - \"+file.getName());\r\n\t\tSystem.out.println(\"Opening \"+file.getAbsolutePath());\r\n\r\n\t\ttry {\r\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\r\n\t\t\tInputStream is = this.getClass().getClassLoader().getResourceAsStream(\"tilemapper/Map.xsd\");\r\n\t\t\tfactory.setSchema(SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(new StreamSource(is)));\r\n\r\n\t\t\tDocument dom = factory.newDocumentBuilder().parse(file);\r\n\r\n\t\t\t// we have a valid document\r\n\t\t\t//printNode(dom, \"\");\r\n\t\t\tNode mapNode = null;\r\n\t\t\tNodeList nodes = dom.getChildNodes();\r\n\t\t\tfor (int i=0; i<nodes.getLength(); i++) {\r\n\t\t\t\tNode node = nodes.item(i);\r\n\t\t\t\tif (node.getNodeName() == \"Map\") mapNode = node;\r\n\t\t\t}\r\n\t\t\tif (mapNode == null) return;\r\n\t\t\tmapPanel.parseDOM((Element)mapNode);\r\n\r\n\t\t} catch (ParserConfigurationException e) {\r\n\t\t\tSystem.out.println(\"The underlying parser does not support the requested features.\");\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (FactoryConfigurationError e) {\r\n\t\t\tSystem.out.println(\"Error occurred obtaining Document Builder Factory.\");\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void initTiles() {\n\t\ttileList.add(new Go());\n\n\t\t// Brown properties\n\t\tProperty mediterranean = new Property(\"Mediterranean\");\n\t\tProperty balticAve = new Property(\"Baltic Avenue\");\n\n\t\t// Light blue properties\n\t\tProperty orientalAve = new Property(\"Oriental Avenue\");\n\t\tProperty vermontAve = new Property(\"Vermont Avenue\");\n\t\tProperty connecticutAve = new Property(\"Connecticut Avenue\");\n\n\t\t// Magenta properties\n\t\tProperty stCharles = new Property(\"St. Charles Place\");\n\t\tProperty statesAve = new Property(\"States Avenue\");\n\t\tProperty virginiaAve = new Property(\"Virginia Avenue\");\n\n\t\t// Orange properties\n\t\tProperty stJames = new Property(\"St. James Place\");\n\t\tProperty tennesseeAve = new Property(\"Tennessee Avenue\");\n\t\tProperty newYorkAve = new Property(\"New York Avenue\");\n\n\t\t// Red properties\n\t\tProperty kentuckyAve = new Property(\"Kentucky Avenue\");\n\t\tProperty indianaAve = new Property(\"Indiana Avenue\");\n\t\tProperty illinoisAve = new Property(\"Illinois Avenue\");\n\n\t\t// Yellow Properties\n\t\tProperty atlanticAve = new Property(\"Atlantic Avenue\");\n\t\tProperty ventnorAve = new Property(\"Ventnor Avenue\");\n\t\tProperty marvinGard = new Property(\"Marvin Gardins\");\n\n\t\t// Green Properties\n\t\tProperty pacificAve = new Property(\"Pacific Avenue\");\n\t\tProperty northCar = new Property(\"North Carolina Avenue\");\n\t\tProperty pennsylvannia = new Property(\"Pennsylvania Avenue\");\n\n\t\t// Dark blue properties\n\t\tProperty parkPlace = new Property(\"Park Place\");\n\t\tProperty boardWalk = new Property(\"Boardwalk\");\n\n\t\t// Tax tiles\n\t\tTaxTile incomeTax = new TaxTile(\"Income Tax\", 200);\n\t\tTaxTile luxuryTax = new TaxTile(\"Luxury Tax\", 100);\n\n\t\t// Utilities\n\t\tUtility electric = new Utility(\"Electric Company\");\n\t\tUtility water = new Utility(\"Water Works\");\n\n\t\t// Railroads\n\t\tRailroad reading = new Railroad(\"Reading\");\n\t\tRailroad pennRail = new Railroad(\"Pennsylvania\");\n\t\tRailroad bno = new Railroad(\"B & O\");\n\t\tRailroad shortLine = new Railroad(\"Short Line\");\n\n\t\t// Chance and community chest\n\t\tChance chance = new Chance();\n\t\tCommunity chest = new Community();\n\n\t\t// Adds the properties by color in accordance with their position on the board\n\t\t// adds color + placement of piece to a list of their respective colors\n\t\tbrown.add(1);\n\t\tbrown.add(3);\n\t\trailroads.add(5);\n\t\tlightBlue.add(6);\n\t\tlightBlue.add(8);\n\t\tlightBlue.add(9);\n\t\tmagenta.add(11);\n\t\tutilities.add(12);\n\t\tmagenta.add(13);\n\t\tmagenta.add(14);\n\t\trailroads.add(15);\n\t\torange.add(16);\n\t\torange.add(18);\n\t\torange.add(19);\n\t\tred.add(21);\n\t\tred.add(23);\n\t\tred.add(24);\n\t\trailroads.add(25);\n\t\tyellow.add(26);\n\t\tyellow.add(27);\n\t\tutilities.add(28);\n\t\tyellow.add(29);\n\t\tgreen.add(31);\n\t\tgreen.add(32);\n\t\tgreen.add(34);\n\t\trailroads.add(35);\n\t\tdarkBlue.add(37);\n\t\tdarkBlue.add(39);\n\n\t\t// tileList is the list of tiles of the board where each tile is representative of a place on the board\n\t\t// adds each tile is chronological order beginning of the board \"go\"\n\t\t//this list includes: properties, taxes, railroads, chance, community chest\n\t\t\n\t\ttileList.add(new Go());\n\n\t\ttileList.add(mediterranean);\n\t\ttileList.add(chest);\n\t\ttileList.add(balticAve);\n\t\ttileList.add(incomeTax);\n\t\ttileList.add(reading);\n\t\ttileList.add(orientalAve);\n\t\ttileList.add(chance);\t\n\t\ttileList.add(vermontAve);\n\t\ttileList.add(connecticutAve);\n\n\t\ttileList.add(new Jail());\n\t\t\t\n\t\ttileList.add(stCharles);\n\t\ttileList.add(electric);\t\t\t\n\t\ttileList.add(statesAve);\t\t\t\n\t\ttileList.add(virginiaAve);\n\t\ttileList.add(pennRail);\n\t\ttileList.add(stJames);\t\n\t\ttileList.add(chest);\n\t\ttileList.add(tennesseeAve);\t\t\t\n\t\ttileList.add(newYorkAve);\n\n\t\ttileList.add(new FreeParking());\n\t\t\t\n\t\ttileList.add(kentuckyAve);\t\t\n\t\ttileList.add(chance);\t\n\t\ttileList.add(indianaAve);\t\t\t\n\t\ttileList.add(illinoisAve);\n\t\ttileList.add(bno);\n\t\ttileList.add(atlanticAve);\t\t\t\n\t\ttileList.add(ventnorAve);\n\t\ttileList.add(water);\n\t\ttileList.add(marvinGard);\n\n\t\ttileList.add(new GoToJail());\n\t\t\t\t\t\n\t\ttileList.add(pacificAve);\t\t\t\n\t\ttileList.add(northCar);\n\t\ttileList.add(chest);\t\t\t\n\t\ttileList.add(pennsylvannia);\n\t\ttileList.add(shortLine);\n\t\ttileList.add(chance);\n\t\ttileList.add(parkPlace);\n\t\ttileList.add(luxuryTax);\n\t\ttileList.add(boardWalk);\n\t}",
"public static void load(){\n\t\trobot=new BufferedImage[5];\n\t\ttry {\n\t\t\tfor(int i=0;i<5;i++)\n\t\t\t\trobot[i]=ImageIO.read(new File(\"robot\" + i +\".png\"));\n\t\t\t\n\t\t\tminiRobot=ImageIO.read(new File(\"miniRobot.png\"));\n\t\t\toil=ImageIO.read(new File(\"oil.png\"));\n\t\t\tslime=ImageIO.read(new File(\"slime.png\"));\n\t\t\tmap=ImageIO.read(new File(\"map.png\"));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e + \"Failed to load images\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}",
"@Override\n public void initialize(URL location, ResourceBundle resources) {\n\n ClassLoader classLoader = getClass().getClassLoader();\n\n File folder = new File(classLoader.getResource(\"sampleMemes\").getFile());\n File[] listOfFiles = folder.listFiles();\n TilePane tilePane = new TilePane();\n tilePane.setHgap(5);\n tilePane.setVgap(5);\n tilePane.setMaxWidth(200);\n\n for (int i = 0; i < listOfFiles.length; ++i) {\n Image image = new Image(listOfFiles[i].toURI().toString());\n MyImageView imageView = new MyImageView(image);\n imageView.setImagePath(listOfFiles[i].toURI().toString());\n imageView.setId(listOfFiles[i].getAbsolutePath());\n imageView.setFitHeight(200);\n imageView.setFitWidth(190);\n imageView.setPreserveRatio(true);\n tilePane.getChildren().addAll(imageView);\n addEventToImageView(imageView);\n\n }\n\n imageSlider.setContent(tilePane);\n\n }",
"private void loadMap(ArrayList<Sprite> allSprites) {\n\t\tint numTargets = 0;\n\t\t\n\t\tfor (Sprite thisSprite : allSprites) {\n\t\t\tif(!(thisSprite instanceof Explosion)) {\n\t\t\t\tputInCell(thisSprite.getX(), thisSprite.getY(), thisSprite);\n\t\t\t}\n\t\t\tif (thisSprite instanceof Target) {\n\t\t\t\tnumTargets++;\n\t\t\t}\n\t\t\tif(thisSprite instanceof Door) {\n\t\t\t\tthis.theDoor = (Door)thisSprite;\n\t\t\t}\n\t\t\tif(thisSprite instanceof Player) {\n\t\t\t\tthis.thePlayer = (Player)thisSprite;\n\t\t\t}\n\t\t}\n\t\tthis.numTargets = numTargets;\n\t}",
"private void fetchTile() {\n\t\t\tif (tile.getRequest().isCancelled() || tile.isFinal()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tMapSource source = tile.getRequest().getSource();\n\t\t\tProjObj proj = tile.getRequest().getProjection();\n\t\t\tfinal int ppd = tile.getRequest().getPPD();\n\t\t\t\n\t\t\tfor (int fuzzyPPD = ppd/2 ; fuzzyPPD > 1 ; fuzzyPPD /= 2){\t\t\t\t\n\t\t\t\tint ratio = ppd / fuzzyPPD;\n\t\t\t\t\n\t\t\t\t// A tile has 256 pixels on a side.\n\t\t\t\t// Using this method, we can't upscale data to be fuzzy if it's more than 256 times larger \n\t\t\t\t// than the area we are looking to fill. Upscaling data more than 16 times seems unlikely to provide\n\t\t\t\t// any real benefit to the user, so we will quit our search at this point\n\t\t\t\tif (ratio>16) break;\n\t\t\t\t\n\t\t\t\tString tileName = CacheManager.getTileName(\n\t\t\t\t\tsource.getName(), proj, fuzzyPPD,\n\t\t\t\t\ttile.getXtile()/ratio, tile.getYtile()/ratio,\n\t\t\t\t\tsource.hasNumericKeyword());\n\t\t\t\t\n\t\t\t\tBufferedImage tileImage = CacheManager.getTile(source, tileName);\n\t\t\t\t\n\t\t\t\tif (tileImage==null) {\t\t\t\t\t\t\t\t\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint xtileindex = tile.getXtile() % ratio;\n\t\t\t\tint ytileindex = ratio - (tile.getYtile() % ratio) - 1;\n\t\t\t\t\n\t\t\t\tdouble fuzzyxstep = MapRetriever.tiler.getPixelWidth() / ratio;\n\t\t\t\tdouble fuzzyystep = MapRetriever.tiler.getPixelHeight() / ratio;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\ttileImage = tileImage.getSubimage((int)(xtileindex * fuzzyxstep), (int)(ytileindex * fuzzyystep), (int)fuzzyxstep, (int)fuzzyystep);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog(e);\n\t\t\t\t\tlog(\"xtileindex:\"+xtileindex+\" fuzzyxstep:\"+fuzzyxstep+\" ytileindex:\"+ytileindex+\" fuzzyystep:\"+fuzzyystep);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong outputImageSize = (tileImage.getWidth()*ratio)*(tileImage.getHeight()*ratio);\n\t\t\t\tif (outputImageSize <= 0 || outputImageSize > Integer.MAX_VALUE){\n\t\t\t\t\tlog(\"Scaling tile from \"+fuzzyPPD+\" to \"+ppd+\" will result in image size overflow.\"+\n\t\t\t\t\t\t\t\" Stopping further search for lower PPDs for this tile.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttileImage = CacheManager.scaleImage(tileImage, ratio);\n\t\t\t\t\n\t\t\t\tmyRetriever.fuzzyResponse(tile, tileImage);\n\t\t\t}\t\t\t\t\t\t\n\t\t}",
"@WorkerThread\n private static void checkTiles(final HashMap<String, String> missingTiles, final ArrayList<Download> missingDownloads, final AtomicBoolean hasUnsupportedTiles) {\n final List<ContentStorage.FileInformation> files = ContentStorage.get().list(PersistableFolder.ROUTING_TILES.getFolder());\n for (ContentStorage.FileInformation fi : files) {\n if (fi.name.endsWith(BROUTER_TILE_FILEEXTENSION)) {\n missingTiles.remove(fi.name);\n }\n }\n\n // read list of available tiles from the server, if necessary\n if (!missingTiles.isEmpty()) {\n final HashMap<String, Download> tiles = BRouterTileDownloader.getInstance().getAvailableTiles();\n final ArrayList<String> filenames = new ArrayList<>(missingTiles.values()); // work on copy to avoid concurrent modification\n for (String filename : filenames) {\n if (tiles.containsKey(filename)) {\n missingDownloads.add(tiles.get(filename));\n } else {\n missingTiles.remove(filename);\n hasUnsupportedTiles.set(true);\n }\n }\n }\n }",
"private void loadGhost(String path) {\r\n assert (entityManager != null);\r\n \r\n try {\r\n Scanner sc = new Scanner(new File(path));\r\n while (sc.hasNext()) {\r\n int id = sc.nextInt();\r\n float x = sc.nextFloat();\r\n float y = sc.nextFloat();\r\n Ghost ghost;\r\n if (id == 0) {\r\n ghost = new Ghost1(handler, x * Tile.TILEWIDTH, y * Tile.TILEHEIGHT);\r\n } else if (id == 2) {\r\n ghost = new Ghost2(handler, x * Tile.TILEWIDTH, y * Tile.TILEHEIGHT);\r\n } else if (id == 3) {\r\n ghost = new Ghost3(handler, x * Tile.TILEWIDTH, y * Tile.TILEHEIGHT);\r\n } else {\r\n ghost = new Ghost1(handler, x * Tile.TILEWIDTH, y * Tile.TILEHEIGHT);\r\n }\r\n entityManager.addEntity(ghost);\r\n }\r\n sc.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"private void saveTileEntities(File folder) throws IOException\n {\n File file = new File(folder + \"/tiles.dat\");\n\n if (tiles.tagCount() == 0)\n {\n /* Crash fix: remove file in case if it's already exist \n * \n * ITickable tiles may crash the game if they're being imported \n * from previously exported tiles that had appropriate block, but \n * more recent save doesn't have that tile, however it didn't \n * removed the file.\n */\n if (file.exists()) file.delete();\n\n return;\n }\n\n NBTTagCompound output = new NBTTagCompound();\n\n output.setTag(\"Tiles\", this.tiles);\n CompressedStreamTools.write(output, file);\n }",
"private void loadImages() {\n\t\ttry {\n\t\t\tall_images = new Bitmap[img_files.length];\n\t\t\tfor (int i = 0; i < all_images.length; i++) {\n\t\t\t\tall_images[i] = loadImage(img_files[i] + \".jpg\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tToast.makeText(this, \"Unable to load images\", Toast.LENGTH_LONG)\n\t\t\t\t\t.show();\n\t\t\tfinish();\n\t\t}\n\t}",
"public void loadMap(String filepath) {\n\n\t\ttry {\n\n\t\t\tInputStream in = getClass().getResourceAsStream(filepath);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(in));\n\n\t\t\tnumCols = Integer.parseInt(br.readLine());\n\t\t\tnumRows = Integer.parseInt(br.readLine());\n\t\t\tmap = new int[numRows][numCols];\n\t\t\twidth = numCols * tileSize;\n\t\t\theight = numRows * tileSize;\n\n\t\t\tString delims = \"\\\\s+\";\n\t\t\tfor (int row = 0; row < numRows; row++) {\n\t\t\t\tString line = br.readLine();\n\t\t\t\tString[] tokens = line.split(delims);\n\t\t\t\tfor (int col = 0; col < numCols; col++) {\n\t\t\t\t\tmap[row][col] = Integer.parseInt(tokens[col]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"@Override\n protected void generateTiles() {\n }",
"public void loadStartingMap(int up_offset, int down_offset, int left_offset,\n int right_offset) {\n int counter = 0;\n for (int y = 0; y < MAP_HEIGHT; y++) {\n for (int x = 0; x < MAP_WIDTH; x++) {\n tiles[x][y] = new Tile(x * TILE_SIZE, y * TILE_SIZE,\n Constants.testMap[counter], true);\n backGroundTiles[x][y] = new Tile(x * TILE_SIZE, y * TILE_SIZE,\n Constants.testMap_base[counter], true);\n grassTiles[x][y] = new Tile(x * TILE_SIZE, y * TILE_SIZE,\n Constants.testMap_grass[counter], true);\n counter++;\n }\n }\n\n for (int i = 0; i < up_offset; i++) {\n for (int j = 0; j < 4; j++) {\n adjustUp();\n }\n }\n for (int i = 0; i < down_offset; i++) {\n for (int j = 0; j < 4; j++) {\n adjustDown();\n }\n }\n for (int i = 0; i < left_offset; i++) {\n for (int j = 0; j < 4; j++) {\n adjustLeft();\n }\n }\n for (int i = 0; i < right_offset; i++) {\n for (int j = 0; j < 4; j++) {\n adjustRight();\n }\n }\n\n this.setGrassTileRaw(Constants.testMap_grass); // used for IsInGrass\n this.id = 1;\n }",
"private void loadMapData(Context context, int pixelsPerMeter,int px,int py){\n\n char c;\n\n //keep track of where we load our game objects\n int currentIndex = -1;\n\n //calculate the map's dimensions\n mapHeight = levelData.tiles.size();\n mapWidth = levelData.tiles.get(0).length();\n\n //iterate over the map to see if the object is empty space or a grass\n //if it's other than '.' - a switch is used to create the object at this location\n //if it's '1'- a new Grass object it's added to the arraylist\n //if it's 'p' the player it's initialized at the location\n\n for (int i = 0; i < levelData.tiles.size(); i++) {\n for (int j = 0; j < levelData.tiles.get(i).length(); j++) {\n\n c = levelData.tiles.get(i).charAt(j);\n //for empty spaces nothing to load\n if(c != '.'){\n currentIndex ++;\n switch (c){\n case '1' :\n //add grass object\n gameObjects.add(new Grass(j,i,c));\n break;\n\n case 'p':\n //add the player object\n gameObjects.add(new Player(context,px,py,pixelsPerMeter));\n playerIndex = currentIndex;\n //create a reference to the player\n player = (Player)gameObjects.get(playerIndex);\n break;\n }\n\n //check if a bitmap is prepared for the object that we just added in the gameobjects list\n //if not (the bitmap is still null) - it's have to be prepared\n if(bitmapsArray[getBitmapIndex(c)] == null){\n //prepare it and put in the bitmap array\n bitmapsArray[getBitmapIndex(c)] =\n gameObjects.get(currentIndex).prepareBitmap(context,\n gameObjects.get(currentIndex).getBitmapName(),\n pixelsPerMeter);\n }\n\n }\n\n }\n\n }\n }",
"@Override\n\tprotected void generateTiles() {\n\t}",
"public TileWorldUtil(String fileName) {\n load(fileName);\n }",
"File getLoadLocation();",
"private void loadAreas() {\r\n\t\tareas = map.getAreas();\r\n\t\tfor (Area area : areas) {\r\n\t\t\tfor (AreaOrMonster monster : area.getChildren()) {\r\n\t\t\t\tmonster.getImageView().setX(monster.getX() * scalingFactor);\r\n\t\t\t\tmonster.getImageView().setY(monster.getY() * scalingFactor);\r\n\t\t\t\troot.getChildren().add(monster.getImageView());\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void loadImages(BufferedImage[] images, String direction) {\n for (int i = 0; i < images.length; i++) {\n String fileName = direction + (i + 1);\n images[i] = GameManager.getResources().getMonsterImages().get(\n fileName);\n }\n\n }",
"private void loadMap(BufferedImage[][] heroImages,\n\t\t\tBufferedImage[][] bossImages, BufferedImage[][] enemyImages) {\n\t\t// read in map graphics\n\t\tBufferedImage[] tiles = new BufferedImage[3];\n\t\tfor (int i = 0; i < tiles.length; i++)\n\t\t\ttiles[i] = Game.loadImage(\"ssTile\" + (i + 1) + \".png\");\n\n\t\t// create scanner\n\t\tScanner in = new Scanner(Game.loadStream(\"map2.txt\"));\n\n\t\t// read in map\n\t\tint width = in.nextInt(), height = in.nextInt();\n\t\tin.nextLine();\n\t\tin.nextLine();\n\t\tint[][] grid = new int[height][width];\n\t\tfor (int i = 0; i < height; i++)\n\t\t\tprocessMapLine(grid, in.nextLine(), width, i);\n\n\t\t// read in entities\n\t\thero = loadEntity(in, 200, heroImages, 32);\n\t\tboss = loadEntity(in, 1000, bossImages, 32);\n\t\tenemies = new ArrayList<SideScrollerEntity>();\n\t\tint numEnemies = in.nextInt();\n\t\tfor (int i = 0; i < numEnemies; i++)\n\t\t\tenemies.add(loadEntity(in, 1000, enemyImages, 32));\n\n\t\t// load shop graphics\n\t\tBufferedImage shopTile = Game.loadImage(\"shop2.png\");\n\n\t\tmap = new SideScrollerMap(this, this, hero, boss, enemies, 0,\n\t\t\t\t-32 * 32 + 600, sighting);\n\t\tmap.loadResources(tiles, grid, shopTile, 29, 5);\n\t}",
"public interface TileManager {\r\n\t\r\n\tpublic String encode(long id);\r\n\t\r\n\tpublic int getNumTilesX();\r\n\t\r\n\tpublic int getNumTilesY();\r\n\t\r\n\tpublic double getTileSize();\r\n\t\r\n\tpublic String getCRS();\r\n\t\r\n\tpublic int[] getTileCoordinates(double[] bbox);\r\n\t\r\n\tpublic void setTiles(double[] geobbox);\r\n\t\r\n\tpublic List<String> getTiles(double[] geobbox);\r\n\t\r\n\tpublic List<Tile> getTiles();\r\n\t\r\n\tpublic double[] getWorldBBox();\r\n\t\t\r\n\tpublic List<String> getNeighourTiles(String code, List<String> directions);\r\n\t\r\n}",
"public void loadGameScreenTiled(int nivelTiled) {\n cargarComun();\n String carpeta = \"tiled\";\n if (usarPacked)\n carpeta = \"tiledp\";\n\n if (nivelTiled == 1) {\n rutaTiled = \"data/\" + carpeta + \"/mundo01.tmx\";\n // rutaTiled =\n rutaMusica = \"data/musica/01.mp3\";\n } else if (nivelTiled == 2) {\n rutaTiled = \"data/\" + carpeta + \"/mundo02.tmx\";\n rutaMusica = \"data/musica/02.mp3\";\n } else if (nivelTiled == 3) {\n rutaTiled = \"data/\" + carpeta + \"/mundo03.tmx\";\n rutaMusica = \"data/musica/03.mp3\";\n } else if (nivelTiled == 4) {\n rutaTiled = \"data/\" + carpeta + \"/mundo04.tmx\";\n rutaMusica = \"data/musica/04.mp3\";\n } else if (nivelTiled == 5) {\n rutaTiled = \"data/\" + carpeta + \"/mundo05.tmx\";\n rutaMusica = \"data/musica/05.mp3\";\n } else if (nivelTiled == 6) {\n rutaTiled = \"data/\" + carpeta + \"/mundo06.tmx\";\n rutaMusica = \"data/musica/01.mp3\";\n } else if (nivelTiled == 7) {\n rutaTiled = \"data/\" + carpeta + \"/mundo07.tmx\";\n rutaMusica = \"data/musica/02.mp3\";\n } else if (nivelTiled == 8) {\n rutaTiled = \"data/\" + carpeta + \"/mundo08.tmx\";\n rutaMusica = \"data/musica/03.mp3\";\n } else if (nivelTiled == 9) {\n rutaTiled = \"data/\" + carpeta + \"/mundo09.tmx\";\n rutaMusica = \"data/musica/04.mp3\";\n } else if (nivelTiled == 10) {\n rutaTiled = \"data/\" + carpeta + \"/mundo10.tmx\";\n rutaMusica = \"data/musica/05.mp3\";\n } else if (nivelTiled == 11) {\n rutaTiled = \"data/\" + carpeta + \"/mundo11.tmx\";\n rutaMusica = \"data/musica/01.mp3\";\n } else if (nivelTiled == 12) {\n rutaTiled = \"data/\" + carpeta + \"/mundo12.tmx\";\n rutaMusica = \"data/musica/02.mp3\";\n } else if (nivelTiled == 12) {\n rutaTiled = \"data/\" + carpeta + \"/mundo12.tmx\";\n rutaMusica = \"data/musica/03.mp3\";\n } else if (nivelTiled == 13) {\n rutaTiled = \"data/\" + carpeta + \"/mundo13.tmx\";\n rutaMusica = \"data/musica/04.mp3\";\n } else if (nivelTiled == 14) {\n rutaTiled = \"data/\" + carpeta + \"/mundo14.tmx\";\n rutaMusica = \"data/musica/05.mp3\";\n } else if (nivelTiled == 15) {\n rutaTiled = \"data/\" + carpeta + \"/mundo15.tmx\";\n rutaMusica = \"data/musica/01.mp3\";\n } else if (nivelTiled == 16) {\n rutaTiled = \"data/\" + carpeta + \"/mundo16.tmx\";\n rutaMusica = \"data/musica/02.mp3\";\n } else if (nivelTiled == 17) {\n rutaTiled = \"data/\" + carpeta + \"/mundo17.tmx\";\n rutaMusica = \"data/musica/03.mp3\";\n } else if (nivelTiled == 1000) {// Mundo de muchas monedas\n int mundo = new Random().nextInt(2);\n\n if (mundo == 0) {\n rutaTiled = \"data/\" + carpeta + \"/especial01.tmx\";\n } else {\n rutaTiled = \"data/\" + carpeta + \"/especial02.tmx\";\n }\n\n rutaMusica = \"data/musica/01.mp3\";\n }\n\n if (!isLoaded(rutaMusica))\n load(rutaMusica, Music.class);\n\n if (!isLoaded(atlasTiledStuff))\n load(atlasTiledStuff, TextureAtlas.class);\n\n if (!isLoaded(rutaTiled))\n load(rutaTiled, TiledMap.class);\n\n if (!isLoaded(\"data/musica/coin.mp3\"))\n load(\"data/musica/coin.mp3\", Sound.class);\n\n if (!isLoaded(\"data/musica/salto.mp3\"))\n load(\"data/musica/salto.mp3\", Sound.class);\n\n }",
"private void loadBasePaths() {\n\n Log.d(TAG, \"****loadBasePaths*****\");\n List<FileInfo> paths = BaseMediaPaths.getInstance().getBasePaths();\n for (FileInfo path : paths) {\n\n }\n }",
"public void load(String path) {\n try {\n texId = new TextureId(path);\n BufferedImage image = ImageIO.read(new FileInputStream(\"resources\" + texId.getPath()));\n createImage(image);\n } catch (Exception e) {\n e.printStackTrace();\n unload();\n }\n }",
"void massiveModeLoading( File dataPath );",
"private Tile getTile(int tpx, int tpy, int zoom, boolean eagerLoad) {\n int tileX = tpx;//tilePoint.getX();\r\n int numTilesWide = (int)getMapSize(zoom).getWidth();\r\n if (tileX < 0) {\r\n tileX = numTilesWide - (Math.abs(tileX) % numTilesWide);\r\n }\r\n \r\n tileX = tileX % numTilesWide;\r\n int tileY = tpy;\r\n //TilePoint tilePoint = new TilePoint(tileX, tpy);\r\n String url = getInfo().getTileUrl(tileX, tileY, zoom);//tilePoint);\r\n //System.out.println(\"loading: \" + url);\r\n \r\n \r\n Tile.Priority pri = Tile.Priority.High;\r\n if (!eagerLoad) {\r\n pri = Tile.Priority.Low;\r\n }\r\n Tile tile = null;\r\n //System.out.println(\"testing for validity: \" + tilePoint + \" zoom = \" + zoom);\r\n if (!tileMap.containsKey(url)) {\r\n if (!GeoUtil.isValidTile(tileX, tileY, zoom, getInfo())) {\r\n tile = new Tile(tileX, tileY, zoom);\r\n } else {\r\n tile = new Tile(tileX, tileY, zoom, url, pri, this);\r\n startLoading(tile);\r\n }\r\n tileMap.put(url,tile);\r\n } else {\r\n tile = tileMap.get(url);\r\n // if its in the map but is low and isn't loaded yet\r\n // but we are in high mode\r\n if (tile.getPriority() == Tile.Priority.Low && eagerLoad && !tile.isLoaded()) {\r\n //System.out.println(\"in high mode and want a low\");\r\n //tile.promote();\r\n promote(tile);\r\n }\r\n }\r\n \r\n /*\r\n if (eagerLoad && doEagerLoading) {\r\n for (int i = 0; i<1; i++) {\r\n for (int j = 0; j<1; j++) {\r\n // preload the 4 tiles under the current one\r\n if(zoom > 0) {\r\n eagerlyLoad(tilePoint.getX()*2, tilePoint.getY()*2, zoom-1);\r\n eagerlyLoad(tilePoint.getX()*2+1, tilePoint.getY()*2, zoom-1);\r\n eagerlyLoad(tilePoint.getX()*2, tilePoint.getY()*2+1, zoom-1);\r\n eagerlyLoad(tilePoint.getX()*2+1, tilePoint.getY()*2+1, zoom-1);\r\n }\r\n }\r\n }\r\n }*/\r\n \r\n \r\n return tile;\r\n }",
"private void loadGame(String fileName){\n\n }",
"public static void loadImages()\n \t{\n \t\tSystem.out.print(\"Loading images... \");\n \t\t\n \t\tallImages = new TreeMap<ImageEnum, ImageIcon>();\n \t\t\n \t\ttry {\n \t\taddImage(ImageEnum.RAISIN, \"images/parts/raisin.png\");\n \t\taddImage(ImageEnum.NUT, \"images/parts/nut.png\");\n \t\taddImage(ImageEnum.PUFF_CHOCOLATE, \"images/parts/puff_chocolate.png\");\n \t\taddImage(ImageEnum.PUFF_CORN, \"images/parts/puff_corn.png\");\n \t\taddImage(ImageEnum.BANANA, \"images/parts/banana.png\");\n \t\taddImage(ImageEnum.CHEERIO, \"images/parts/cheerio.png\");\n \t\taddImage(ImageEnum.CINNATOAST, \"images/parts/cinnatoast.png\");\n\t\taddImage(ImageEnum.CORNFLAKE, \"images/parts/flake_corn.png\");\n \t\taddImage(ImageEnum.FLAKE_BRAN, \"images/parts/flake_bran.png\");\n \t\taddImage(ImageEnum.GOLDGRAHAM, \"images/parts/goldgraham.png\");\n \t\taddImage(ImageEnum.STRAWBERRY, \"images/parts/strawberry.png\");\n \t\t\n \t\taddImage(ImageEnum.PART_ROBOT_HAND, \"images/robots/part_robot_hand.png\");\n \t\taddImage(ImageEnum.KIT_ROBOT_HAND, \"images/robots/kit_robot_hand.png\");\n \t\taddImage(ImageEnum.ROBOT_ARM_1, \"images/robots/robot_arm_1.png\");\n \t\taddImage(ImageEnum.ROBOT_BASE, \"images/robots/robot_base.png\");\n \t\taddImage(ImageEnum.ROBOT_RAIL, \"images/robots/robot_rail.png\");\n \t\t\n \t\taddImage(ImageEnum.KIT, \"images/kit/empty_kit.png\");\n \t\taddImage(ImageEnum.KIT_TABLE, \"images/kit/kit_table.png\");\n \t\taddImage(ImageEnum.KITPORT, \"images/kit/kitport.png\");\n \t\taddImage(ImageEnum.KITPORT_HOOD_IN, \"images/kit/kitport_hood_in.png\");\n \t\taddImage(ImageEnum.KITPORT_HOOD_OUT, \"images/kit/kitport_hood_out.png\");\n \t\taddImage(ImageEnum.PALLET, \"images/kit/pallet.png\");\n \t\t\n \t\taddImage(ImageEnum.FEEDER, \"images/lane/feeder.png\");\n \t\taddImage(ImageEnum.LANE, \"images/lane/lane.png\");\n \t\taddImage(ImageEnum.NEST, \"images/lane/nest.png\");\n \t\taddImage(ImageEnum.DIVERTER, \"images/lane/diverter.png\");\n \t\taddImage(ImageEnum.DIVERTER_ARM, \"images/lane/diverter_arm.png\");\n \t\taddImage(ImageEnum.PARTS_BOX, \"images/lane/partsbox.png\");\n \t\t\n \t\taddImage(ImageEnum.CAMERA_FLASH, \"images/misc/camera_flash.png\");\n \t\taddImage(ImageEnum.SHADOW1, \"images/misc/shadow1.png\");\n \t\taddImage(ImageEnum.SHADOW2, \"images/misc/shadow2.png\");\n \t\t\n \t\taddImage(ImageEnum.GANTRY_BASE, \"images/gantry/gantry_base.png\");\n \t\taddImage(ImageEnum.GANTRY_CRANE, \"images/gantry/gantry_crane.png\");\n \t\taddImage(ImageEnum.GANTRY_TRUSS_H, \"images/gantry/gantry_truss_h.png\");\n \t\taddImage(ImageEnum.GANTRY_TRUSS_V, \"images/gantry/gantry_truss_v.png\");\n \t\taddImage(ImageEnum.GANTRY_WHEEL, \"images/gantry/gantry_wheel.png\");\n \t\t} catch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t\tSystem.exit(1);\n \t\t}\n \t\tSystem.out.println(\"Done\");\n \t}",
"public static void loadImages(){\n\t\tsetPath(main.getShop().inventory.getEquipID());\n\t\ttry {\n\t\t\tbackground = ImageIO.read(new File(\"res/world/bg.png\"));\n\t\t\tterrain = ImageIO.read(new File(\"res/world/solids.png\"));\n\t\t\t// Character and Armour\n\t\t\tcharacters = ImageIO.read(new File(\"res/world/char3.png\"));\n\t\t\tcharactersHead =ImageIO.read(new File(\"res/world/charhead\"+path[0]+\".png\"));\n\t\t\tcharactersTop = ImageIO.read(new File(\"res/world/chartop\"+path[2]+\".png\"));\n\t\t\tcharactersShoulder = ImageIO.read(new File(\"res/world/charshoulders\"+path[3]+\".png\"));\n\t\t\tcharactersHand = ImageIO.read(new File(\"res/world/charhands\"+path[5]+\".png\"));\n\t\t\tcharactersBottom = ImageIO.read(new File(\"res/world/charbottom\"+path[8]+\".png\"));\n\t\t\tcharactersShoes = ImageIO.read(new File(\"res/world/charshoes\"+path[9]+\".png\"));\n\t\t\tcharactersBelt = ImageIO.read(new File(\"res/world/charBelt\"+path[4]+\".png\"));\n\n\t\t\tweaponBow = ImageIO.read(new File(\"res/world/bow.png\"));\n\t\t\tweaponArrow = ImageIO.read(new File(\"res/world/arrow.png\"));\n\t\t\tweaponSword = ImageIO.read(new File(\"res/world/sword.png\"));\n\t\t\titems = ImageIO.read(new File(\"res/world/items.png\"));\n\t\t\tnpc = ImageIO.read(new File(\"res/world/npc.png\"));\n\t\t\thealth = ImageIO.read(new File(\"res/world/health.png\"));\n\t\t\tenemies = ImageIO.read(new File(\"res/world/enemies.png\"));\n\t\t\tcoin = ImageIO.read(new File(\"res/world/coin.png\"));\n\t\t\tmana = ImageIO.read(new File(\"res/world/mana.gif\"));\n\t\t\tarrowP = ImageIO.read(new File(\"res/world/arrowP.png\"));\n\t\t\tbutton = ImageIO.read(new File(\"res/world/button.png\"));\n\t\t\tblood = ImageIO.read(new File(\"res/world/blood.png\"));\n\t\t\tarrowDisp = ImageIO.read(new File(\"res/world/arrowDisp.png\"));\n\t\t\tboss1 = ImageIO.read(new File(\"res/world/boss1.png\"));\n\t\t\tmagic = ImageIO.read(new File(\"res/world/magic.png\"));\n\t\t\tmainMenu = ImageIO.read(new File(\"res/world/MainMenu.png\"));\n\t\t\tinstructions = ImageIO.read(new File(\"res/world/instructions.png\"));\n\t\t\trespawn = ImageIO.read(new File(\"res/world/respawn.png\"));\n\t\t\tinventory = ImageIO.read(new File(\"res/world/inventory.png\"));\n shop = ImageIO.read(new File(\"res/world/shop.png\"));\n dizzy = ImageIO.read(new File(\"res/world/dizzy.png\"));\n pet = ImageIO.read(new File(\"res/world/pet.png\"));\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error Loading Images\");\n\t\t}\n\t}",
"public void cargarHashMap() throws IOException {\r\n\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.BUTTERFLY,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/butterfly.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.AMOEBA,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/amoeba.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.DIAMOND,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/diamond.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.FALLINGDIAMOND,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/diamond.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.WALL,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/wall.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.DIRT,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/dirt.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.EMPTY,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/empty.jpg\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.PLAYER,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/rockford.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.ROCK,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/boulder.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.FALLINGROCK,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/boulder.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.FIREFLY,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/firefly.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.TITANIUM,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/steel.gif\")));\r\n\t\timagenes.put(\r\n\t\t\t\tBDTile.EXIT,\r\n\t\t\t\ttoolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t\t.getResource(\"resources/exit.gif\")));\r\n\t\t//imagenes.put(\r\n\t\t\t//\tBDTile.EXPLOSION,\r\n\t\t\t\t//toolkit.getImage(this.getClass().getClassLoader()\r\n\t\t\t\t\t//\t.getResource(\"resources/explosion.gif\")));\r\n\r\n\t}",
"@Override\r\n\tpublic void tileLoadedHandler(Tile tile) {\n\r\n\t}",
"@Override\r\n\tpublic void createSprites(World world) {\r\n \t// the height of the map since 0,0 in Tiled is in the top left\r\n // compared to the TiledMap's 0,0 in the bottom left\r\n int height = 2400;\r\n\r\n // file locations of different trees\r\n TextureAtlas atlas = new TextureAtlas(\"Game Tilesets/Trees/Trees.pack\");\r\n Skin skin = new Skin();\r\n skin.addRegions(atlas);\r\n TextureRegion T2 = skin.getRegion(\"T2\");\r\n TextureRegion T3 = skin.getRegion(\"T3\");\r\n TextureRegion T7 = skin.getRegion(\"T7\");\r\n TextureRegion T9 = skin.getRegion(\"T9\");\r\n TextureRegion T10 = skin.getRegion(\"T10\");\r\n \r\n // add all of the trees\r\n \tthis.addSprite(new ObjectSprites(T2, 236, height - 1490));\r\n \r\n this.addSprite(new ObjectSprites(T9, 622, height - 1907));\r\n this.addSprite(new ObjectSprites(T9, 683, height - 1687));\r\n this.addSprite(new ObjectSprites(T9, 174, height - 1851));\r\n this.addSprite(new ObjectSprites(T9, 361, height - 1643));\r\n \r\n this.addSprite(new ObjectSprites(T10, 572, height - 1354));\r\n this.addSprite(new ObjectSprites(T10, 0, height - 1475));\r\n this.addSprite(new ObjectSprites(T10, -9, height - 1707));\r\n this.addSprite(new ObjectSprites(T10, 675, height - 1479));\r\n this.addSprite(new ObjectSprites(T10, 416, height - 1903));\r\n\r\n this.addSprite(new ObjectSprites(T3, 428, height - 1453));\r\n this.addSprite(new ObjectSprites(T3, 596, height - 1122));\r\n this.addSprite(new ObjectSprites(T3, -32, height - 988));\r\n this.addSprite(new ObjectSprites(T3, 476, height - 864));\r\n this.addSprite(new ObjectSprites(T3, 640, height - 725));\r\n this.addSprite(new ObjectSprites(T3, 424, height - 2123));\r\n \r\n this.addSprite(new ObjectSprites(T7, 145, height - 1347));\r\n this.addSprite(new ObjectSprites(T7, 83, height - 1935));\r\n this.addSprite(new ObjectSprites(T7, 585, height - 2031));\r\n this.addSprite(new ObjectSprites(T7, 290, height - 2304));\r\n \r\n Bandit b1 = new Bandit();\r\n b1.defineBody(world, 215, 1305);\r\n super.addSprite(b1);\r\n \r\n Bandit b2 = new Bandit();\r\n b2.defineBody(world, 60, 1445);\r\n super.addSprite(b2);\r\n \r\n Bandit b3 = new Bandit();\r\n b3.defineBody(world, 90, 1640);\r\n super.addSprite(b3);\r\n \r\n Bandit b4 = new Bandit();\r\n b4.defineBody(world, 530, 1740);\r\n super.addSprite(b4);\r\n \r\n Bandit b5 = new Bandit();\r\n b5.defineBody(world, 730, 1655);\r\n super.addSprite(b5);\r\n \r\n Bandit b6 = new Bandit();\r\n b6.defineBody(world, 90, 2235);\r\n super.addSprite(b6);\r\n \r\n Bandit b7 = new Bandit();\r\n b7.defineBody(world, 715, 1490);\r\n super.addSprite(b7);\r\n \r\n Bandit b8 = new Bandit();\r\n b8.defineBody(world, 318, 1605);\r\n super.addSprite(b8);\r\n }",
"public static void load(){\r\n\t \ttry {\r\n\t \t\t// load and set all sprites\r\n\t\t\t\tsetBlueGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/blueGarbage.png\")));\r\n\t\t\t\tsetRank(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/rank.png\")));\r\n\t\t\t\tsetRedGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/redGarbage.png\")));\r\n\t\t\t\tsetYellowGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/yellowGarbage.png\")));\r\n\t\t\t\tsetGreenGarbage(ImageIO.read(classPath.getResourceAsStream(\"/images/greenGarbage.png\")));\r\n\t\t\t\tsetBlueSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/blueSnakeBodyPart.png\")));\r\n\t\t\t\tsetRedSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/redSnakeBodyPart.png\")));\r\n\t\t\t\tsetYellowSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/yellowSnakeBodyPart.png\")));\r\n\t\t\t\tsetGreenSnakeBodyPart(ImageIO.read(classPath.getResourceAsStream(\"/images/greenSnakeBodyPart.png\")));\r\n\t\t\t\tsetHeart(ImageIO.read(classPath.getResourceAsStream(\"/images/heart.png\")));\r\n\t\t\t\tsetGameScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/gameScreenBackground.png\")));\r\n\t\t\t\tsetGameScreenHeader(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/gameScreenHeader.png\")));\r\n\t\t\t\tsetGameOver(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/gameOver.png\")));\r\n\t\t\t\tsetHitsOwnBody(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/hitsOwnBody.png\")));\r\n\t\t\t\tsetHitsWall(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/hitsWall.png\")));\r\n\t\t\t\tsetWrongColor(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/wrongColor.png\")));\r\n\t\t\t\tsetHelpScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/helpScreenBackground.png\")));\r\n\t\t\t \tsetWarningScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/warningScreenBackground.png\")));\r\n\t\t\t \tsetOkButton(ImageIO.read(classPath.getClass().getResource(\"/images/okButton.png\")));\r\n\t\t\t \tsetMenuScreenBackground(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/menuScreenBackground.png\")));\r\n\t\t\t\tsetStartButton(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/startButton.png\")));\r\n\t\t\t\tsetExitButton(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/exitButton.png\")));\r\n\t\t\t\tsetHelpButton(ImageIO.read(classPath.getClass().getResourceAsStream(\"/images/helpButton.png\")));\r\n\t\t\t\t\r\n\t \t} \r\n\t \tcatch (Exception e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getStackTrace(), \"Erro ao carregar imagens\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t\r\n\t\t\t}\t\r\n \t\r\n \t}",
"private void loadRack() {\n buildRack();\n for (LetterTile tile : rack)\n add(tile);\n }",
"private void getTiles() {\n for (int i=0; i<rows.size(); i++) {\n LinearLayout row = rows.get(i);\n int count = row.getChildCount();\n for (int j=0; j<count; j++) {\n LinearLayout tile = (LinearLayout) row.getChildAt(j);\n TextView textView = (TextView) tile.getChildAt(1);\n String text = (String) textView.getText();\n String id = \"tile\" + text.replaceAll(\"\\\\s+\",\"\");\n tiles.put(id, tile);\n }\n }\n }",
"private void loadImages() {\n\t\ttry {\n\t\t\timage = ImageIO.read(Pillar.class.getResource(\"/Items/Pillar.png\"));\n\t\t\tscaledImage = image;\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Failed to read Pillar image file: \" + e.getMessage());\n\t\t}\n\t}",
"public static void load() {\n\t\tspritesheet = new Spritesheet(\"src/de/kaffeeliebhaber/assets/pyxel/voland_spritesheet_new.png\", 32, 32);\n\t\tspritesheet.load();\n\t\t\n\t\t// load player\n\t\tAssetsLoader.loadPlayerAssets();\n\t\t\n\t\t// load crate\n\t\tAssetsLoader.loadCrates();\n\t\t\n\t\t// load item spritesheet \n\t\tspritesheetInventory = new Spritesheet(Config.ITEM_SPRITESHEET, Config.ITEM_SIZE, Config.ITEM_SIZE);\n\t\tspritesheetInventory.load();\n\t\t\n\t\t// load font \n\t\tloadFonts();\n\t\t\n\t\t// ui\n\t\timageUI = ImageLoader.loadImage(\"src/de/kaffeeliebhaber/assets/ui/ui.png\");\n\t\t\n\t\tAssetsLoader.loadInfoPaneAssets();\n\t\t\n\t\t// npc\n\t\tspritesheetNPC = new Spritesheet(\"src/de/kaffeeliebhaber/assets/AH_SpriteSheet_People1.png\", 16, 16);\n\t\tspritesheetNPC.load();\n\t\t\n\t\t// fox\n\t\tspritesheetNPCFox = new Spritesheet(\"src/de/kaffeeliebhaber/assets/imgs/72c68863962b7a6b5a9f5f5bcc5afb16.png\", 32, 32);\n\t\tspritesheetNPCFox.load();\n\n\t\t// *** LOAD NPCs\n\t\tAssetsLoader.loadFoxAssets();\n\t\t\n\t\tAssetsLoader.loadNPCs();\n\t\t\n\t\tspritesheetFemale = new Spritesheet(\"src/de/kaffeeliebhaber/assets/imgs/Female 01-1.png\", 32, 32);\n\t\tspritesheetFemale.load();\n\t}",
"private void loadSprites(String s){\n try {\n BufferedImage spriteSheet = ImageIO.read(\n getClass().getResourceAsStream(s));\n sprites = new BufferedImage[1];\n sprites[0] = spriteSheet.getSubimage(0, 0, width, height);\n\n } catch (Exception e){\n e.printStackTrace();\n }\n\n }",
"public void loadImages() {\n\t\tcowLeft1 = new ImageIcon(\"images/animal/cow1left.png\");\n\t\tcowLeft2 = new ImageIcon(\"images/animal/cow2left.png\");\n\t\tcowLeft3 = new ImageIcon(\"images/animal/cow1left.png\");\n\t\tcowRight1 = new ImageIcon(\"images/animal/cow1right.png\");\n\t\tcowRight2 = new ImageIcon(\"images/animal/cow2right.png\");\n\t\tcowRight3 = new ImageIcon(\"images/animal/cow1right.png\");\n\t}",
"public void loadImage() {\n\t\tif (images.containsKey(name)) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tString fullPath = BASE_PATH + this.sprite_sheet;\n\t\t\tFile imageFile = new File(fullPath);\n\t\t\tImage initialImage = ImageIO.read(imageFile);\n\t\t\tImage scaledImage = initialImage.getScaledInstance(\n\t\t\t\t\tMainPanel.TILE_SIZE, MainPanel.TILE_SIZE, 0);\n\n\t\t\tBufferedImage image = new BufferedImage(scaledImage.getWidth(null),\n\t\t\t\t\tscaledImage.getHeight(null), BufferedImage.TYPE_INT_ARGB);\n\t\t\tGraphics2D imageGraphicsContext = image.createGraphics();\n\t\t\timageGraphicsContext.drawImage(scaledImage, 0, 0, null);\n\t\t\timageGraphicsContext.dispose();\n\t\t\timages.put(name, image);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Could not load image for\" + this.name);\n\t\t}\n\t}",
"public void loadPhotos(String path) {\n\t\tSet<Photo> photos = PhotoLoader.loadPhotos(path);\t\n\t\troot.addPhotosToAlbum(photos);\n\t\tpreviewPane.display(root);\n\t\tpoc.initializeSSPhoto(albumTree, tree_root);\n\t\t\n\t\t// TODO: Add photo set to the root album and display it\n\t\t\n\t}",
"private void loadJSON() throws FileNotFoundException\n\t{\n\n\t\tGsonBuilder builder= new GsonBuilder();\n\t\tGson gson = builder.create();\n\t\t\t\t\n\t\t//get a list of folders in the data directory\n\t\t\n\t\tFile[] directories = new File(\"data\").listFiles();\n\n\t\t//Loop through folders in data directory\n\t\tfor(File folder : directories)\n\t\t\t{\n\t\t\t\t//get a list of files inside the folder\n\t\t\t\tFile[] jsonItems = new File(folder.toString()).listFiles();\n\t\t\t\t\n\t\t\t\t//Loop through files inside the folder \n\t\t\t\tfor(File file : jsonItems)\n\t\t\t\t{\n\t\t\t\t\t//Store in directory map... substring to remove the \"data/\" portion... placed by filename to foldername\n\t\t\t\t\tString dir = file.toString().substring(5);\n\t\t\t\t\t\n\t\t\t\t\t//Generate player data from gson\n\t\t\t\t\tJsonReader reader = new JsonReader(new FileReader(file));\n\t\t\t\t\tPlayer player = gson.fromJson(reader, Player.class);\n\t\t\t\t\t\n\t\t\t\t\t//Store it in the map tied to it's directory\n\t\t\t\t\tplayerData.put(dir, player);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"private void tryLoadJarInDir(File dir) {\n logger.info(\"tryLoadJarInDir-dirPath:{}\",dir.getAbsoluteFile());\n // 自动加载目录下的jar包\n if (dir.exists() && dir.isDirectory()) {\n for (File file : dir.listFiles()) {\n if (file.isFile() && file.getName().endsWith(\".jar\")) {\n logger.info(\"tryLoadJarInDir-jar:{}\",file.getAbsoluteFile());\n this.addURL(file);\n continue;\n }\n }\n }\n }",
"public void loadMap(Player player) {\r\n\tregionChucks = RegionBuilder.findEmptyChunkBound(8, 8); \r\n\tRegionBuilder.copyAllPlanesMap(235, 667, regionChucks[0], regionChucks[1], 8);\r\n\t\r\n\t}",
"public void loadMedia() {\n MediaDBMapper mapper = new MediaDBMapper(ctx);\n\n String[] fileNames = {\n \"medved.jpg\",\n \"medved 2.jpg\",\n \"medved hnedy.jpg\",\n \"grizzly.jpg\",\n \"buk.jpg\",\n \"jedle.jpg\",\n \"jedle 2.jpg\"\n };\n\n File file = null;\n\n try {\n boolean autoCommit = getConnection().getAutoCommit();\n getConnection().setAutoCommit(false);\n\n try {\n\n for (String fileName : fileNames) {\n try {\n file = new File(\"resources\\\\\" + fileName);\n\n System.out.println(\"Opening: \" + file.getPath() + \".\");\n\n MediaEntity e = mapper.create();\n e.setName(file.getName().substring(0, file.getName().lastIndexOf('.')));\n\n mapper.loadImageFromFile(e, file.getPath());\n\n mapper.save(e);\n } catch (NullPointerException ex) {\n ex.printStackTrace();\n }\n\n// getConnection().commit();\n }\n\n } finally {\n getConnection().setAutoCommit(autoCommit);\n }\n } catch (SQLException ex) {\n ex.printStackTrace();\n// throw new RuntimeException(ex);\n }\n }",
"private void loadOldGame() {\n String[] moveList = readFile().split(\"\");\n Long seed = getSeedFromLoad(moveList);\n String[] moves = getMoves(moveList).split(\"\");\n\n ter.initialize(WIDTH, HEIGHT, 0, -3);\n GameWorld world = new GameWorld(seed);\n for (int x = 0; x < WIDTH; x += 1) {\n for (int y = 0; y < HEIGHT; y += 1) {\n world.world[x][y] = Tileset.NOTHING;\n }\n }\n world.buildManyRandomSq();\n GameWorld.Position pos = randomAvatarPosition(world);\n world.world[pos.x][pos.y] = Tileset.AVATAR;\n for (String s: moves) {\n if (validMove(world, s.charAt(0))) {\n move(s.charAt(0), world);\n }\n }\n String senit = \"\";\n for (int i = 0; i < moveList.length; i++) {\n senit += moveList[i];\n }\n ter.renderFrame(world.world);\n playGame(world, senit);\n }",
"@Override\n\tprotected void generateMap() {\n\t\t//read map from tmx\n\t\tmap = null;\n\t\tfinal String tmx = \"res/tiles/map.tmx\";\n\t\ttry {\n\t\t\tTMXMapReader mapReader = new TMXMapReader();\n\t\t\tmap = mapReader.readMap(tmx);\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tTileLayer layer = (TileLayer)map.getLayer(0);\n\n\t\ttiles = new PropertyTile[layer.getWidth()][layer.getHeight()];\n\t\tfor(int x=0; x<layer.getWidth(); x++) {\n\t\t\tfor(int y=0; y<layer.getHeight(); y++) {\n\t\t\t\tTile tile = layer.getTileAt(x, y);\n\t\t\t\tString type = (String)tile.getProperties().get(\"type\");\n\t\t\t\ttiles[x][y] = new PropertyTile(tile, TileType.valueOf(type.toUpperCase()));\n\t\t\t\ttiles[x][y].setImage(tile.getImage());\n\t\t\t}\n\t\t}\n\t\t\n\t\t//generate animated tiles from river tileset\n\t\tTileSet riverset = map.getTileSets().get(1);\n\t\tList<AnimatedTile> animatedTiles = new ArrayList<>();\n\t\tfor(int i=0; i<5; i++) {\n\t\t\tTile[] frames = new Tile[3];\n\t\t\tIterator<Tile> iterator = riverset.iterator();\n\t\t\twhile(iterator.hasNext()) {\n\t\t\t\tTile tile = iterator.next();\n\t\t\t\tint rtile = Integer.parseInt(tile.getProperties().getProperty(\"tile\"));\n\t\t\t\tint frame = Integer.parseInt(tile.getProperties().getProperty(\"frame\"));\n\t\t\t\tif(rtile == i+1) {\n\t\t\t\t\tframes[frame-1] = tile;\n\t\t\t\t}\n\t\t\t}\n\t\t\tAnimatedTile aTile = new AnimatedTile(frames);\n\t\t\tanimatedTiles.add(aTile);\n\t\t}\n\n\t\t//replace tiles in map with animated tiles\n//\t\tfor(int x=0; x<layer.getWidth(); x++) {\n//\t\t\tfor(int y=0; y<layer.getHeight(); y++) {\n//\t\t\t\tTile tile = layer.getTileAt(x, y);\n//\t\t\t\tif(tile.getProperties().containsKey(\"animated\")) {\n//\t\t\t\t\tint rtile = Integer.parseInt(tile.getProperties().getProperty(\"tile\"));\n//\t\t\t\t\tlayer.setTileAt(x, y, animatedTiles.get(rtile-1));\t\t\t\t\t\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\t}",
"public void loadLayers(String axl)\n throws java.rmi.RemoteException\n {\n loadLayersWithLayoutProject(axl, _layoutProj);\n }",
"public TilePanel(String filePath){\r\n\t\twidth = 80;\r\n\t\theight = 80;\r\n\t\tthis.fileString = filePath;\r\n\t\tFile fileImg = new File(filePath);\r\n\t\ttry {\r\n\t\t\tbufferedImage = ImageIO.read(fileImg);\r\n\t\t} catch (IOException e) {\r\n\t\t\tbufferedImage = null;\r\n\t\t}\r\n\t\tsetVisible(true);\r\n\t}",
"private void loadSheet() {\n\t\ttry {\n\t\t\tBufferedImage image = ImageIO.read(SpriteSheet.class\n\t\t\t\t\t.getResource(path));\n\t\t\tint w = image.getWidth();\n\t\t\tint h = image.getHeight();\n\t\t\timage.getRGB(0, 0, w, h, sheetPixles, 0, w);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"Board() {\n currentlyPlacedShip = null;\n imageMap = new TreeMap<ShipType, Image>();\n fillImageMap();\n try {\n hit = ImageIO.read(getClass().getResource(\"img/hit.gif\"));\n board = ImageIO.read(getClass().getResource(\"img/board.gif\"));\n mishit = ImageIO.read(getClass().getResource(\"img/mishit.gif\"));\n } catch(IOException e) {\n e.printStackTrace();\n }\n }",
"public void loadResources();",
"private void cacheFoldersFiles() throws Exception {\n\n ArrayList<FileManagerFile> files = new ArrayList<FileManagerFile>();\n if (fileCount > 0) {\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\");\n formatter.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\n int offset = 0;\n int count = 1000;\n List<FileManagerFile> filelist;\n\n do {\n filelist = connection.getFileManager().getFileManagerFiles(count, offset);\n offset += count;\n for (FileManagerFile file : filelist) {\n if (file.getFolderId() == id) {\n files.add(file);\n }\n }\n } while (filelist.size() > 0 && files.size() < fileCount);\n }\n this.files = files;\n }",
"public void loadArenas() {\n\t\tLogger logger = getLogger();\n\t\tFile arenaFolder = getArenaFolder();\n\t\tif (!arenaFolder.exists()) {\n\t\t\tarenaFolder.mkdirs();\n\t\t}\n\n\t\tCollection<File> arenas = FileUtils.listFiles(arenaFolder, null, false);\n\n\t\tif (arenas.isEmpty()) {\n\t\t\tlogger.info(\"No arenas loaded for \" + getName());\n\t\t\treturn;\n\t\t}\n\n\t\tfor (File file : arenas) {\n\t\t\ttry {\n\t\t\t\tArena arena = new Arena(file);\n\t\t\t\tarena.load();\n\t\t\t\tarenaManager.addArena(arena);\n\t\t\t\tlogger.info((\"Loaded arena \" + arena.toString()));\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tlogger.info(\"Unable to load arena from file: \" + file.getName());\n\t\t\t}\n\t\t}\n\n\t}",
"private void layTiles(TiledMapManager mapManager) {\n board = new Tile[height][width];\n for (int row = 0; row < height; row++) {\n for (int col = 0; col < width; col++) {\n TiledMapTile tile = mapManager.getCell(\"TILES\", row, col).getTile();\n String tileType = (String) tile.getProperties().get(\"Type\");\n Tile currentTile;\n switch (tileType) {\n case \"GEAR\":\n boolean clockwise = (boolean) tile.getProperties().get(\"Clockwise\");\n currentTile = new Gear(row, col, clockwise);\n break;\n case \"HOLE\":\n currentTile = new Hole(row, col);\n break;\n case \"DOCK\":\n int number = (Integer) tile.getProperties().get(\"Number\");\n currentTile = new Dock(number, row, col);\n docks.add((Dock) currentTile);\n break;\n case \"CONVEYOR_BELT\":\n currentTile = installConveyorBelt(mapManager, row, col);\n break;\n case \"REPAIR_SITE\":\n currentTile = new RepairSite(row, col);\n break;\n default:\n currentTile = new Tile(row, col);\n break;\n }\n layTile(currentTile);\n }\n }\n Collections.sort(docks);\n }"
] |
[
"0.76147836",
"0.69624907",
"0.6912812",
"0.6859027",
"0.64754987",
"0.61630523",
"0.6140703",
"0.61363935",
"0.6124889",
"0.60620284",
"0.60383165",
"0.6006737",
"0.59324414",
"0.58254695",
"0.5768944",
"0.57644254",
"0.573606",
"0.57342356",
"0.5709669",
"0.5632913",
"0.5548479",
"0.5545235",
"0.5541786",
"0.55365634",
"0.55174154",
"0.55142164",
"0.5513509",
"0.55040145",
"0.5468348",
"0.54462075",
"0.54278016",
"0.5427043",
"0.53999454",
"0.539935",
"0.53967243",
"0.53933764",
"0.5387519",
"0.5372768",
"0.53474873",
"0.5345388",
"0.5340835",
"0.5332663",
"0.53196627",
"0.528816",
"0.528358",
"0.52777046",
"0.52714425",
"0.52621037",
"0.525911",
"0.52366585",
"0.5224385",
"0.52232814",
"0.5208952",
"0.52011883",
"0.520084",
"0.5198092",
"0.5197748",
"0.51977456",
"0.5197069",
"0.5181794",
"0.5178297",
"0.5166768",
"0.5165982",
"0.5162364",
"0.5160505",
"0.5160113",
"0.5147212",
"0.5130622",
"0.51300615",
"0.51256126",
"0.51170653",
"0.5112786",
"0.5109241",
"0.510872",
"0.51051664",
"0.5104162",
"0.50947946",
"0.50881714",
"0.50876033",
"0.5068545",
"0.5068483",
"0.50662476",
"0.5053953",
"0.50522214",
"0.5049225",
"0.504889",
"0.50474256",
"0.5042878",
"0.50329065",
"0.50288326",
"0.5015505",
"0.5012803",
"0.5011242",
"0.5008204",
"0.5003519",
"0.4989995",
"0.4988336",
"0.49869904",
"0.49796125",
"0.49767187"
] |
0.6435767
|
5
|
Created by ZhenwenHe on 2016/12/7.
|
public interface Entry extends Serializable {
Identifier getIdentifier();
void setIdentifier(Identifier id);
Shape getShape();
void setShape(Shape s);
void setIdentifier(long id);
byte[] getData();
void setData(byte[] data);
long getDataLength();
static Entry create(Identifier identifier, Shape shape, byte[] data) {
return new EntryImpl(identifier, shape, data);
}
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n public void init() {\n }",
"@Override\n void init() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"public void mo38117a() {\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"public void mo4359a() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n public void init() {}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\n protected void getExras() {\n }",
"private void init() {\n\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {}",
"public void gored() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n protected void init() {\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\n public void initialize() { \n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"private void kk12() {\n\n\t}",
"public void mo6081a() {\n }",
"private void m50366E() {\n }",
"@Override\n public void initialize() {\n \n }",
"public void mo55254a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"Petunia() {\r\n\t\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }",
"@Override\n public int getSize() {\n return 1;\n }",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\n public void init() {\n }"
] |
[
"0.6233288",
"0.6090113",
"0.59912986",
"0.5968621",
"0.5920845",
"0.5920845",
"0.588963",
"0.5845809",
"0.5821821",
"0.58026034",
"0.57880616",
"0.5781131",
"0.5767946",
"0.5734099",
"0.57313097",
"0.5708762",
"0.5703672",
"0.5701569",
"0.5698989",
"0.5698989",
"0.5698989",
"0.5698989",
"0.5698989",
"0.5696415",
"0.5695469",
"0.5685997",
"0.56798995",
"0.5678295",
"0.56703615",
"0.5668186",
"0.565931",
"0.56536233",
"0.56379795",
"0.5627728",
"0.5627728",
"0.5608157",
"0.5608157",
"0.5606946",
"0.56013834",
"0.56013834",
"0.56013834",
"0.56013834",
"0.56013834",
"0.56013834",
"0.56010807",
"0.5600833",
"0.5600833",
"0.5600833",
"0.55904424",
"0.5588028",
"0.5571591",
"0.5571591",
"0.5565636",
"0.5565636",
"0.5565636",
"0.5562497",
"0.55617195",
"0.55617195",
"0.55617195",
"0.55564374",
"0.555149",
"0.5547648",
"0.5545497",
"0.5537274",
"0.5537052",
"0.55304295",
"0.55295885",
"0.55295885",
"0.55295885",
"0.55295885",
"0.55295885",
"0.55295885",
"0.55295885",
"0.55242604",
"0.5521454",
"0.5518225",
"0.5516033",
"0.5510867",
"0.54999536",
"0.54983777",
"0.5485333",
"0.54842746",
"0.54832065",
"0.5482279",
"0.54809564",
"0.5470886",
"0.54507065",
"0.5444388",
"0.5426291",
"0.5416661",
"0.541065",
"0.5406035",
"0.54050714",
"0.54022694",
"0.53952414",
"0.53947246",
"0.5394365",
"0.53864104",
"0.5384118",
"0.5377708",
"0.5375359"
] |
0.0
|
-1
|
This filter only applies if the header is present
|
@Override
public void doFilter(ServletRequest req, ServletResponse res, final FilterChain chain) throws IOException, ServletException {
if (StringUtils.isEmpty(((HttpServletRequest) req).getHeader(AUTH_HEADER))) {
chain.doFilter(req, res);
return;
}
//On success keep going on the chain
this.setAuthenticationSuccessHandler(new AuthenticationSuccessHandler() {
@Override
public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException {
chain.doFilter(request, response);
}
});
super.doFilter(req, res, chain);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override\n public boolean containsHeader(String arg0) {\n return false;\n }",
"default boolean hasHeader() {\n return true;\n }",
"boolean hasHeader();",
"boolean isSetHeader();",
"default boolean visitHeader() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean containsHeader(String name) {\n\t\treturn false;\n\t}",
"private boolean shouldCleanHeader(String header) {\n for(String skipHeader : CLEAN_HEADERS) {\n if(header.contains(skipHeader)){\n return true;\n }\n }\n return false;\n }",
"boolean containsHeader(String name);",
"@Override\n public boolean containsHeader(String name) {\n return this._getHttpServletResponse().containsHeader(name);\n }",
"public boolean hasHeader() {\n return hasHeader;\n }",
"public boolean isHeaderParsed();",
"public Optional<String> header(String header) {\n return this.header.getHeader(header);\n }",
"@Test\n public void testGetHeadersByFilter_whenFiltersIsNull() {\n\n MockHttpServletRequest request = new MockHttpServletRequest();\n request.addHeader(\"cookie\", \"JSESSIONID=276D58AC17ABB217997C59EA33414274\");\n request.addHeader(\"accept\", \"text/html\");\n\n List<String> filters = null;\n Map<String, List<String>> expResult = new HashMap<>();\n\n HeadersService instance = new HeadersService();\n Map<String, List<String>> result = instance.getHeadersByFilter(request, filters);\n assertEquals(expResult, result);\n }",
"public void forceNotInsideHeader() {\n insideHeader = false;\n }",
"public boolean isHeader() {\n\t \treturn this == HEADER;\n\t }",
"@Test(priority=5)\r\n\tpublic void validateHeader()\r\n\t{\r\n\t\tgiven()\r\n\t\t.get(\"https://reqres.in/api/users/2\")\r\n\t\t.then() \r\n\t \t.header(\"Content-Type\", containsString(\"application/json\")); \r\n\t\t//application/json; charset=utf-8 \r\n\t}",
"public boolean isHeader() {\n return isHeader;\n }",
"private void serverHeader(\n HttpHeaderFW header)\n {\n serverHeader |= header.name().value().equals(context.nameBuffer(54));\n }",
"public void setHeader(boolean isHeader) {\n this.isHeader = isHeader;\n }",
"public boolean modifyHeaderContent(Header header);",
"@Test\n public void testIncludeHeaderDelimited() throws Throwable {\n testIncludeHeaderDelimited(false);\n }",
"@Override\r\n\tpublic void filter(ContainerRequestContext arg0, ContainerResponseContext responseContexet) throws IOException {\n\t\tresponseContexet.getHeaders().add(\"X-Powered-by\", \"Nikhil Joy\");\r\n\t\t\r\n\t}",
"@Override\n\t\tpublic String getHeader(String name) {\n\t\t\treturn null;\n\t\t}",
"@Override\n\tprotected Boolean isHeader(String[] fields) {\n\t\t//check\n return (isValid(fields) && fields[0].equals(\"event\") && fields[1].equals(\"yes\") && fields[2].equals(\"maybe\") && fields[3].equals(\"invited\") && fields[4].equals(\"no\"));\n\t}",
"public boolean getHeader() {\n return isHeader;\n }",
"public void setHeader(String header) {\n this.header = header;\n }",
"public HeadersRequestCondition getHeadersCondition()\n/* */ {\n/* 141 */ return this.headersCondition;\n/* */ }",
"boolean isHeader(int position);",
"java.lang.String getHeader();",
"private boolean inspectHeader() throws UrlCacheException {\n\n\t\tif(header.contains(\"HTTP/1.1 2\")){\n\t\t\treturn true;\n\t\t}\n\t\telse if(header.contains(\"HTTP/1.1 304\"))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tthrow new UrlCacheException();\n\t\t\n\t}",
"@Test\n public void testIncludeHeaderCSV() throws Throwable {\n testIncludeHeaderCSV(false);\n }",
"public static void checkValidHeader(String header)\n throws DataConversionException {\n String[] headerCheck = header.split(\";\", CsvAdaptedPerson.ATTRIBUTE_ORDERING.keySet().size());\n String[] headerValid = CsvAdaptedPerson.headerOrder();\n\n if (headerCheck.length == 1) {\n throw new DataConversionException(\"Wrong delimiter, Refer to user guide to use correct \"\n + \"delimiter.\\nEach row should have \"\n + (CsvAdaptedPerson.ATTRIBUTE_ORDERING.keySet().size() - 1) + \" ';' \");\n }\n\n if (headerCheck.length != headerValid.length) {\n throw new DataConversionException(\"Missing/Extra Headers, Please check file\");\n }\n\n for (int i = 0; i < headerValid.length; i++) {\n String upperHeader = headerCheck[i].toUpperCase(Locale.ROOT);\n String upperValidHeader = headerValid[i].toUpperCase(Locale.ROOT);\n\n if (!(upperHeader.contains(upperValidHeader))) {\n throw new DataConversionException(\"Wrong header detected,\"\n + \"please double check file\\nFirst row of csv must contain valid headers \"\n + Arrays.toString(headerValid) + \" in that order.\");\n }\n }\n }",
"protected void addDynamicHeaders() {\n }",
"public abstract boolean isFirstLineHeader();",
"@Override\n public void filter(ContainerRequestContext requestContext) throws IOException {\n String authorizationHeader = requestContext.getHeaderString(HttpHeaders.AUTHORIZATION);\n\n // Check if the HTTP Authorization header is present and formatted correctly\n if (authorizationHeader == null || !authorizationHeader.startsWith(\"Bearer \")) {\n throw new NotAuthorizedException(\"Authorization header must be provided\");\n }\n\n // Extract the token from the HTTP Authorization header\n String token = authorizationHeader.substring(\"Bearer\".length()).trim();\n\n // Validate the token\n if (!userService.validateToken(token)) {\n requestContext.abortWith(Response.status(Response.Status.UNAUTHORIZED).build());\n }\n }",
"@Test\n\tpublic void verifyHeader() {\n\t\t\tHeaders head = response.getHeaders();\n\t\t\tAssert.assertEquals(head.getValues(\"Content-Type\").toString(), \"[application/json; charset=utf-8]\");\n\t\t}",
"@Override\n\tpublic synchronized boolean writeHeader() {\n\t\tif(!trailerWritten) \n\t\t{\n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\tsuper.writeHeader();\n\t\t\tlong diff = System.currentTimeMillis() - startTime;\n\t\t\tlogger.info(\"write header takes {} for rtmp:{}\", diff, getOutputURL());\n\t\t\t\n\t\t\theaderWritten = true;\n\t\t\tsetStatus(IAntMediaStreamHandler.BROADCAST_STATUS_BROADCASTING);\n\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\tlogger.warn(\"Trying to write header after writing trailer\");\n\t\t\treturn false;\n\t\t}\n\t}",
"@GET\n @Path(\"condition-one\")\n public String getConditionOne(@HeaderParam(ConditionalOneFilter.HEADER) String header,\n @HeaderParam(ConditionalTwoFilter.HEADER) String header1) {\n return \"[Conditional One Header]: \" + header + \" [Conditional Two Header]: \" + header1;\n }",
"private boolean parseHeaders() {\n\n // headers have format:\n // key: value CRLF\n\n // the list ends with an empty CRLF\n\n // so you can process headers as long as you have CRLFs\n\n // put each header in this.request.getHeaders()\n\n // return true if you encounter a CRLF on an empty line\n\n // don't forget to consume the used lines from the buffer\n\n return false;\n }",
"public void cut_header()\n {\n String [] content= header.split(\"-\"); //cut one of the header when forward message back\n header=null;\n for(int i=0;i<content.length-1;i++)\n {\n header=header+\"-\"+content[i];\n }\n }",
"public boolean containsHeader(String s) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic void renderHead(IHeaderResponse response)\n\t{\n\t\tfinal JavaScriptResourceReference topJsReference = new JavaScriptResourceReference(\n\t\t\tFilteredHeaderPage.class, \"top.js\");\n\t\tresponse.render(new FilteredHeaderItem(JavaScriptHeaderItem.forReference(topJsReference),\n\t\t\tFilteringHeaderResponse.DEFAULT_HEADER_FILTER_NAME));\n\n\t\t// rendered at the bottom of the body bucket\n\t\tJQueryPluginResourceReference bottomJs = new JQueryPluginResourceReference(\n\t\t\tFilteredHeaderPage.class, \"bottom.js\")\n\t\t{\n\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\t@Override\n\t\t\tpublic List<HeaderItem> getDependencies()\n\t\t\t{\n\t\t\t\tList<HeaderItem> dependencies = super.getDependencies();\n\n\t\t\t\t// WICKET-4566 : depend on a resource which is rendered in a different bucket\n\t\t\t\tdependencies.add(JavaScriptHeaderItem.forReference(topJsReference));\n\t\t\t\treturn dependencies;\n\t\t\t}\n\t\t};\n\t\tresponse.render(JavaScriptHeaderItem.forReference(bottomJs));\n\t}",
"@Test\n public void testEmptyResponseHeaderValidity() {\n assertFalse(\"Valid header on empty response.\", EMPTY.isHeaderValid());\n }",
"public void setHeader(String header) {\n\t\tthis.header = header;\n\t}",
"@Override\n protected void doFilterInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, FilterChain filterChain) throws ServletException, IOException {\n\n String header = httpServletRequest.getHeader(jwtConfig.getHeader());\n\n\n //if(header == null || !header.startsWith(jwtConfig.getPrefix())) {\n // filterChain.doFilter(httpServletRequest, httpServletResponse); \t\t// If not valid, go to the next filter.\n // return;\n // }\n\n\n try{\n String token = header.replace(jwtConfig.getPrefix(), \"\");\n String username = jwtUtils.extractUsername(token);\n\n System.out.println(username);\n\n if (username != null && SecurityContextHolder.getContext().getAuthentication() == null) {\n if (jwtUtils.validateToken(token)) {\n\n UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken = new UsernamePasswordAuthenticationToken(username, null, null);\n usernamePasswordAuthenticationToken.setDetails(token);\n SecurityContextHolder.getContext().setAuthentication(usernamePasswordAuthenticationToken);\n System.out.println(username);\n }\n }\n\n }catch(Exception e){\n SecurityContextHolder.clearContext();\n }\n\n filterChain.doFilter(httpServletRequest, httpServletResponse);\n }",
"@Override\n public StreamHeader getHeader() throws Exception {\n return header;\n }",
"public static boolean isRequestHeader(SIPHeader sipHeader) {\n return sipHeader instanceof AlertInfo ||\n sipHeader instanceof InReplyTo ||\n sipHeader instanceof Authorization ||\n sipHeader instanceof MaxForwards ||\n \tsipHeader instanceof UserAgent ||\n sipHeader instanceof Priority ||\n sipHeader instanceof ProxyAuthorization ||\n sipHeader instanceof ProxyRequire ||\n sipHeader instanceof ProxyRequireList ||\n sipHeader instanceof Route ||\n sipHeader instanceof RouteList ||\n sipHeader instanceof Subject ;\n \n }",
"private void filterAndHandleRequest () {\n\t// Filter the request based on the header.\n\t// A response means that the request is blocked.\n\t// For ad blocking, bad header configuration (http/1.1 correctness) ... \n\tHttpHeaderFilterer filterer = proxy.getHttpHeaderFilterer ();\n\tHttpHeader badresponse = filterer.filterHttpIn (this, channel, request);\n\tif (badresponse != null) {\n\t statusCode = badresponse.getStatusCode ();\n\t sendAndClose (badresponse);\n\t} else {\n\t status = \"Handling request\";\n\t if (getMeta ())\n\t\thandleMeta ();\n\t else\n\t\thandleRequest ();\n\t}\n }",
"protected boolean hasColumn(String header){\n return hasColumn(header, false);\n }",
"String getHeader(HttpServletRequest request, String name) throws ValidationException;",
"private void initHeader(boolean newHeader) throws IOException {\n\n if (newHeader) writeHeader();\n /*\n if (rafShp.read() == -1) { \n //File is empty, write a new one (what else???)\n writeHeader();\n } \n */ \n readHeader();\n }",
"public void setHeader(String _header) {\n\t\tthis.header = _header;\n\t}",
"public boolean isSetHeaders() {\n return this.headers != null;\n }",
"public void filter(ContainerRequestContext request) throws IOException {\n\t\tString authorization = request.getHeaderString(HttpHeaders.AUTHORIZATION);\n\n\t\t// We start by looking if we got an valid authorization header.\n\t\tif(authorization == null || !authorization.startsWith(\"Bearer \")) {\n\t\t\tthrow new NotAuthorizedException(\"Invalid JWT authorization header.\");\n\t\t}\n\n\t\t// If valid header, then we extract the token from the `Bearer`.\n\t\tauthorization = authorization.substring(\"Bearer \".length()).trim();\n\n\t\ttry {\n\t\t\t// We check if the key is parsing the signing.\n\t\t\tJwtGuard guard = (JwtGuard) this.guardProvider.get();\n\t\t\tguard.setToken(authorization);\n\n\t\t\trequest.setSecurityContext(guard);\n\n\t\t} catch (JWTException|InvalidCredentials e) {\n\t\t\t// If the signature is invalid, then we respond with an unauthorized.\n\t\t\tthrow new NotAuthorizedException(\"Invalid JWT token.\");\n\t\t}\n\n\t}",
"@Override\n\tpublic boolean match(Request request) {\n\t\tString header = request.getHeader(HEADER_AUTHORIZATION);\n\t\treturn (header != null)\n\t\t\t&& (Pattern.matches(\"^\\\\s*(OAuth|Bearer)(.*)$\", header));\n\t}",
"public boolean isEmpty()\r\n{\r\n return header == null;\r\n}",
"public boolean isValid() {\n return header.isValid();\n }",
"public void setHeader(String header) {\n\t\t_header = header;\n\t}",
"public boolean hasReqHeaders() {\n return fieldSetFlags()[5];\n }",
"public boolean updatePolicyHeader(HttpServletRequest request, PolicyHeader policyHeader) {\r\n Logger l = LogUtils.getLogger(getClass());\r\n if (l.isLoggable(Level.FINER)) {\r\n l.entering(getClass().getName(), \"updatePolicyHeader\", new Object[]{policyHeader});\r\n }\r\n\r\n boolean hasRisk = true;\r\n\r\n try {\r\n //Try to load risk header\r\n String riskId = request.getParameter(RequestIds.RISK_ID);\r\n // If the riskId is not specified, the first riskId is loaded.\r\n policyHeader = getRiskManager().loadRiskHeader(policyHeader, riskId);\r\n }\r\n catch (AppException ae) {\r\n hasRisk = false;\r\n }\r\n\r\n if (policyHeader.hasRiskHeader()) {\r\n //Load the coverage header if coverageId is existing in the request.\r\n String coverageId = request.getParameter(RequestIds.COVERAGE_ID);\r\n if (coverageId != null && Long.parseLong(coverageId) > 0) {\r\n policyHeader = getCoverageManager().loadCoverageHeader(policyHeader, coverageId);\r\n }\r\n }\r\n\r\n if (l.isLoggable(Level.FINER)) {\r\n l.exiting(getClass().getName(), \"updatePolicyHeader\", hasRisk);\r\n }\r\n return hasRisk;\r\n }",
"@Override\r\n\tpublic void filter(ContainerRequestContext requestContext) throws IOException {\n\t String authorizationHeader = \r\n\t requestContext.getHeaderString(HttpHeaders.AUTHORIZATION);\r\n\t \r\n\t // Check if the HTTP Authorization header is present and formatted correctly\r\n\t if (authorizationHeader != null && authorizationHeader.startsWith(\"Bearer \")) {\r\n\t \t\r\n\t \t//abgelaufene Tokens werden gelöscht\r\n\t \tsservice.deleteInvalidTokens();\r\n\t \t\r\n\t \t// Extract the token from the HTTP Authorization header\r\n\t \tString token = authorizationHeader.substring(\"Bearer\".length()).trim();\r\n\t \tif (validateToken(token) == true){\r\n\t \t\t\r\n\t \t\t//Get the user by this token\r\n\t \t User user = authService.getUserByToken(token);\r\n\t \t System.out.println(\"Nutzer: \" + user.toString());\r\n\t \t requestContext.setSecurityContext(new MySecurityContext(user));\r\n\t \t return;\r\n\t \t}\r\n\t }\r\n\t \r\n\t throw new UnauthorizedException(\"Client has to be logged in to access the ressource\");\r\n\t \r\n\t\t\r\n\t}",
"private HeaderUtil() {}",
"@Override\n public String getHeader(String name) {\n if (name.equalsIgnoreCase(\"Authorization\")) {\n return getAuthorizationHeader();\n } else {\n return super.getHeader(name);\n }\n }",
"protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName, Object headerValue) {\n return headerValue != null;\n }",
"@attribute(value = \"\", required = false, defaultValue = \"default value is false\")\r\n\tpublic void setHeader(Boolean isHeader) {\r\n\t\tthis.header = isHeader;\r\n\t}",
"@Test\n\tpublic void test_bad_Request_if_bad_header() throws Exception {\n\n\t\tString fileName = \"sample.csv\";\n\t\tMockMultipartFile file = new MockMultipartFile(\"file\", fileName, \"text/csv\",\n\t\t\t\t(\"name, emailId, contactNumber, street, city, state, country\\r\\n\"\n\t\t\t\t\t\t+ \"testname, [email protected], 9876543210, testStreet, testCity, testState, testCountry\\r\\n\")\n\t\t\t\t\t\t\t\t.getBytes());\n\n\t\tMockMultipartHttpServletRequestBuilder multipartRequest = MockMvcRequestBuilders\n\t\t\t\t.multipart(\"/api/v1/client/upload-csv\");\n\n\t\tmockMvc.perform(multipartRequest.file(file).header(\"userId\", \"abc\")).andExpect(status().isBadRequest())\n\t\t\t\t.andExpect(jsonPath(\"$.message\", is(\"Malformed Header\")));\n\n\t}",
"public void setHeader(String header) {\n this.header = header == null ? null : header.trim();\n }",
"protected abstract boolean isAddAdapterHeader();",
"public boolean skipHeader() {\n return skipHeader;\n }",
"@Override\n public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {\n String usuario = null, jwt = null;\n usuario = ((HttpServletRequest) request).getHeader(\"usuario\");\n jwt = ((HttpServletRequest) request).getHeader(\"jwt\");\n SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256;\n Key signingKey = new SecretKeySpec(\"_DKt2FRF3Woq1Eub-cmRO24iHzxoWw7t2ZFuAG10zzX5K77Py82IZn6VNu_ZXbgi\".getBytes(), signatureAlgorithm.getJcaName());\n\n try {\n if(usuario != null && jwt != null){\n Jwts.parser().setSigningKey(signingKey).parseClaimsJws(jwt);\n }else{\n throw new SignatureException(\"No autenticado\");\n }\n //OK, we can trust this JWT\n } catch (SignatureException e) {\n ((HttpServletResponse)response).setStatus(403);\n try(ServletOutputStream out = response.getOutputStream()){\n out.println(\"{\\\"mensaje\\\":\\\"El usuario no está autenticado\\\"}\");\n }\n return;\n }\n chain.doFilter(request, response);\n }",
"String getHeader(String headerName);",
"@Override\n public boolean filterAuthenticated(final ContainerRequestContext requestContext, final String authHeader) {\n if (authHeader.length() <= MAX_SIZE_AUTH_HEADER && goodAuths.getIfPresent(authHeader) != null) {\n // fast track - we have successfully authenticated this one before\n return false; // OK\n }\n\n // must have valid authentication - first, check allowed size (depending on method)\n final int firstSpace = authHeader.indexOf(' ');\n if (firstSpace <= 0) {\n throwForbidden(requestContext);\n return true; // filtered\n }\n final String typeOfAuth = authHeader.substring(0, firstSpace + 1); // add 1 because the constant includes the space\n final String authParam = authHeader.substring(firstSpace + 1);\n final int authLength = authParam.length();\n\n try {\n switch (typeOfAuth) {\n case T9tConstants.HTTP_AUTH_PREFIX_JWT:\n if (!allowAuthJwt()) {\n throwForbidden(requestContext);\n return true; // filtered\n }\n if (authLength < 10 || authLength > 4096) { // || !BASE64_PATTERN.matcher(authParam).matches()) {\n LOGGER.debug(\"Invalid JWT - length {}\", authLength);\n throwForbidden(requestContext);\n return true; // filtered\n }\n return filterJwt(requestContext, authHeader, authParam);\n case T9tConstants.HTTP_AUTH_PREFIX_API_KEY:\n if (!allowAuthApiKey() || authLength != 36 || !UUID_PATTERN.matcher(authParam).matches()) {\n LOGGER.debug(\"Invalid UUID - length {}\", authLength);\n throwForbidden(requestContext);\n return true; // filtered\n }\n return filterApiKey(requestContext, authHeader, authParam);\n case T9tConstants.HTTP_AUTH_PREFIX_USER_PW:\n if (!allowAuthBasic() || authLength < 8 || authLength > 80 || !BASE64_PATTERN.matcher(authParam).matches()) {\n throwForbidden(requestContext);\n return true; // filtered\n }\n return filterBasic(requestContext, authHeader, authParam);\n }\n } catch (final Throwable e) {\n LOGGER.warn(\"Caller caused exception: {}\", ExceptionUtil.causeChain(e));\n }\n throwForbidden(requestContext);\n return true; // filtered\n }",
"public boolean hasHeader(String headerName) {\n return nameTable.containsKey(headerName.toLowerCase());\n }",
"public boolean hasHeaders() {\n return (mHeaders != null);\n }",
"public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)\r\n throws IOException, ServletException {\r\n filterChain.doFilter(servletRequest, new HttpServletResponseWrapper((HttpServletResponse) servletResponse) {\r\n public void setHeader(String name, String value) {\r\n if (!HTTPCacheHeader.ETAG.getName().equalsIgnoreCase(name)) {\r\n super.setHeader(name, value);\r\n }\r\n }\r\n });\r\n }",
"@Override\n public boolean shouldFilter() {\n return true;\n }",
"protected void initializeHeader() throws PiaRuntimeException, IOException{\n try{\n super.initializeHeader();\n if( firstLineOk && headersObj == null ){\n\t// someone just give us the first line\n\theadersObj = new Headers();\n }\n }catch(PiaRuntimeException e){\n throw e;\n }catch(IOException ioe){\n throw ioe;\n }\n }",
"protected void updateHeader() {\n\t}",
"@Description(\"request has header '{name}' with value '{value}'\")\n public static Criteria<HarEntry> recordedRequestHeader(@DescriptionFragment(\"name\") String name,\n @DescriptionFragment(\"value\") String value) {\n checkArgument(isNotBlank(name), \"Request header name should be defined\");\n checkArgument(isNotBlank(value), \"Request header value should be defined\");\n\n return condition(entry -> {\n List<HarHeader> requestHeaders = entry.getRequest().getHeaders();\n\n return ofNullable(requestHeaders)\n .map(reqHeaders ->\n reqHeaders.stream()\n .filter(param -> Objects.equals(param.getName(), name))\n .map(HarHeader::getValue)\n .anyMatch(value::equals))\n .orElse(false);\n });\n }",
"@Bean\n public FilterRegistrationBean<ForwardedHeaderFilter> forwardedHeaderFilter() {\n final FilterRegistrationBean<ForwardedHeaderFilter> filterRegistrationBean = new FilterRegistrationBean<>();\n filterRegistrationBean.setFilter(new ForwardedHeaderFilter());\n filterRegistrationBean.setOrder(Ordered.HIGHEST_PRECEDENCE);\n return filterRegistrationBean;\n }",
"@Override\n\tpublic boolean shouldFilter() {\n\t\treturn true;\n\t}",
"public boolean containsHeader(String headerName)\n\t{\n\t\treturn this.headers.containsKey(headerName.toLowerCase());\n\t}",
"@Test\n\tpublic void test_bad_Request_if_no_header() throws Exception {\n\n\t\tString fileName = \"sample.csv\";\n\t\tMockMultipartFile file = new MockMultipartFile(\"file\", fileName, \"text/csv\",\n\t\t\t\t(\"name, emailId, contactNumber, street, city, state, country\\r\\n\"\n\t\t\t\t\t\t+ \"testname, [email protected], 9876543210, testStreet, testCity, testState, testCountry\\r\\n\")\n\t\t\t\t\t\t\t\t.getBytes());\n\n\t\tMockMultipartHttpServletRequestBuilder multipartRequest = MockMvcRequestBuilders\n\t\t\t\t.multipart(\"/api/v1/client/upload-csv\");\n\n\t\tmockMvc.perform(multipartRequest.file(file)).andExpect(status().isBadRequest()).andExpect(jsonPath(\"$.message\",\n\t\t\t\tis(\"Required request header 'userId' for method parameter type Long is not present\")));\n\n\t}",
"@Override\r\n public boolean hasNext() {\n return returned.next != header;\r\n }",
"protected Yst_Bapi_Req_HdrType prepareHeader(ABERequest request) {\n\t\tYst_Bapi_Req_HdrType header = new Yst_Bapi_Req_HdrType();\n\t\tif (request.isAirRequested()) {\n\t\t\tif (request.isMultiDestinationRequest()) {\n\t\t\t\theader.setFlights_Ind(\"2\");\n\t\t\t} else {\n\t\t\t\theader.setFlights_Ind(\"1\");\n\t\t\t}\n\t\t}\n\t\tif (request.isHotelRequested()) {\n\t\t\theader.setHotels_Ind(\"1\");\n\t\t}\n\t\tif (request.isVehicleRequested()) {\n\t\t\theader.setVehicle_Ind(\"1\");\n\t\t}\n\t\tif (request.getPromoCode() != null) {\n\t\t\theader.setPromo_Code(request.getPromoCode());\n\t\t}\n\t\tif (request.getBookingNo() != null\n\t\t\t\t&& !\"\".equals(request.getBookingNo())) {\n\t\t\theader.setBooking_Num(request.getBookingNo());\n\t\t}\n\t\t// Set show all flag, if passed\n\t\tif (request instanceof PackagesRequest) {\n\t\t\tPackagesRequest pRequest = (PackagesRequest) request;\n\t\t\tif (pRequest.getHotelsRequest() != null\n\t\t\t\t\t&& pRequest.getHotelsRequest().getHotelOptions() != null\n\t\t\t\t\t&& pRequest.getHotelsRequest().getHotelOptions()\n\t\t\t\t\t\t\t.isShowAll()) {\n\t\t\t\theader.setShow_All(\"X\");\n\t\t\t}\n\t\t}\n\n\t\treturn header;\n\t}",
"@Override\n\tpublic Collection<String> getHeaderNames() {\n\t\treturn null;\n\t}",
"@Override\n\tprotected void doFilterInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse,\n\t\t\tFilterChain filterChain) throws ServletException, IOException {\n\t\tfinal String header = httpServletRequest.getHeader(\"authorization\");\n\t\tif (\"OPTIONS\".equals(httpServletRequest.getMethod())) {\n\t\t\thttpServletResponse.setStatus(HttpServletResponse.SC_OK);\n\t\t} else {\n\t\t\tif (header == null || !header.startsWith(\"Bearer\")) {\n\t\t\t\tthrow new ServletException(\"Missing or Invalid authorization header\");\n\t\t\t}\n\t\t\tfinal String token = header.substring(7);\n\t\t\tfinal Claims claims = Jwts.parser().setSigningKey(\"secret\").parseClaimsJws(token).getBody();\n\t\t\thttpServletRequest.setAttribute(\"claims\", claims);\n\t\t}\n\t\tfilterChain.doFilter(httpServletRequest, httpServletResponse);\n\n\t}",
"com.didiyun.base.v1.Header getHeader();",
"public boolean isEmpty()\r\n/* 381: */ {\r\n/* 382:552 */ return this.headers.isEmpty();\r\n/* 383: */ }",
"@Test\n\t\tpublic void testAddHeader() throws Exception{\n\t\t\temail.addHeader(this.goodHeaderName, this.goodHeaderValue);\n\t\t}",
"public VCFFilterHeaderLine(final String name) {\n super(\"FILTER\", name, name);\n }",
"@Override\n protected void doFilterInternal(HttpServletRequest request,\n HttpServletResponse response,\n FilterChain filterChain) throws ServletException, IOException {\n if (TcServletUtils.isXmlHttpRequest(request)) {\n Optional<Cookie> cookieOptional = Arrays.stream(request.getCookies())\n .filter(cookie -> Objects.equals(cookie.getName(), XSRF_TOKEN_COOKIE_NAME))\n .findAny();\n // no cookie, yes header -> impossible\n // yes cookie, no header -> not a correct req\n // no cookie, no header -> pass\n // yes cookie, yes header -> go to verify\n if (cookieOptional.isPresent()) {\n Cookie cookie = cookieOptional.get();\n String header = request.getHeader(XSRF_TOKEN_HEADER_NAME);\n if (Objects.isNull(header)) {\n log.warn(\"req [{}] has xsrf cookie but do not pass a xsrf token in xml http req, not a valid req\",\n request.getRequestURI());\n response.sendError(HttpStatus.FORBIDDEN.value(), \"拒绝服务\");\n return;\n }\n if (!Objects.equals(cookie.getValue(), header)) {\n log.warn(\"req [{}] has xsrf cookie and xsrf token but they are not match\", request.getRequestURI());\n response.sendError(HttpStatus.FORBIDDEN.value(), \"拒绝服务\");\n return;\n }\n }\n }\n filterChain.doFilter(request, response);\n }",
"@Override \n public String getHeader(String name) { \n String value = super.getHeader(encodeXSS(name)); \n //the following sentences will be replaced by logging sentence in actual project \n //System.out.println(\"The original value received from getHeader() is:\"+value); \n if (value != null) { \n value = encodeXSS(value); \n } \n \n //the following sentences will be replaced by logging sentence in actual project \n // System.out.println(\"After handling XSS ,the actual value is:\"+value); \n // System.out.println(); \n \n return value; \n }",
"public boolean validImageHeader() {\n\t\treturn input.validHeader(list.get(0));\n\t}",
"public boolean isFixedHeaders() {\n return fixedHeaders;\n }",
"Rule Header() {\n // Push 1 HeaderNode onto the value stack\n return Sequence(\n FirstOf(\n Include(),\n CppInclude(),\n Namespace()),\n actions.pushHeaderNode());\n }",
"public void setRequestHeader(Header header) {\n \n Header[] headers = getRequestHeaderGroup().getHeaders(header.getName());\n \n for (int i = 0; i < headers.length; i++) {\n getRequestHeaderGroup().removeHeader(headers[i]);\n }\n \n getRequestHeaderGroup().addHeader(header);\n \n }",
"private void processHeader(String header) {\n this.header = header + System.lineSeparator(); // Store the header for writing back.\n\n String[] headers = header.split(\"\\\",\\\"\");\n for (int i = 0; i < headers.length; i++) {\n String columnName = headers[i].replaceAll(\"\\\"\", \"\");\n this.headerMap.put(i, columnName);\n }\n }",
"private static void compareVersioningHeader(Object headerValue, HttpResponse<InputStream> jsonResponse) {\n AbstractMap<String, String> headersToTest = RequestAnswer.parser(headerValue);\n resultVersioningHeader = new HashMap<>();\n resultVersioningHeader.put(\"Versioning test\", null);\n for (Map.Entry<String, String> entry : headersToTest.entrySet()) {\n if (jsonResponse.getHeaders().keySet().contains(entry.getKey().toLowerCase())) {\n resultVersioningHeader.put(entry.getKey(), jsonResponse.getHeaders().get(entry.getKey().toLowerCase()).contains(entry.getValue()));\n } else {\n resultVersioningHeader.put(entry.getKey(), false);\n }\n }\n }",
"@Override\n public void addHeader(String arg0, String arg1) {\n\n }"
] |
[
"0.712938",
"0.6939474",
"0.6841952",
"0.67847407",
"0.6606595",
"0.65420926",
"0.65146965",
"0.63771164",
"0.6356325",
"0.63313025",
"0.6149961",
"0.60423166",
"0.6038385",
"0.6032921",
"0.5995744",
"0.5990034",
"0.5918734",
"0.5838035",
"0.58361113",
"0.57949924",
"0.5785772",
"0.57625365",
"0.5748511",
"0.5746051",
"0.5720082",
"0.56816065",
"0.56806386",
"0.5680205",
"0.56489515",
"0.56369853",
"0.56141436",
"0.56048393",
"0.5596536",
"0.5575894",
"0.5568607",
"0.55670255",
"0.55652034",
"0.55625576",
"0.55599463",
"0.5557884",
"0.55524904",
"0.5542607",
"0.55381495",
"0.5537276",
"0.5528188",
"0.55274016",
"0.5516696",
"0.5512028",
"0.55058515",
"0.55012333",
"0.54987746",
"0.54869044",
"0.547776",
"0.5474246",
"0.54535854",
"0.5448349",
"0.5436202",
"0.5421142",
"0.541731",
"0.5413619",
"0.5401185",
"0.5394454",
"0.538363",
"0.5381989",
"0.53743154",
"0.5371623",
"0.5370903",
"0.53708136",
"0.5367549",
"0.5352359",
"0.5348949",
"0.53377146",
"0.5336704",
"0.5334838",
"0.53295887",
"0.53197694",
"0.5319648",
"0.53135425",
"0.53079957",
"0.5304353",
"0.52873445",
"0.5286003",
"0.5283131",
"0.5277615",
"0.5275877",
"0.527562",
"0.5273456",
"0.5272575",
"0.52703756",
"0.52674097",
"0.52640045",
"0.525781",
"0.5257398",
"0.5253778",
"0.525207",
"0.5250572",
"0.523626",
"0.5234695",
"0.52322364",
"0.52178407"
] |
0.5251931
|
95
|
required .cn.mxz.protocols.user.PropsPro received = 1198031;
|
boolean hasReceived();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"frame.game.proto.User.UserInfo getUser();",
"frame.game.proto.User.UserInfo getUser();",
"void mo23214a(Message message);",
"@Override public java.lang.String getUserAvaibility(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\njava.lang.String _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getUserAvaibility, _data, _reply, 0);\n_reply.readException();\n_result = _reply.readString();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}",
"@Override public int[] getSupportedPresenceStatus() throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nint[] _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\nmRemote.transact(Stub.TRANSACTION_getSupportedPresenceStatus, _data, _reply, 0);\n_reply.readException();\n_result = _reply.createIntArray();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}",
"@Override\r\n\tpublic void messageReceived(Object obj) {\n\t\t\r\n\t}",
"private SigmaProtocolMsg receiveMsgFromProver() throws ClassNotFoundException, IOException {\n\t\tSerializable msg = null;\n\t\ttry {\n\t\t\t//receive the mesage.\n\t\t\tmsg = channel.receive();\n\t\t} catch (IOException e) {\n\t\t\tthrow new IOException(\"failed to receive the a message. The thrown message is: \" + e.getMessage());\n\t\t}\n\t\t//If the given message is not an instance of SigmaProtocolMsg, throw exception.\n\t\tif (!(msg instanceof SigmaProtocolMsg)){\n\t\t\tthrow new IllegalArgumentException(\"the given message should be an instance of SigmaProtocolMsg\");\n\t\t}\n\t\t//Return the given message.\n\t\treturn (SigmaProtocolMsg) msg;\n\t}",
"public void upcall(ReadMessage m) {\n \tObject mesg;\r\n \t\r\n try {\r\n mesg = m.readObject();\r\n } catch (ClassNotFoundException e) {\r\n mesg = null;\r\n } catch (IOException e) {\r\n mesg = null;\r\n e.printStackTrace();\r\n } catch (Throwable th) {\r\n mesg = null;\r\n th.printStackTrace();\r\n }\r\n\r\n IbisIdentifier ii = m.origin().ibisIdentifier();\r\n\r\n if (mesg != null) {\r\n ProcessIdentifier pi = new ProcessIdentifier(ii);\r\n if (mesg instanceof RepMILTMMessage) {\r\n\r\n // DEBUG\r\n /* System.err.println(\"Got RepMI upcall of type \"\r\n + ((RepMILTMMessage) mesg).arg.getType() + \" from \"\r\n + m.origin().name());\r\n*/\r\n if (((RepMILTMMessage) mesg).arg.getType() == Operation.LW)\r\n ((RepMILTMMessage) mesg).arg.setType(Operation.RW);\r\n\r\n /* i might not do communication, so i delay the call to m.finish */\r\n proto.processRemoteOperation(((RepMILTMMessage) mesg).arg,\r\n ((RepMILTMMessage) mesg).localLTM, pi, m);\r\n return;\r\n\r\n } else if (mesg instanceof RepMIJoinMessage) {\r\n\r\n// DEBUG\r\n /* System.err.println(\"Got RepMI upcall for joining from \"\r\n + m.origin().name());\r\n */\r\n /*\r\n * needs to be called to release the thread before entering the\r\n * processJoin call which will broadcast the join request to all\r\n * other processes in the system\r\n */\r\n ReceivePortIdentifier joinAckPort = ((RepMIJoinMessage) mesg).recvPortId;\r\n ReceivePortIdentifier joiningIbisPort = ((RepMIJoinMessage) mesg).ibisRPI;\r\n ReceivePortIdentifier joinAckNormalNode = ((RepMIJoinMessage) mesg).joinAckNormalNode;\r\n\r\n try {\r\n m.finish();\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n\r\n proto.processJoin(pi, joinAckPort, joiningIbisPort,\r\n joinAckNormalNode);\r\n\r\n return;\r\n\r\n } else if (mesg instanceof RepMISOSMessage) {\r\n try {\r\n m.finish();\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n proto.processSOS(ii, ((RepMISOSMessage) mesg).TS,\r\n ((RepMISOSMessage) mesg).recoveryRound);\r\n return;\r\n\r\n } else if (mesg instanceof RepMISOSReplyMessage) {\r\n proto.processSOSReply(ii,\r\n ((RepMISOSReplyMessage) mesg).whomIHelp,\r\n ((RepMISOSReplyMessage) mesg).TS,\r\n ((RepMISOSReplyMessage) mesg).myOps);\r\n return;\r\n }\r\n }\r\n }",
"@Override\n\tpublic void msgReceived(Message msg) {\n\n\t}",
"void mo80456b(Message message);",
"@Override public boolean requireAllPresenceValues() throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nboolean _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\nmRemote.transact(Stub.TRANSACTION_requireAllPresenceValues, _data, _reply, 0);\n_reply.readException();\n_result = (0!=_reply.readInt());\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}",
"@Override\n protected void managedInputMessage(String message) throws IOException, ClassNotFoundException {\n Message objectResponse;\n try {\n objectResponse = (Message) ois.readObject();\n //System.out.println(\"(\" + ourNode.getName() + \") Object response from \" + connectedNode.getName() + \": \" + objectResponse.getSrc());\n callback.onMessageReceived(objectResponse);\n } catch (Exception e) {\n System.err.println(\"Excepcio en la lectura de l'objecte!\");\n e.printStackTrace();\n }\n }",
"com.lxd.protobuf.msg.result.user.User.User_ getUser();",
"public void receiveResultgetUserInfo(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean[] result\n ) {\n }",
"public int getMsgType(){\r\n return localMsgType;\r\n }",
"@Override\n\tpublic void onPMessage(String arg0, String arg1, String arg2) {\n\t\t\n\t}",
"@DSSafe(DSCat.IPC_CALLBACK)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.580 -0500\", hash_original_method = \"2469457C965E8FC7C139A1D414384428\", hash_generated_method = \"42C86E9B0B120923F19E3F5FDF13C046\")\n \n@Override\n public void handleMessage(Message msg) {\n mResultMsg = Message.obtain();\n mResultMsg.copyFrom(msg);\n synchronized(mLockObject) {\n mLockObject.notify();\n }\n }",
"<init>( com.whatsapp.client.FunXMPPRunner$2, com.whatsapp.client.FunXMPPRunner, java.io.InputStream, java.io.OutputStream, javax.microedition.io.StreamConnection ); // address: 0\n\t{\n\tenter \n\taload_0 \n\tinvokespecial_lib java.lang.Object.<init> // pc=1\n\taload_0 \n\taload_1 \n\tputfield .field_3_3 // get_name_1: .field_3_3 // get_name_2: .field_3_3 // get_Name: .field_3_3 // getName->1: null // getName->2: null // getName->N: null // ofs = -1 ord = 0 addr = 3\n\taload_0 \n\taload_2 \n\tputfield .field_0_ // get_name_1: .field_0_ // get_name_2: .field_0_ // get_Name: .field_0_ // getName->1: null // getName->2: null // getName->N: null // ofs = -1 ord = 0 addr = 0\n\taload_0 \n\taload_3 \n\tputfield .field_1_1 // get_name_1: .field_1_1 // get_name_2: .field_1_1 // get_Name: .field_1_1 // getName->1: null // getName->2: null // getName->N: null // ofs = -1 ord = 0 addr = 1\n\taload_0 \n\taload_4 \n\tputfield .field_2_2 // get_name_1: .field_2_2 // get_name_2: .field_2_2 // get_Name: .field_2_2 // getName->1: null // getName->2: null // getName->N: null // ofs = -1 ord = 0 addr = 2\n\treturn \n\t}\n\n\t// @@@@@@@@@@@@@ Virtual routines \n\npublic final run( com.whatsapp.client.FunXMPPRunner$2 );",
"public void receiveResultgetUserInfoBean(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean result\n ) {\n }",
"@Override\r\n public void handleMessage(Message msg) {\n }",
"@Override\n\tpublic void onMessage(Object arg0) {\n\t\t\n\t}",
"@Override\n\tvoid receiveCall() {\n\n\t}",
"public NbaProcRetrieveMibFollowUps() {\n super();\n }",
"void processCallback (ZyniMsg msg);",
"java.lang.String getUserMessage();",
"@Override\n public void onReceive(Object msg) throws Exception {\n }",
"@Override\n\t\tpublic void onDirectMessage(DirectMessage arg0) {\n\t\t\t\n\t\t}",
"public RunExecutableMaxObj() {\n /*\n Input 1: receive message\n ========================\n Output 1: Number of Detected User in the scene\n Output 2: bang, when detect a new user\n */\n declareInlets(new int[]{DataTypes.ALL, DataTypes.ALL});\n declareOutlets(new int[]{DataTypes.ALL, DataTypes.ALL});\n }",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tswitch (msg.what) {\n\t\t\tcase DDef.FINISH_BIND:\n\t\t\t\tmObjProtocol = (Protocol) msg.obj;\n\t\t\t\tInquiry();\n\t\t\t\tbreak;\n\t\t\tcase DDef.AIR_CMD_ID:\n\t\t\t\tsetAirAttr((AirInfo) msg.obj);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tsuper.handleMessage(msg);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"public interface TCPProtocolPropertiesOperations extends org.omg.RTCORBA.ProtocolPropertiesOperations {\n int send_buffer_size();\n void send_buffer_size(int arg);\n int recv_buffer_size();\n void recv_buffer_size(int arg);\n boolean keep_alive();\n void keep_alive(boolean arg);\n boolean dont_route();\n void dont_route(boolean arg);\n boolean no_delay();\n void no_delay(boolean arg);\n}",
"public void receiveResultmain(\n ) {\n }",
"UnreceivedMsg.Res getUnreceivedMsgRes();",
"public void OnMessageReceived(String msg);",
"@Override\n public void OnMessage(User user, byte[] bytes) {\n throw new UnsupportedOperationException(\"Unimplemented method 'OnMessage'\");\n }",
"public interface CommunicationUser {\n\t\n\t/**\n\t * Provide communication API that allows for communication with other object in the simulator.\n\t * Method is a callback for the registration of the object in {@link CommunicationModel}\n\t * @param api the access to the communication infrastructure \n\t */\n\tvoid setCommunicationAPI(CommunicationAPI api);\n\t\n\t/**\n\t * Get position. The position is required to determine the entities you can communicate with \n\t * @return positing on the communication user or <code>null</code> if object is not positioned \n\t */\n\tPoint getPosition();\n\t\n\t/**\n\t * Get the distance in which you want to communicate. \n\t * @return\n\t */\n\tdouble getRadius();\n\t\n\t/**\n\t * Get the connection reliability. This is probability (0,1] that the message is send/received.\n\t * When two entities communicate the probability of message delivery is a product of their reliability. \n\t * @return\n\t */\n\tdouble getReliability();\n\t\n\t/**\n\t * Receive the message. Multiple messages might be delivered during one tick of the simulator. \n\t * The simple implementation of handling multiple messages is provided in {@link Mailbox} \n\t * @param message delivered\n\t */\n\tvoid receive(Message message);\n}",
"public interface OnUserProfilReceived {\n\n void onUserProfilReceived(UserProfilEBDD userProfilEBDD);\n}",
"public void mo1611c() {\r\n Message.obtain(this.f4603a.f4598n, 6, null).sendToTarget();\r\n }",
"public interface APICallbacks\r\n{\r\n\r\n /**\r\n * <p>This is the copyright notice for this class </p>\r\n *\r\n * @copyright<br><p><B>Patsystems UK Limited 2000-2007</b></p>\r\n */\r\n public static final String COPYRIGHT = \"Copyright (c) Patsystems UK Limited 2000-2007\";\r\n\r\n /**\r\n * Host Link Status Change message ID.\r\n */\r\n public static final int MID_HOST_LINK_CHANGE = 1;\r\n\r\n /**\r\n * Price Link Status Change message ID.\r\n */\r\n public static final int MID_PRICE_LINK_CHANGE = 2;\r\n\r\n /**\r\n * Logon Status message ID.\r\n */\r\n public static final int MID_LOGON_STATUS = 3;\r\n\r\n /**\r\n * User Message message ID.\r\n */\r\n public final static int MID_MESSAGE = 4;\r\n\r\n /**\r\n * Order message ID.\r\n */\r\n public static final int MID_ORDER = 5;\r\n\r\n /**\r\n * End of Day message ID.\r\n */\r\n public static final int MID_FORCED_LOGOUT = 6;\r\n\r\n /**\r\n * Download Complete message ID.\r\n */\r\n public static final int MID_DOWNLOAD_COMPLETE = 7;\r\n\r\n /**\r\n * Price Change message ID.\r\n */\r\n public static final int MID_PRICE = 8;\r\n\r\n /**\r\n * Fill message ID.\r\n */\r\n public static final int MID_FILL = 9;\r\n\r\n /**\r\n * Status Update message ID.\r\n */\r\n public static final int MID_STATUS = 10;\r\n\r\n /**\r\n * Contract Added message ID.\r\n */\r\n public static final int MID_CONTRACT_ADDED = 11;\r\n\r\n /**\r\n * Contract Deleted message ID.\r\n */\r\n public static final int MID_CONTRACT_DELETED = 12;\r\n\r\n /**\r\n * Exchange Rate Updated message ID.\r\n */\r\n public static final int MID_EXCHANGE_RATE = 13;\r\n\r\n /**\r\n * Connectivity Status Update message ID.\r\n */\r\n public static final int MID_CONNECTIVITY_STATUS = 14;\r\n\r\n /**\r\n * Order Cancellation Timeout message ID.\r\n */\r\n public static final int MID_ORDER_CANCEL_FAILURE_ID = 15;\r\n\r\n /**\r\n * At Best message ID.\r\n */\r\n public static final int MID_AT_BEST_ID = 16;\r\n\r\n /**\r\n * Memory warning message ID.\r\n */\r\n public static final int MID_MEMORY_WARNING = 18;\r\n\r\n /**\r\n * Subscriber Depth message ID.\r\n */\r\n public static final int MID_SUBSCRIBER_DEPTH = 19;\r\n\r\n /**\r\n * DOM update message ID.\r\n */\r\n public static final int MID_DOM_UPDATE = 21;\r\n\r\n /**\r\n * Settlement Price message ID.\r\n */\r\n public static final int MID_SETTLEMENT_PRICE = 22;\r\n\r\n /**\r\n * Strategy creation successfullyReceived ID.\r\n */\r\n public static final int MID_STRATEGY_CREATION_RECEIVED = 23;\r\n\r\n /**\r\n * Strategy creation failure ID.\r\n */\r\n public static final int MID_STRATEGY_CREATION_FAILURE = 24;\r\n\r\n /**\r\n * Generic Price message ID.\r\n */\r\n public static final int MID_GENERIC_PRICE = 26;\r\n\r\n /**\r\n * Price blank message ID\r\n */\r\n public static final int MID_BLANK_PRICE = 27;\r\n\r\n /**\r\n * Order Queued Timeout ID.\r\n */\r\n public static final int MID_ORDER_QUEUED_TIMEOUT = 28;\r\n\r\n /**\r\n * Order Sent Timeout ID.\r\n */\r\n public static final int MID_ORDER_SENT_TIMEOUT = 29;\r\n\r\n /**\r\n * Order Book reset ID.\r\n */\r\n public static final int MID_RESET_ORDERBOOK = 30;\r\n\r\n /**\r\n * Exception/Error ID (Internal).\r\n */\r\n public static final int MID_ERROR = -1;\r\n\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQ = 100;\r\n\r\n /**\r\n * LOW Price Alert.\r\n */\r\n public static final int MID_LOWPRICE = 101;\r\n\r\n /**\r\n * HIGH Price Alert.\r\n */\r\n public static final int MID_HIGHPRICE = 102;\r\n\r\n\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQI_BID = 103;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQI_OFFER = 104;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQI_2_SIDES = 105;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_BID = 106;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_OFFER = 107;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_2_SIDES = 108;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_CROSS = 109;\r\n\r\n /**\r\n * Strategy creation strategy created event id.\r\n */\r\n public static final int MID_STRATEGY_CREATION_CREATED = 200;\r\n\r\n /**\r\n * Event ID to update order history\r\n */\r\n public static final int MID_UPDATE_ORDERHISTORY = 1000;\r\n\r\n\r\n}",
"public void securityMessageReceived(CallPeerSecurityMessageEvent event);",
"@Override public int getPresenceStatus(boolean onlineStatus, java.lang.String userAvailability, java.util.Map allValues) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nint _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(((onlineStatus)?(1):(0)));\n_data.writeString(userAvailability);\n_data.writeMap(allValues);\nmRemote.transact(Stub.TRANSACTION_getPresenceStatus, _data, _reply, 0);\n_reply.readException();\n_result = _reply.readInt();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}",
"@Override\n public void teleopInit() {\n\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\ttry {\r\n\t\tPaymentProcessorImplService service=new PaymentProcessorImplService(new URL(\"http://localhost:8080/javafirstws/paymentProcessor?wsdl\"));\r\n\t\tPaymentProcessor port=service.getPaymentProcessorImplPort();\r\n\t\tClient client=ClientProxy.getClient(port);\r\n\t\tEndpoint endpoint = client.getEndpoint();\r\n\t\tMap<String, Object> props=new HashMap<String, Object>();\r\n\t\tprops.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);\r\n\t\tprops.put(WSHandlerConstants.USER, \"cxf\");\r\n\t\tprops.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);\r\n\t\tprops.put(WSHandlerConstants.PW_CALLBACK_CLASS,UTPasswordCallback.class.getName() );\r\n\t\t//props.put(WSHandlerConstants.PW_CALLBACK_CLASS,\"cxf\" );\r\n\t\t//System.out.println(\"props hashing\"+props);\r\n\t\t\r\n\t\tWSS4JOutInterceptor wssOut=new WSS4JOutInterceptor();\r\n\t\tendpoint.getOutInterceptors().add(wssOut);\r\n\t\t\r\n\t\tPaymentProcessorResponse response=port.processPayment(new PaymentProcessorRequest());\r\n\t\tSystem.out.println(response.isResult());\r\n\t\t\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}",
"void mo80453a(Message message);",
"private void sendReceiveRes(){\n\t}",
"public interface ReceiveCallback extends MessageReceivedCallback{\n}",
"pb4server.SendNoticeToLeaderAskReq getSendNoticeToLeaderAskReq();",
"@Override\n\tpublic void receive_message(Message m) {\n\t\t\n\t}",
"public pam_message(Pointer src) {\n useMemory(src);\n read();\n }",
"int getObject_nbmsg();",
"@Override\n\tpublic void onMessageRecieved(Message arg0) {\n\t\t\n\t}",
"@Override\n public void processMessage(int type, String receivedMsg) {\n }",
"public interface IPresenceMapping extends android.os.IInterface\n{\n/** Local-side IPC implementation stub class. */\npublic static abstract class Stub extends android.os.Binder implements info.guardianproject.otr.app.im.plugin.IPresenceMapping\n{\nprivate static final java.lang.String DESCRIPTOR = \"info.guardianproject.otr.app.im.plugin.IPresenceMapping\";\n/** Construct the stub at attach it to the interface. */\npublic Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}\n/**\n * Cast an IBinder object into an info.guardianproject.otr.app.im.plugin.IPresenceMapping interface,\n * generating a proxy if needed.\n */\npublic static info.guardianproject.otr.app.im.plugin.IPresenceMapping asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof info.guardianproject.otr.app.im.plugin.IPresenceMapping))) {\nreturn ((info.guardianproject.otr.app.im.plugin.IPresenceMapping)iin);\n}\nreturn new info.guardianproject.otr.app.im.plugin.IPresenceMapping.Stub.Proxy(obj);\n}\n@Override public android.os.IBinder asBinder()\n{\nreturn this;\n}\n@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException\n{\nswitch (code)\n{\ncase INTERFACE_TRANSACTION:\n{\nreply.writeString(DESCRIPTOR);\nreturn true;\n}\ncase TRANSACTION_requireAllPresenceValues:\n{\ndata.enforceInterface(DESCRIPTOR);\nboolean _result = this.requireAllPresenceValues();\nreply.writeNoException();\nreply.writeInt(((_result)?(1):(0)));\nreturn true;\n}\ncase TRANSACTION_getPresenceStatus:\n{\ndata.enforceInterface(DESCRIPTOR);\nboolean _arg0;\n_arg0 = (0!=data.readInt());\njava.lang.String _arg1;\n_arg1 = data.readString();\njava.util.Map _arg2;\njava.lang.ClassLoader cl = (java.lang.ClassLoader)this.getClass().getClassLoader();\n_arg2 = data.readHashMap(cl);\nint _result = this.getPresenceStatus(_arg0, _arg1, _arg2);\nreply.writeNoException();\nreply.writeInt(_result);\nreturn true;\n}\ncase TRANSACTION_getOnlineStatus:\n{\ndata.enforceInterface(DESCRIPTOR);\nint _arg0;\n_arg0 = data.readInt();\nboolean _result = this.getOnlineStatus(_arg0);\nreply.writeNoException();\nreply.writeInt(((_result)?(1):(0)));\nreturn true;\n}\ncase TRANSACTION_getUserAvaibility:\n{\ndata.enforceInterface(DESCRIPTOR);\nint _arg0;\n_arg0 = data.readInt();\njava.lang.String _result = this.getUserAvaibility(_arg0);\nreply.writeNoException();\nreply.writeString(_result);\nreturn true;\n}\ncase TRANSACTION_getExtra:\n{\ndata.enforceInterface(DESCRIPTOR);\nint _arg0;\n_arg0 = data.readInt();\njava.util.Map _result = this.getExtra(_arg0);\nreply.writeNoException();\nreply.writeMap(_result);\nreturn true;\n}\ncase TRANSACTION_getSupportedPresenceStatus:\n{\ndata.enforceInterface(DESCRIPTOR);\nint[] _result = this.getSupportedPresenceStatus();\nreply.writeNoException();\nreply.writeIntArray(_result);\nreturn true;\n}\n}\nreturn super.onTransact(code, data, reply, flags);\n}\nprivate static class Proxy implements info.guardianproject.otr.app.im.plugin.IPresenceMapping\n{\nprivate android.os.IBinder mRemote;\nProxy(android.os.IBinder remote)\n{\nmRemote = remote;\n}\n@Override public android.os.IBinder asBinder()\n{\nreturn mRemote;\n}\npublic java.lang.String getInterfaceDescriptor()\n{\nreturn DESCRIPTOR;\n}\n/**\n * Tells if the mapping needs all presence values sent in protocol. If this\n * method returns true, the framework will pass all the presence values\n * received from the server when map to the predefined status.\n *\n * @return true if needs; false otherwise.\n */\n@Override public boolean requireAllPresenceValues() throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nboolean _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\nmRemote.transact(Stub.TRANSACTION_requireAllPresenceValues, _data, _reply, 0);\n_reply.readException();\n_result = (0!=_reply.readInt());\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}\n/**\n * Map the presence values sent in protocol to the predefined presence\n * status.\n *\n * @param onlineStatus The value of presence <OnlineStatus> received\n * from the server.\n * @param userAvailability The value of presence <UserAvailibility>\n * received from the server.\n * @param allValues The whole presence values received from the server.\n * @return a predefined status.\n * @see #requireAllPresenceValues()\n */\n@Override public int getPresenceStatus(boolean onlineStatus, java.lang.String userAvailability, java.util.Map allValues) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nint _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(((onlineStatus)?(1):(0)));\n_data.writeString(userAvailability);\n_data.writeMap(allValues);\nmRemote.transact(Stub.TRANSACTION_getPresenceStatus, _data, _reply, 0);\n_reply.readException();\n_result = _reply.readInt();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}\n/**\n * Gets the value of <OnlineStatus> will be sent to the server when\n * update presence to the predefined status.\n *\n * @param status the predefined status.\n * @return The value of <OnlineStatus> will be sent to the server\n */\n@Override public boolean getOnlineStatus(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nboolean _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getOnlineStatus, _data, _reply, 0);\n_reply.readException();\n_result = (0!=_reply.readInt());\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}\n/**\n * Gets the value of <UserAvaibility> will be sent to the server when\n * update presence to the predefined status.\n *\n * @param status the predefined status.\n * @return The value of <UserAvaibility> will be sent to the server\n */\n@Override public java.lang.String getUserAvaibility(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\njava.lang.String _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getUserAvaibility, _data, _reply, 0);\n_reply.readException();\n_result = _reply.readString();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}\n/**\n * Gets the extra presence values other than <OnlineStatus> and\n * <UserAvaibility> will be sent to the server when update presence to\n * the predefined status.\n *\n * @param status the predefined status.\n * @return The extra values that will be sent to the server.\n */\n@Override public java.util.Map getExtra(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\njava.util.Map _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getExtra, _data, _reply, 0);\n_reply.readException();\njava.lang.ClassLoader cl = (java.lang.ClassLoader)this.getClass().getClassLoader();\n_result = _reply.readHashMap(cl);\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}\n/**\n * Gets an array of the supported presence status. The client can only update\n * presence to the values in the array.\n *\n * @return an array of the supported presence status.\n */\n@Override public int[] getSupportedPresenceStatus() throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nint[] _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\nmRemote.transact(Stub.TRANSACTION_getSupportedPresenceStatus, _data, _reply, 0);\n_reply.readException();\n_result = _reply.createIntArray();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}\n}\nstatic final int TRANSACTION_requireAllPresenceValues = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);\nstatic final int TRANSACTION_getPresenceStatus = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1);\nstatic final int TRANSACTION_getOnlineStatus = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2);\nstatic final int TRANSACTION_getUserAvaibility = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3);\nstatic final int TRANSACTION_getExtra = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4);\nstatic final int TRANSACTION_getSupportedPresenceStatus = (android.os.IBinder.FIRST_CALL_TRANSACTION + 5);\n}\n/**\n * Tells if the mapping needs all presence values sent in protocol. If this\n * method returns true, the framework will pass all the presence values\n * received from the server when map to the predefined status.\n *\n * @return true if needs; false otherwise.\n */\npublic boolean requireAllPresenceValues() throws android.os.RemoteException;\n/**\n * Map the presence values sent in protocol to the predefined presence\n * status.\n *\n * @param onlineStatus The value of presence <OnlineStatus> received\n * from the server.\n * @param userAvailability The value of presence <UserAvailibility>\n * received from the server.\n * @param allValues The whole presence values received from the server.\n * @return a predefined status.\n * @see #requireAllPresenceValues()\n */\npublic int getPresenceStatus(boolean onlineStatus, java.lang.String userAvailability, java.util.Map allValues) throws android.os.RemoteException;\n/**\n * Gets the value of <OnlineStatus> will be sent to the server when\n * update presence to the predefined status.\n *\n * @param status the predefined status.\n * @return The value of <OnlineStatus> will be sent to the server\n */\npublic boolean getOnlineStatus(int status) throws android.os.RemoteException;\n/**\n * Gets the value of <UserAvaibility> will be sent to the server when\n * update presence to the predefined status.\n *\n * @param status the predefined status.\n * @return The value of <UserAvaibility> will be sent to the server\n */\npublic java.lang.String getUserAvaibility(int status) throws android.os.RemoteException;\n/**\n * Gets the extra presence values other than <OnlineStatus> and\n * <UserAvaibility> will be sent to the server when update presence to\n * the predefined status.\n *\n * @param status the predefined status.\n * @return The extra values that will be sent to the server.\n */\npublic java.util.Map getExtra(int status) throws android.os.RemoteException;\n/**\n * Gets an array of the supported presence status. The client can only update\n * presence to the values in the array.\n *\n * @return an array of the supported presence status.\n */\npublic int[] getSupportedPresenceStatus() throws android.os.RemoteException;\n}",
"public EVT_RPC_LOGIN() {\n/* 629 */ super(W32APITypeMapper.UNICODE);\n/* */ }",
"public void receiveResultsMS_User_Defined(\n com.xteam.tourismpay.PFTMXStub.SMS_User_DefinedResponse result) {\n }",
"void systemMessageReceived(IMSession session, Message message);",
"public void receiveResultGetMWSProperties(\r\n\t\t\tcom.autometrics.analytics.v9.j2ee.webservices.GetMWSProperties2Response result) {\r\n\t}",
"@Override public java.util.Map getExtra(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\njava.util.Map _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getExtra, _data, _reply, 0);\n_reply.readException();\njava.lang.ClassLoader cl = (java.lang.ClassLoader)this.getClass().getClassLoader();\n_result = _reply.readHashMap(cl);\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}",
"void setupExternalMessages();",
"@Override\n protected void prepareHandshakeMessageContents() {\n }",
"@Override\n\tpublic void getMessage(TranObject msg) {\n\n\t}",
"public int getMes();",
"public void processMessage(DeviceMateMessage m);",
"void onMessageReceived(Message message);",
"pb4server.CallBossAskReq getCallBossAskReq();",
"@Override\r\n\tpublic void messageReceived( IoSession session, Object message ) throws Exception\r\n\t{\r\n\t\t//\t\tSystem.out.println(\"data \" + (byte[])message);\r\n\t\t//\t\tfor(byte b : (byte[])message){\r\n\t\t//\t\t\tSystem.out.print(b + \" \");\r\n\t\t//\t\t}\r\n\t\t//\t\tSystem.out.println();\r\n\r\n\r\n\r\n\t\tif(message instanceof ClientMessage)\t\t// Application\r\n\t\t\treceivedClientMessage = (ClientMessage) message;\r\n\t\telse{ \t\t\t\t\t\t\t\t\t\t// OBU\r\n\t\t\tinterpretData((byte[]) message, session);\r\n\t\t\t//\t\t\tboolean transactionState = obuHandlers.get(session).addData((byte[])message); \r\n\t\t\t//\t\t\tif(transactionState){\r\n\t\t\t//\t\t\t\tbyte[] b = {(byte)0x01};\r\n\t\t\t//\t\t\t\tsession.write(new OBUMessage(OBUMessage.REQUEST_TELEMETRY, b).request);\r\n\t\t\t//\t\t\t}\r\n\t\t\t//\r\n\t\t\t//\t\t\tThread.sleep(200);\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tRunnable run = new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tswitch(receivedClientMessage.getId()){\r\n\t\t\t\tcase LOGIN_CHECK:\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\t//\t\t\t\tlock.lock();\r\n\t\t\t\t\t\tint user_id = (int)receivedClientMessage.getContent();\r\n\t\t\t\t\t\tUserData response = null;\r\n\t\t\t\t\t\tif(user_id == -1){\r\n\t\t\t\t\t\t\tsession.write(new ClientMessage(ClientMessage.Ident.LOGIN_CHECK, response));\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tboolean isOnline = AmberServer.getDatabase().checkOnline(user_id);\r\n\t\t\t\t\t\tif(isOnline){\r\n\t\t\t\t\t\t\tsession.setAttribute(\"user\", user_id);\r\n\t\t\t\t\t\t\tcancelTimeout(user_id);\r\n\t\t\t\t\t\t\tresponse = new UserData().prepareUserData(user_id);\r\n\t\t\t\t\t\t\tsession.write(new ClientMessage(ClientMessage.Ident.LOGIN_CHECK, response));\r\n\t\t\t\t\t\t\tServerLogger.log(\"Login succeeded: \" + user_id, Constants.DEBUG);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tsession.write(new ClientMessage(ClientMessage.Ident.LOGIN_CHECK, response));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfinally{\r\n\t\t\t\t\t\t//\t\t\t\tlock.unlock();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase LOGIN:\r\n\t\t\t\t\tClientMessage responseMessage = null;\r\n\t\t\t\t\tString usernameLogin = ((User)receivedClientMessage.getContent()).getName();\r\n\t\t\t\t\tbyte[] passLogin = ((User)receivedClientMessage.getContent()).getPass();\r\n\t\t\t\t\tString regID = ((User)receivedClientMessage.getContent()).getRegistationID();\r\n\t\t\t\t\t// Database validation\r\n\t\t\t\t\t// Check for User and Password\r\n\t\t\t\t\tint userID = AmberServer.getDatabase().login(usernameLogin, passLogin);\r\n\t\t\t\t\tif(userID == -1){\r\n\t\t\t\t\t\tresponseMessage = new ClientMessage(ClientMessage.Ident.ERROR, Constants.ERROR_LOGIN);\r\n\t\t\t\t\t\tServerLogger.log(\"Login failed: \" + usernameLogin, Constants.DEBUG);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Check for GCM Registration\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tAmberServer.getDatabase().registerGCM(userID, regID);\r\n\t\t\t\t\t\tUserData response = new UserData();\r\n\t\t\t\t\t\tresponse = response.prepareUserData(userID);\r\n\t\t\t\t\t\tresponseMessage = new ClientMessage(ClientMessage.Ident.LOGIN, response);\r\n\t\t\t\t\t\tsession.setAttribute(\"user\", userID);\r\n\t\t\t\t\t\tServerLogger.log(\"Login success: \" + usernameLogin, Constants.DEBUG);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsession.write(responseMessage);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase LOGOUT:\r\n\t\t\t\t\tint user_id = (int)receivedClientMessage.getContent();\r\n\t\t\t\t\tAmberServer.getDatabase().logout(user_id);\r\n\t\t\t\t\tresponseMessage = new ClientMessage(ClientMessage.Ident.LOGOUT, Constants.SUCCESS_LOGOUT);\r\n\t\t\t\t\tsession.write(responseMessage);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase REGISTER:\r\n\t\t\t\t\tString usernameRegister = ((User)receivedClientMessage.getContent()).getName();\r\n\t\t\t\t\tbyte[] passRegister = ((User)receivedClientMessage.getContent()).getPass();\r\n\t\t\t\t\tboolean queryRegister = AmberServer.getDatabase().addUser(usernameRegister, passRegister, 0);\r\n\t\t\t\t\t// Registration failed\r\n\t\t\t\t\tif(!queryRegister){\r\n\t\t\t\t\t\tresponseMessage = new ClientMessage(ClientMessage.Ident.ERROR, Constants.ERROR_REGISTER);\r\n\t\t\t\t\t\tServerLogger.log(\"Registration failed: \" + usernameRegister, Constants.DEBUG);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Registration succeeded\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tresponseMessage = new ClientMessage(ClientMessage.Ident.REGISTER, Constants.SUCCESS_REGISTER);\r\n\t\t\t\t\t\tServerLogger.log(\"Registration success: \" + usernameRegister, Constants.DEBUG);\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsession.write(responseMessage);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase EVENT_DETAIL:\r\n\t\t\t\tcase EVENT_REQUEST:\r\n\t\t\t\t\tObject[] request = (Object[]) receivedClientMessage.getContent();\r\n\t\t\t\t\tint eventID = (int) request[0];\r\n\t\t\t\t\tint obuID = (int) request[1];\r\n\t\t\t\t\tObject[] eventData = AmberServer.getDatabase().getEventData(eventID);\r\n\t\t\t\t\tString vehicleName = AmberServer.getDatabase().getVehicleName(obuID);\r\n\t\t\t\t\tString eventType = (String)eventData[1];\r\n\t\t\t\t\tString eventTime = (String)eventData[2];\r\n\t\t\t\t\tdouble eventLat = (double)eventData[3];\r\n\t\t\t\t\tdouble eventLon = (double)eventData[4];\r\n\t\t\t\t\tbyte[] eventImage = (byte[]) eventData[5];\t// EventImage\r\n\t\t\t\t\tEvent event = new Event(eventType, eventTime, eventLat, eventLon, eventImage, vehicleName);\r\n\t\t\t\t\tevent.setVehicleID(obuID);\r\n\t\t\t\t\tsession.write(new ClientMessage(receivedClientMessage.getId(), event));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase REGISTER_VEHICLE:\r\n\t\t\t\t\trequest = (Object[]) receivedClientMessage.getContent();\r\n\t\t\t\t\tuserID = (int) request[0];\r\n\t\t\t\t\tint vehicleID = (int) request[1];\r\n\r\n\t\t\t\t\tSystem.out.println(\"VEHICLE ID \" + vehicleID);\r\n\r\n\t\t\t\t\tVehicle vehicle = AmberServer.getDatabase().registerVehicle(userID, vehicleID);\r\n\t\t\t\t\tSystem.out.println(vehicle);\r\n\t\t\t\t\tif(vehicle == null){\r\n\t\t\t\t\t\tresponseMessage = new ClientMessage(ClientMessage.Ident.ERROR, Constants.ERROR_REGISTER_VEHICLE);\r\n\t\t\t\t\t\tServerLogger.log(\"Add Vehicle failed: \" + userID, Constants.DEBUG);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Add Vehicle succeeded\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tvehicle = vehicle.prepareVehicle(vehicleID);\r\n\t\t\t\t\t\tresponseMessage = new ClientMessage(ClientMessage.Ident.REGISTER_VEHICLE, vehicle);\r\n\t\t\t\t\t\tServerLogger.log(\"Add Vehicle succeeded: \" + userID, Constants.DEBUG);\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsession.write(responseMessage);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase UNREGISTER_VEHICLE:\r\n\t\t\t\t\trequest = (Object[]) receivedClientMessage.getContent();\r\n\t\t\t\t\tuserID = (int) request[0];\r\n\t\t\t\t\tvehicleID = (int) request[1];\r\n\t\t\t\t\tint position = (int) request[2];\r\n\t\t\t\t\tboolean queryUnregisterVehicle = AmberServer.getDatabase().unregisterVehicle(userID, vehicleID);\r\n\t\t\t\t\tif(!queryUnregisterVehicle){\r\n\t\t\t\t\t\tresponseMessage = new ClientMessage(ClientMessage.Ident.UNREGISTER_VEHICLE, -1);\r\n\t\t\t\t\t\tServerLogger.log(\"Unregister Vehicle failed for User: \" + userID, Constants.DEBUG);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Unregister Vehicle succeeded\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tresponseMessage = new ClientMessage(ClientMessage.Ident.UNREGISTER_VEHICLE, position);\r\n\t\t\t\t\t\tServerLogger.log(\"Unregister Vehicle succeeded for User: \" + userID, Constants.DEBUG);\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsession.write(responseMessage);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase TOGGLE_ALARM:\r\n\t\t\t\t\trequest = (Object[]) receivedClientMessage.getContent();\r\n\t\t\t\t\tuserID = (int) request[0];\r\n\t\t\t\t\tvehicleID = (int) request[1];\r\n\t\t\t\t\tboolean status = (boolean) request[2];\r\n\t\t\t\t\tposition = (int) request[3];\r\n\t\t\t\t\tboolean queryToggleAlarm = AmberServer.getDatabase().toggleAlarm(userID, vehicleID, status);\r\n\t\t\t\t\tObject[] responseData = {queryToggleAlarm, position};\r\n\t\t\t\t\tresponseMessage = new ClientMessage(ClientMessage.Ident.TOGGLE_ALARM, responseData);\r\n\t\t\t\t\tServerLogger.log(\"Toggle Alarm for User: \" + userID + \" \" + queryToggleAlarm, Constants.DEBUG);\t\r\n\t\t\t\t\tsession.write(responseMessage);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase GET_EVENTLIST_BACKPRESS:\r\n\t\t\t\tcase GET_EVENTLIST:\r\n\t\t\t\t\tvehicleID = (int) receivedClientMessage.getContent();\r\n\t\t\t\t\tvehicleName = AmberServer.getDatabase().getVehicleName(vehicleID);\r\n\t\t\t\t\tArrayList<Event> events = Vehicle.prepareEventList(vehicleID);\r\n\t\t\t\t\tObject[] eventResponse = {events, vehicleName};\r\n\t\t\t\t\tresponseMessage = new ClientMessage(receivedClientMessage.getId(), eventResponse);\r\n\t\t\t\t\tsession.write(responseMessage);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase GET_VEHICLELIST_BACKPRESS:\r\n\t\t\t\t\tuserID = (int) receivedClientMessage.getContent();\r\n\t\t\t\t\tUserData response = new UserData();\r\n\t\t\t\t\tresponse = response.prepareUserData(userID);\r\n\t\t\t\t\tresponseMessage = new ClientMessage(ClientMessage.Ident.GET_VEHICLELIST_BACKPRESS, response.getVehicles());\r\n\t\t\t\t\tsession.write(responseMessage);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tnew Thread(run).start();\r\n\t}",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n }",
"pb4server.MassSpeedAskReq getMassSpeedAskReq();",
"@Override\n\tpublic void handleDelivery(String arg0, Envelope arg1,\n\t\t\tBasicProperties arg2, byte[] arg3) throws IOException {\n\t\t Object msg;\n\t try {\n\t System.out.println(\"【body length:】\" + bytes2kb(arg3.length));\n\t msg = decodeMsg(arg3);\n\t //subImpl.handlerReceiveMsg(this, msg);\n\t System.out.println(msg);\n\t } catch (Exception e) {\n\t e.printStackTrace();\n\t }\n\t}",
"public interface nndmMessage_Out\n{\n\n /**\n * Status flag to indicate that a message is ready for retreival from message\n * out queue and to be transformed into a disease-specific message\n * format - value is <code> A </code> .\n */\n public static final String READY_FOR_TRANSFORM_STATUS = \"RDY_FOR_TRNSFRM\";\n\n /**\n * Status flag to indicate that a message is in the process of being transformed\n * into a disease-specific message format - value is <code> TRNSFRM_IN_PROG </code> .\n */\n public static final String TRANSFORM_IN_PROGRESS_STATUS = \"TRNSFRM_IN_PROG\";\n\n\n /**\n * Status flag to indicate that a message has been successfully transformed\n * into a disease-specific message format - value is <code> TRNSFRM_COMP </code> .\n */\n public static final String TRANSFORM_COMPLETE_STATUS = \"TRNSFRM_COMP\";\n\n\n /**\n * Status flag to indicate that an error has occurred while transforming a\n * message into a disease-specific message format, (transformation unsuccessful)\n * - value is <code> TRNSFRM_ERR </code> .\n */\n public static final String TRANSFORM_ERROR_STATUS = \"TRNSFRM_ERR\";\n\n\n /**\n * Status flag to indicate that an error has occurred while <i> transporting </i> a\n * a disease-specific message to the transport out queue, (write to queue failed),\n * or, the ebXML application errored while processing the message.\n * - value is <code> TRNSPRT_ERR </code> .\n */\n public static final String TRANSPORT_ERROR_STATUS = \"TRNSPRT_ERR\";\n\n\n /**\n * Status flag to indicate that a disease-specific message is ready to be processed\n * by <i> PHINMS </i> data interchange application\n * - value is <code> RDY_FOR_PHINMS </code> .\n */\n public static final String READY_FOR_PHINMS_STATUS = \"RDY_FOR_PHINMS\";\n\n\n /**\n * Status flag to indicate that a message has been successfully transformed\n * into a disease-specific message format - value is <code> PHINMS_COMP </code> .\n */\n public static final String PHINMS_COMPLETE_STATUS = \"PHINMS_COMP\";\n\n /**\n * Status flag to indicate that a message has been failed while processing in\n * PHINMS stage - value is <code> PHINMS_ERR </code>\n */\n public static final String PHINMS_ERROR_STATUS = \"PHINMS_ERR\";\n\n\n /**\n * Represents the Disease Message, <i> before </i> disease_specific transformation.\n */\n public static final String MESSAGE_OUT_ATTACHEMNT = \"attachment_txt\";\n\n\n /** This method returns a collection of message id keys with the given status.\n * @param status String that indicates the status of the message record; use one\n * of the acceptable values of nndmMessage_Out.ACTIVE_STATUS, or\n * nndmMessage_Out.TRANSFORM_IN_PROGRESS_STATUS, etc.\n * @return list containing the collection of keys\n * @see #ACTIVE_STATUS\n * @see #TRANSFORM_IN_PROGRESS_STATUS\n * @see #TRANSFORM_COMPLETE_STATUS\n * @see #TRANSFORM_ERROR_STATUS\n * @see #READY_FOR_PHINMS_STATUS\n * @see #TRANSPORT_ERROR_STATUS\n * @see #PHINMS_COMPLETE_STATUS\n */\n public List<MessageKey> listMessages(String status);\n\n\n /** This method retrieves the message record from the message_out database.\n * The SELECT sql is formatted to support specific database implementations\n * (currently MSSQL 2000 and Oracle 8i).\n * Only records with a status_cd of <code> nndmMessage_Out.ACTIVE_STATUS </code> can be retrieved.\n * @param key String that contains the record identifier for the message that failed.\n * @param status String that indicates the status of the message record; use one\n * of the acceptable values of nndmMessage_Out.ACTIVE_STATUS, or\n * nndmMessage_Out.TRANSFORM_IN_PROGRESS_STATUS, etc.\n * @return Map containing the mapping of column name to its value fetched from the database.\n * @see #ACTIVE_STATUS\n */\n\tpublic Map<String,String> getMessage(Long messageUid, String status);\n\n\n /** This method updates the message record indicated by the key argument as\n * indicated by the second argument.\n * @param key String that contains the record identifier to set status for\n * @param status String that indicates the status of the message record; use one\n * of the acceptable values of nndmMessage_Out.ACTIVE_STATUS, or\n * nndmMessage_Out.TRANSFORM_IN_PROGRESS_STATUS, etc.\n * @see #ACTIVE_STATUS\n * @see #TRANSFORM_IN_PROGRESS_STATUS\n * @see #TRANSFORM_COMPLETE_STATUS\n * @see #TRANSFORM_ERROR_STATUS\n * @see #READY_FOR_PHINMS_STATUS\n * @see #TRANSPORT_ERROR_STATUS\n * @see #PHINMS_COMPLETE_STATUS\n */\n public void setStatus(Long messageUid, String status);\n\n\n /** This method adds an error log record to the Message_Out database and\n * sets the status appropriately.\n * @param key String that contains the record identifier for the message that failed.\n * @param errorMessage String the contains the short description of the error.\n * @param status String that indicates the status of the message record; use one\n * of the acceptable values of nndmMessage_Out.TRANSFORM_ERROR_STATUS, or\n * nndmMessage_Out.TRANSPORT_ERROR_STATUS.\n */\n public void setError(Long messageUid, String notificationLocalId, String errorMessage, String status);\n\n}",
"@Override\n\tpublic void processMessage(Message msg) {\n\t\tif (msg.what == ProtocolConst.CMD_LOGIN_SUCESS) {\n\t\t\tsaveData();\n\t\t\tIntent intent = new Intent(this, TuliaoMainActivity.class);\n\t\t\tstartActivity(intent);\n\t\t\tcon.start_check_in();// 登录成功必须要定时发送数据包务端\n\t\t\t//用于掉线重新登录\n\t\t\tString pwd = password_input.getText().toString();\n\t\t\tcon.getTransportWorker().getSelf().setPwd(pwd);\n\t\t} else if (msg.what == ProtocolConst.CMD_LOGIN_SUCESS) {\n\t\t\tmakeTextShort(\"对不起,登录失败!\");\n\t\t}\n\t}",
"@Override\n\tpublic void onMessage(CommandMessage msg) {\n\t}",
"pb4server.WorldChatAskReq getWorldChatAskReq();",
"public interface XmppMessagingEvent {\n\n void onLogin();\n void onConnect();\n void onDisconnect();\n void onIncomingMessage();\n void onReceiptMessageReceived();\n}",
"@Override\n\tpublic void receive() {\n\t}",
"public void receiveResultorder_Change_Pro(\n com.xteam.tourismpay.PFTMXStub.Order_Change_ProResponse result) {\n }",
"messages.Clienthello.ClientHello getClientHello();",
"protected String getRequestMessage() {\n NbaTXRequestVO nbaTXRequest = new NbaTXRequestVO();\n nbaTXRequest.setTransType(NbaOliConstants.TC_TYPE_MIBFOLLOWUP);\n nbaTXRequest.setTransMode(NbaOliConstants.TC_MODE_ORIGINAL);\n nbaTXRequest.setBusinessProcess(NbaUtils.getBusinessProcessId(getUser()));\n //create txlife with default request fields\n NbaTXLife nbaTXLife = new NbaTXLife(nbaTXRequest);\n TXLife tXLife = nbaTXLife.getTXLife();\n UserAuthRequestAndTXLifeRequest userAuthRequestAndTXLifeRequest = tXLife.getUserAuthRequestAndTXLifeRequest();\n userAuthRequestAndTXLifeRequest.deleteUserAuthRequest();\n TXLifeRequest tXLifeRequest = userAuthRequestAndTXLifeRequest.getTXLifeRequestAt(0);\n \tnbaTXLife.getTXLife().setVersion(NbaOliConstants.OLIFE_VERSION_39_02); \n \tOLifE olife = nbaTXLife.getTXLife().getUserAuthRequestAndTXLifeRequest().getTXLifeRequestAt(0).getOLifE();\n \tolife.setVersion(NbaOliConstants.OLIFE_VERSION_39_02); \n\n tXLifeRequest.setPrimaryObjectID(CARRIER_PARTY_1);\n tXLifeRequest.setMaxRecords(getMibFollowUpMaxRecords());\n tXLifeRequest.setStartRecord(getStartRecord().intValue());\n tXLifeRequest.setStartDate(NbaUtils.addDaysToDate(getStartDate(),-1));\n tXLifeRequest.setEndDate(NbaUtils.addDaysToDate(getEndDate(),-1));\n tXLifeRequest.setTestIndicator(getTestIndicator());\n MIBRequest mIBRequest = new MIBRequest();\n tXLifeRequest.setMIBRequest(mIBRequest);\n MIBServiceDescriptor mIBServiceDescriptor = new MIBServiceDescriptor();\n MIBServiceDescriptorOrMIBServiceConfigurationID mIBServiceDescriptorOrMIBServiceConfigurationID = new MIBServiceDescriptorOrMIBServiceConfigurationID();\n mIBServiceDescriptorOrMIBServiceConfigurationID.addMIBServiceDescriptor(mIBServiceDescriptor);\n mIBRequest.setMIBServiceDescriptorOrMIBServiceConfigurationID(mIBServiceDescriptorOrMIBServiceConfigurationID);\n mIBServiceDescriptor.setMIBService(NbaOliConstants.TC_MIBSERVICE_CHECKING);\n OLifE oLifE = tXLifeRequest.getOLifE();\n Party party = new Party();\n oLifE.addParty(party);\n party.setId(CARRIER_PARTY_1);\n party.setPartyTypeCode(NbaOliConstants.OLIX_PARTYTYPE_CORPORATION);\n party.setPersonOrOrganization(new PersonOrOrganization());\n party.getPersonOrOrganization().setOrganization(new Organization());\n Carrier carrier = new Carrier();\n party.setCarrier(carrier);\n carrier.setCarrierCode(getCurrentCarrierCode());\n String responseMessage = nbaTXLife.toXmlString();\n if (getLogger().isDebugEnabled()) {\n getLogger().logDebug(\"TxLife 404 Request Message:\\n \" + responseMessage);\n }\n return responseMessage;\n }",
"frame.game.proto.User.UserInfoOrBuilder getUserOrBuilder();",
"frame.game.proto.User.UserInfoOrBuilder getUserOrBuilder();",
"public static void main(String [] args) {\n\t\t//System.load(\"/usr/local/src/freeswitch/libs/esl/java/libesljni.so\");\n\t\tSystem.load(\"/usr/local/freeswitch/scripts/Mod_CallCenterScripts/libesljni.so\");\n\t\tESLconnection con = new ESLconnection(\"127.0.0.1\",\"8021\",\"ClueCon\");\n\t//\tESLconnection con = new ESLconnection(\"10.128.83.112\",\"8021\",\"ClueCon\");\n\t\tESLevent evt;\n\t\tif (con.connected() == 1) System.out.println(\"connected\");\n\t\tcon.events(\"plain\",\"all\");\n\t\t\n\t\tint mode =0;\n\t\twhile (con.connected() == 1) {\t\t\t\t\t\t\n\t\t\t// Get an event - recvEvent will block if nothing is queued\n\t\t\tevt = con.recvEvent();\n\t\t\t//System.out.println(evt.serialize(\"plain\"));\n\t\t\tString str = \"\";\n\t\t\t//System.out.println(\"Got the body as :\"+str);\n\t\t\tstr = evt.getHeader(\"Event-Name\",-1);\n\t\t\tif(str==null){\n\t\t\t\tSystem.out.println(\"Got nul event skipping\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(str.equals(\"CUSTOM\")){\n\t\t\t\t//System.out.println(\"Got a Custom event\"+str);\n\t\t\t\tstr = evt.getHeader(\"Event-Subclass\",-1);\n\t\t\t\tif(str.equals(\"callcenter::info\")){\n\t\t\t\t\tSystem.out.println(\"Got a CallCenter event\"+str);\n\t\t\t\t\tstr = evt.getHeader(\"CC-Action\",-1);\n\t\t\t\t\t//System.out.println(evt.serialize(\"plain\"));\n\t\t\t\t\tif(str.equals(\"member-queue-start\")){\n\t\t\t\t\t\tSystem.out.println(\"Someone entering the queue \"+str);\n\t\t\t\t\t\t//CC-Queue: support@default\n\t\t\t\t\t\t//CC-Action: member-queue-start\n\t\t\t\t\t\t//CC-Member-UUID: 453324f8-3424-4322-4242362fd23d \n\t\t\t\t\t\t//CC-Member-Session-UUID: b77c49c2-a732-11df-9438-e7d9456f8886\n\t\t\t\t\t\t//CC-Member-CID-Name: CHOUINARD MO\n\t\t\t\t\t\t//CC-Member-CID-Number: 4385551212\n\t\t\t\t\t\tString Caller = evt.getHeader(\"CC-Member-CID-Number\",-1);\n\t\t\t\t\t\tif(Caller.startsWith(\"11\")){\n\t\t\t\t\t\t\tCaller = Caller.substring(2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(Caller.length()>10){\n\t\t\t\t\t\tCaller = Caller.substring(Caller.length()-10);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tString Query=\"Insert into Announcement(Number, Date, Mtype,Textualdate,CallUUID) value('\"+Caller+\"',NOW(),'M\"+mode+\"','\"+evt.getHeader(\"CC-Member-UUID\",-1)+\"','\"+evt.getHeader(\"CC-Member-Session-UUID\",-1)+\"')\";\n\t\t\t\t\t\tString Mesg= evt.getHeader(\"CC-Member-Session-UUID\",-1)+\",\";\n\t\t\t\t\t\t\t\tMesg+=updateandReturn(Query);\n\t\t\t\t\t\tif(mode<5){\n\t\t\t\t\t\t\tif(mode==0){\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//SimpleMessage p = new SimpleMessage(Mesg);\n\t\t\t\t\t\t\t\t//Thread th = new Thread(p);\n\t\t\t\t\t\t\t\t//th.start();\n\t\t\t\t\t\t\t}else if(mode==1){\n\t\t\t\t\t\t\t\tPosition p = new Position(Mesg);\n\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\tth.start();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(mode==2){\n\t\t\t\t\t\t\t\tSimpleTime p = new SimpleTime(Mesg);\n\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\tth.start();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(mode==3){\n\t\t\t\t\t\t\t\tDynamicTime p = new DynamicTime(Mesg);\n\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\tth.start();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(mode==4){\n\t\t\t\t\t\t\t\tManipulatedTime p = new ManipulatedTime(Mesg);\n\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\tth.start();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t//\tmessage_announce(evt.getHeader(\"CC-Member-Session-UUID\",-1));\n\t\t\t\t\t\tmode++;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t if(mode==5){\n\t\t\t\t\t\t\t\t\tSimpleMessage p = new SimpleMessage(Mesg);\n\t\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\t\tth.start();\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmode=0;\n\t\t\t\t\t\t}\n//\t\t\t\t\t\tSystem.out.println(evt.serialize(\"plain\"));\n\t\t\t\t\t\t//String Query=\"Insert into calls(StartTime, Number, Bound, TextualDate, CallUUID) values(Now(),'\"+Caller+\"','IN','\"+evt.getHeader(\"CC-Member-UUID\",-1)+\"','\"+evt.getHeader(\"CC-Member-Session-UUID\",-1)+\"')\";\n\t//update(Query);\n\t\t\t\t\t\t\t\t\t\n\t}\n\t\t\n\t\t\t\t}else{\n\t\t\t\t//\tSystem.out.println(\"EVent Subclass is \"+ str);\n\t//\t\t\t\tSystem.out.println(evt.serialize(\"plain\"));\n\t\t\t\t}\n\t\t\t}else{\n//\t\t\t\tSystem.out.println(evt.serialize(\"plain\"));\n\t\t\t}\n\n\t\t\t// Print the entire event in key : value format. serialize() according to the wiki usually takes no arguments\n\t\t\t// but if you do not put in something you will not get any output so I just stuck plain in.\t\t\t\n\n\t\t}\n\t}",
"public interface ProvDomainMgr extends ReqMsgClient\n{\n\n /**\n * Returns the message model type that this domain manager provides. The\n * return value is one of the types defined in\n * {@linkplain com.reuters.rfa.rdm.RDMMsgTypes}.\n * \n * @return the message model type that this domain manager provides.\n */\n short getMsgModelType();\n\n /**\n * Returns the name of service that this domain manager provides.\n * \n * @return the name of service that this domain manager provides.\n */\n String getServiceName();\n\n /**\n * Returns an OMMPool used by this domain manager.\n * \n * @return an OMMPool used by this domain manager.\n */\n OMMPool getPool();\n\n /**\n * Sends an OMM message to a client.\n * \n * @param token the client request token\n * @param encmsg the OMM message to submit\n */\n void submit(Token token, OMMMsg encmsg);\n\n}",
"public abstract interface LinphoneFriend\n/* 6: */ {\n/* 7: */ public abstract void setAddress(LinphoneAddress paramLinphoneAddress);\n/* 8: */ \n/* 9: */ public abstract LinphoneAddress getAddress();\n/* 10: */ \n/* 11: */ public abstract void setIncSubscribePolicy(SubscribePolicy paramSubscribePolicy);\n/* 12: */ \n/* 13: */ public abstract SubscribePolicy getIncSubscribePolicy();\n/* 14: */ \n/* 15: */ public abstract void enableSubscribes(boolean paramBoolean);\n/* 16: */ \n/* 17: */ public abstract boolean isSubscribesEnabled();\n/* 18: */ \n/* 19: */\n/* 22: */ public abstract OnlineStatus getStatus();\n/* 23: */ \n/* 24: */ public abstract PresenceModel getPresenceModel();\n/* 25: */ \n/* 26: */ public abstract void edit();\n/* 27: */ \n/* 28: */ public abstract void done();\n/* 29: */ \n/* 30: */ public abstract String toString();\n/* 31: */ \n/* 32: */ public abstract long getNativePtr();\n/* 33: */ \n/* 34: */ public abstract void setRefKey(String paramString);\n/* 35: */ \n/* 36: */ public abstract String getRefKey();\n/* 37: */ \n/* 38: */ public static class SubscribePolicy\n/* 39: */ {\n/* 40:40 */ private static Vector<SubscribePolicy> values = new Vector();\n/* 41: */ protected final int mValue;\n/* 42: */ private final String mStringValue;\n/* 43:47 */ public static final SubscribePolicy SPWait = new SubscribePolicy(0, \"SPWait\");\n/* 44:51 */ public static final SubscribePolicy SPDeny = new SubscribePolicy(1, \"SPDeny\");\n/* 45:55 */ public static final SubscribePolicy SPAccept = new SubscribePolicy(2, \"SPAccept\");\n/* 46: */ \n/* 47: */ private SubscribePolicy(int value, String stringValue)\n/* 48: */ {\n/* 49:59 */ this.mValue = value;\n/* 50:60 */ values.addElement(this);\n/* 51:61 */ this.mStringValue = stringValue;\n/* 52: */ }\n/* 53: */ \n/* 54: */ public static SubscribePolicy fromInt(int value)\n/* 55: */ {\n/* 56:65 */ for (int i = 0; i < values.size(); i++)\n/* 57: */ {\n/* 58:66 */ SubscribePolicy policy = (SubscribePolicy)values.elementAt(i);\n/* 59:67 */ if (policy.mValue == value) {\n/* 60:67 */ return policy;\n/* 61: */ }\n/* 62: */ }\n/* 63:69 */ throw new RuntimeException(\"Policy not found [\" + value + \"]\");\n/* 64: */ }\n/* 65: */ \n/* 66: */ public String toString()\n/* 67: */ {\n/* 68:72 */ return this.mStringValue;\n/* 69: */ }\n/* 70: */ }\n/* 71: */ }",
"@Override\n\tpublic void processMessage(Message message) {\n\t\t\n\t}",
"@Override\n public void messageReceived(IoSession session, Object message) throws Exception {\n Packet pacchetto = null;\n try {\n pacchetto = (Packet) message;\n } catch (Exception ex) {\n System.out.println(\"EXCEPTION Pacchetto non riconosciuto\");\n }\n /* OPERAZIONE LIBERA */\n if (pacchetto instanceof RegistrationCVRequest) {\n RegistrationCVRequest req = (RegistrationCVRequest) pacchetto;\n try {\n session.write(new RegistrationCVResponse(db.insertCV(req.getCv())));\n } catch (Exception ex) {\n session.write(new RegistrationCVResponse(false));\n }\n return;\n }\n /* OPERAZIONE LIBERA */\n if (pacchetto instanceof RegistrationVaccinatedRequest) {\n RegistrationVaccinatedRequest req = (RegistrationVaccinatedRequest) pacchetto;\n Vaccinazione v = req.getVaccinazione();\n String codVaccinazione;\n try {\n codVaccinazione = db.insertVaccination(v);\n } catch (Exception ex) {\n codVaccinazione = null;\n }\n RegistrationVaccinatedResponse response;\n if (codVaccinazione == null) {\n response = new RegistrationVaccinatedResponse(false, null);\n session.write(response);\n }\n else {\n response = new RegistrationVaccinatedResponse(true, Prettier.makeReadable(codVaccinazione));\n session.write(response);\n //Invio mail di conferma\n String email = req.getVaccinazione().getVaccinato().getEmail();\n if (email != null && !email.equals(\"\"))\n MailHelper.sendEmail(email, \"ID VACCINAZIONE PER \" + v.getVaccinato().getCodiceFiscale(), \"ID VACCINAZIONE: \" + Prettier.makeReadable(codVaccinazione));\n }\n\n return;\n }\n /* OPERAZIONE LIBERA */\n if (pacchetto instanceof UserRegistrationRequest) {\n UserRegistrationRequest req = (UserRegistrationRequest) pacchetto;\n UserRegistrationResponse response;\n try {\n boolean esito = db.registerUser(req.getVaccinato(), Prettier.normalizeKey(req.getKey()));\n if (esito) setClientAuthenticated(session, req.getVaccinato().getCodiceFiscale());\n response = new UserRegistrationResponse(esito);\n } catch (Exception ex) {\n response = new UserRegistrationResponse(false);\n }\n session.write(response);\n return;\n }\n /* OPERAZIONE LIBERA */\n if (pacchetto instanceof UserLoginRequest) {\n UserLoginRequest req = (UserLoginRequest) pacchetto;\n try {\n Vaccinato v = db.login(req.getUsername(), req.getPassword());\n if (v != null) {\n session.write(new UserLoginResponse(true, v));\n setClientAuthenticated(session, v.getCodiceFiscale());\n } else session.write(new UserLoginResponse(false));\n } catch (Exception ex) {\n session.write(new UserLoginResponse(false));\n }\n return;\n }\n /* OPERAZIONE VINCOLATA A LOGIN */\n if (pacchetto instanceof RegistrationEVRequest) {\n if (!isClientAuthenticated(session)) {\n session.write(new RegistrationEVResponse(false));\n return;\n }\n RegistrationEVRequest req = (RegistrationEVRequest) pacchetto;\n RegistrationEVResponse response;\n try {\n boolean esito = db.insertEvent(req.getEventoAvverso(), getAuthVaccinated(session));\n response = new RegistrationEVResponse(esito);\n } catch (Exception ex) {\n response = new RegistrationEVResponse(false);\n }\n session.write(response);\n return;\n }\n if(pacchetto instanceof UserDisconnectRequest){\n session.write(new UserDisconnectResponse(resetClientAuthenticated(session)));\n return;\n }\n /* OPERAZIONE LIBERA */\n if (pacchetto instanceof GetCVByNameRequest) {\n GetCVByNameRequest req = (GetCVByNameRequest) pacchetto;\n List<CentroVaccinale> list = null;\n boolean esito = false;\n try {\n list = db.getCV(req.getNome());\n esito = true;\n } catch (Exception ignored) {\n } finally {\n session.write(new GetCVResponse(esito, list));\n }\n return;\n }\n /* OPERAZIONE LIBERA */\n if (pacchetto instanceof GetCVByMunicipalityTypologyRequest) {\n GetCVByMunicipalityTypologyRequest req = (GetCVByMunicipalityTypologyRequest) pacchetto;\n List<CentroVaccinale> list = null;\n boolean esito = false;\n try {\n list = db.getCV(req.getMunicipality(), req.getTypology());\n esito = true;\n } catch (Exception ignored) {\n } finally {\n session.write(new GetCVResponse(esito, list));\n }\n return;\n }\n /* OPERAZIONE LIBERA */\n if (pacchetto instanceof GetAllCVRequest) {\n GetAllCVRequest req = (GetAllCVRequest) pacchetto;\n List<CentroVaccinale> list = null;\n boolean esito = false;\n try {\n list = db.getCV();\n esito = true;\n } catch (Exception ignored) {\n } finally {\n session.write(new GetCVResponse(esito, list));\n }\n return;\n }\n /* OPERAZIONE LIBERA */\n if (pacchetto instanceof GetVaccinationByKeyRequest) {\n GetVaccinationByKeyRequest req = (GetVaccinationByKeyRequest) pacchetto;\n try {\n Vaccinazione vaccinazione = db.getVaccinationById(Prettier.normalizeKey(req.getKey()));\n if (vaccinazione != null)\n session.write(new GetVaccinationByKeyResponse(true, vaccinazione));\n else\n session.write(new GetVaccinationByKeyResponse(false, null));\n } catch (Exception sqlexcp) {\n session.write(new GetVaccinationByKeyResponse(false, null));\n }\n return;\n }\n /* OPERAZIONE LIBERA */\n if (pacchetto instanceof GetVaccinesRequest) {\n try {\n session.write(new GetVaccinesResponse(true, db.getVaccines()));\n } catch (Exception excp) {\n session.write(new GetVaccinesResponse(false, null));\n }\n return;\n }\n /* OPERAZIONE LIBERA */\n if (pacchetto instanceof GetEVTypologiesRequest) {\n try {\n session.write(new GetEvTypologiesResponse(true, db.getEventTypes()));\n } catch (Exception excp) {\n session.write(new GetEvTypologiesResponse(false, null));\n }\n return;\n }\n /* OPERAZIONE LIBERA */\n if (pacchetto instanceof GetReportRequest) {\n GetReportRequest req = (GetReportRequest) pacchetto;\n try {\n session.write(new GetReportResponse(true, db.generateReport(req.getCv())));\n } catch (Exception excp) {\n session.write(new GetReportResponse(false, null));\n }\n }\n /* OPERAZIONE LIBERA */\n if (pacchetto instanceof CheckUserIdRequest) {\n try {\n session.write(new CheckUserIdResponse(db.checkUserIdExists(((CheckUserIdRequest) pacchetto).getUserId())));\n } catch (Exception excp) {\n session.write(new CheckUserIdResponse(false));\n }\n }\n /* OPERAZIONE LIBERA */\n if (pacchetto instanceof CheckEmailRequest) {\n try {\n session.write(new CheckEmailResponse(db.checkEmailExists(((CheckEmailRequest) pacchetto).getEmail())));\n } catch (Exception excp) {\n session.write(new CheckEmailResponse(false));\n }\n }\n /* OPERAZIONE LIBERA */\n if (pacchetto instanceof CheckVaccinatedCVRequest) {\n CentroVaccinale cv = ((CheckVaccinatedCVRequest) pacchetto).getCentroVaccinale();\n try {\n Vaccinazione vaccinazione = db.getLastVaccination(getAuthVaccinated(session));\n session.write(new CheckVaccinatedCVResponse(cv.equals(vaccinazione.getCentroVaccinale())));\n } catch (Exception ex) {\n session.write(new CheckVaccinatedCVResponse(false));\n }\n }\n }",
"@Override\r\n\tpublic void receiveMessage(Stanza stanza, Object payload) {\r\n\t\t//CHECK WHICH END BUNDLE TO BE CALLED THAT I MANAGE\r\n\t\tif (payload instanceof CalcBean){ \r\n\t\t\tCalcBean messageBean = (CalcBean)payload;\r\n\t\t\tLOG.debug(\"*** Message Recieved by ExampleCommMgr: \" + messageBean.getMessage());\r\n\t\t}\r\n\t}",
"public void receiveResultservicedis(\n ) {\n }",
"pb4server.MaxPrisonBuffAskReq getMaxPrisonBuffAskReq();",
"public String processMsg(RequestObject reqObj);",
"void sendMessage(String pid,String cmd,MintReply mr,int flags)\n{\n sendMessage(pid,cmd,null,mr,flags);\n}",
"public static void test_4a() {\r\n try {\r\n System.out.println(\"\\n\\nTest Case - 4A :\\n\\n\");\r\n TestNetwork n = new TestNetwork(5, 5, 2);\r\n Paxos p = new Paxos(n);\r\n p.runPaxos();\r\n Thread.sleep(1000);\r\n n.change_DPmode(1, 1); // All proposers are Distinguished\r\n n.dup_msg(0, 2); // Duplicate messages sent by proposer 0\r\n n.dup_msg(1, 2); // Duplicate messages sent by proposer 1\r\n n.dup_msg(3, 2); // Duplicate messages sent by proposer 3\r\n Thread.sleep(5000);\r\n n.terminate_run();\r\n Thread.sleep(2000);\r\n System.out.println(\"\\n\\nTERMINATED PAXOS RUN-4A\");\r\n n.printTrace();\r\n } catch(Exception e) {}\r\n}",
"@Test\n public void test0() throws Throwable {\n GeneralMsgProcessor generalMsgProcessor0 = new GeneralMsgProcessor();\n LoginMsg loginMsg0 = new LoginMsg(\"h& !r>&<`yO$A@g\", \"h& !r>&<`yO$A@g\", 0);\n generalMsgProcessor0.processMsg((Message) loginMsg0);\n }",
"com.lxd.protobuf.msg.result.user.User.User_OrBuilder getUserOrBuilder();",
"@Override\n\tpublic void receiveProduct(Product product) {\n\t\t\n\t}",
"public interface IProtocol {\r\n int ADD_ELEMENT = 2100; // parent, 0, Elements.Extra\r\n\r\n int CLEAR_CHILDREN = 2005; // parent\r\n\r\n int CONTROL_ABOUT = 3001;\r\n\r\n int CONTROL_DELETE_SAVE = 3003;\r\n\r\n // int CONTROL_RESTART = 3004;\r\n int CONTROL_FORCE_CLICK = 3005;\r\n\r\n int CONTROL_HELP = 3002;\r\n\r\n // int UPDATE_SCROLL = 5;\r\n int DISPLAY_TOAST = 2001; // OBJ = text\r\n\r\n int ON_CLICK = 1101; // OBJ = view\r\n\r\n int ON_CREATE = 1001; // OBJ = bundle\r\n\r\n int ON_DESTROY = 1006;\r\n\r\n int ON_PAUSE = 1004;\r\n\r\n int ON_RESUME = 1003;\r\n\r\n int ON_START = 1002;\r\n\r\n int ON_STOP = 1005;\r\n\r\n int ON_TOUCH_EVENT = 1103;\r\n\r\n int SET_THEME = 5001;\r\n\r\n int SHOW_HELP_PAGE = 4001;\r\n\r\n int SHOW_LICENSE = 4002;\r\n\r\n int UPDATE_COLOR = 2;\r\n\r\n int UPDATE_ENABLED = 3;\r\n\r\n int UPDATE_INFLATE = 4;\r\n\r\n int UPDATE_TEXT = 1;\r\n\r\n int UPDATE_VIEW = 0;\r\n}",
"com.mycompany.midtermproject2.proto.ServerMessageOuterClass.ServerMessage.MsgType getType();",
"public interface UserServiceInformationBase extends ISUPParameter {\n \t\n \t//for parameters list see ITU-T Q.763 (12/1999) 3.57\n \t//Recommendation Q.931 (05/98) Table 4-6/Q.931 Bearer capability information element\n \t//Dialogic User Service Information structure : http://www.dialogic.com/webhelp/NASignaling/Release%205.1/NA_ISUP_Layer_Dev_Ref_Manual/user_service_information.htm\n\n \t//LAYER IDENTIFIERS\n \tpublic static final int _LAYER1_IDENTIFIER=0x1;\n\n \tpublic static final int _LAYER2_IDENTIFIER=0x2;\n\n\tpublic static final int _LAYER3_IDENTIFIER=0x3;\n\n \t//CODING STANDART OPTIONS\n \tpublic static final int _CS_CCITT=0;\n \t\n \tpublic static final int _CS_INTERNATIONAL=1;\n \t\n \tpublic static final int _CS_NATIONAL=2;\n \t\n \tpublic static final int _CS_NETWORK=3;\n \t\n \t//INFORMATION TRANSFER CAPABILITIES OPTIONS\n \tpublic static final int _ITS_SPEECH=0;\n \t\n \tpublic static final int _ITS_UNRESTRICTED_DIGITAL=8;\n \t\n \tpublic static final int _ITS_RESTRICTED_DIGITAL=9;\n \t\n \tpublic static final int _ITS_3_1_KHZ=16;\n \t\n \tpublic static final int _ITS_UNRESTRICTED_DIGITAL_WITH_TONES=17;\n \t\n \tpublic static final int _ITS_VIDEO=24;\n \t\n \t//TRANSFER MODE OPTIONS\n \tpublic static final int _TM_CIRCUIT=0;\n \t\n \tpublic static final int _TM_PACKET=2;\n \t\n \t//INFORMATION TRANSFER RATE OPTIONS\n \tpublic static final int _ITR_PACKET_MODE=0;\n \t\n \tpublic static final int _ITR_64=16;\n \t\n \tpublic static final int _ITR_64x2=17;\n \t\n \tpublic static final int _ITR_384=19;\n \t\n \tpublic static final int _ITR_1536=21;\n \t\n \tpublic static final int _ITR_1920=23;\n \t\n \tpublic static final int _ITR_MULTIRATE=24;\n \t\n \t//SYNC/ASYNC OPTIONS\n \tpublic static final int _SA_SYNC=0;\n \t\n \tpublic static final int _SA_ASYNC=1;\n \t\n \t//NEGOTIATION OPTIONS\t\t\n \tpublic static final int _NG_INBAND_NOT_POSSIBLE=0;\n \t\n \tpublic static final int _NG_INBAND_POSSIBLE=1;\n \t\n \t//USER RATE OPTIONS\n \tpublic static final int _UR_EBITS=0;\n \t\n \tpublic static final int _UR_0_6=1;\n \t\n \tpublic static final int _UR_1_2=2;\n \t\n \tpublic static final int _UR_2_4=3;\n \t\n \tpublic static final int _UR_3_6=4;\n \t\n \tpublic static final int _UR_4_8=5;\n \t\n \tpublic static final int _UR_7_2=6;\n \t\n \tpublic static final int _UR_8_0=7;\n \t\n \tpublic static final int _UR_9_6=8;\n \t\n \tpublic static final int _UR_14_4=9;\n \t\n \tpublic static final int _UR_16_0=10;\n \t\n \tpublic static final int _UR_19_2=11;\n \t\n \tpublic static final int _UR_32_0=12;\n \t\n \tpublic static final int _UR_38_4=13;\n \t\n \tpublic static final int _UR_48_0=14;\n \t\n \tpublic static final int _UR_56_0=15;\n \t\n \tpublic static final int _UR_57_6=18;\n \t\n \tpublic static final int _UR_28_8=19;\n \t\n \tpublic static final int _UR_24_0=20;\n \t\n \tpublic static final int _UR_0_1345=21;\n \t\n \tpublic static final int _UR_0_1=22;\n \t\n \tpublic static final int _UR_0_075_ON_1_2=23;\n \t\n \tpublic static final int _UR_1_2_ON_0_075=24;\n \t\n \tpublic static final int _UR_0_050=25;\n \t\n \tpublic static final int _UR_0_075=26;\n \t\n \tpublic static final int _UR_0_110=27;\n \t\n \tpublic static final int _UR_0_150=28;\n \t\n \tpublic static final int _UR_0_200=29;\n \t\n \tpublic static final int _UR_0_300=30;\n \t\n \tpublic static final int _UR_12_0=31;\n \t\n \t//INTERMEDIATE RATE OPTIONS\n \tpublic static final int _IR_NOT_USED=0;\n \t\n \tpublic static final int _IR_8_0=1;\n \t\n \tpublic static final int _IR_16_0=2;\n \t\n \tpublic static final int _IR_32_0=3;\n \t\n \t//NETWORK INDEPENDENT CLOCK ON TX\n \tpublic static final int _NICTX_NOT_REQUIRED=0;\n \t\n \tpublic static final int _NICTX_REQUIRED=1;\n \t\n \t//NETWORK INDEPENDENT CLOCK ON RX\n \tpublic static final int _NICRX_CANNOT_ACCEPT=0;\n \t\n \tpublic static final int _NICRX_CAN_ACCEPT=1;\n \t\n \t//FLOW CONTROL ON TX\n \tpublic static final int _FCTX_NOT_REQUIRED=0;\n \t\n \tpublic static final int _FCTX_REQUIRED=1;\n \t\n \t//FLOW CONTROL ON RX\n \tpublic static final int _FCRX_CANNOT_ACCEPT=0;\n \t\n \tpublic static final int _FCRX_CAN_ACCEPT=1;\n \t\n \t//RATE ADAPTATION HEADER OPTIONS\n \tpublic static final int _HDR_INCLUDED=0;\n \t\n \tpublic static final int _HDR_NOT_INCLUDED=1;\n \t\n \t//MULTIFRAME OPTIONS\n \tpublic static final int _MF_NOT_SUPPORTED=0;\n \t\n \tpublic static final int _MF_SUPPORTED=1;\n \t\n \t//MODE OPTIONS\n \tpublic static final int _MODE_BIT_TRANSPARENT=0;\n \t\n \tpublic static final int _MODE_PROTOCOL_SENSITIVE=1;\n \t\n \t//LOGICAL LINK IDENTIFIER OPTIONS\n \tpublic static final int _LLI_256=0;\n \t\n \tpublic static final int _LLI_FULL_NEGOTIATION=1;\n \t\n \t//ASSIGNOR / ASSIGNEE OPTIONS\n \tpublic static final int _ASS_DEFAULT_ASSIGNEE=0;\n \t\n \tpublic static final int _ASS_ASSIGNOR_ONLY=1;\n \t\n \t//INBAND/OUT OF BAND NEGOTIATION OPTIONS\n \tpublic static final int _NEG_USER_INFORMATION=0;\n \t\t\n \tpublic static final int _NEG_INBAND=1;\n \t\t\n \t//STOP BITS OPTIONS\n \tpublic static final int _SB_NOT_USED=0;\n \t\n \tpublic static final int _SB_1BIT=1;\n \t\n \tpublic static final int _SB_1_5BITS=2;\n \t\n \tpublic static final int _SB_2BITS=3;\n \t\n \t//DATA BITS OPTIONS\n \tpublic static final int _DB_NOT_USED=0;\n \t\t\n \tpublic static final int _DB_5BITS=1;\n \t\t\n \tpublic static final int _DB_7BITS=2;\n \t\t\n \tpublic static final int _DB_8BITS=3;\n \t\t\n \t//PARITY INFORMATION\n \tpublic static final int _PAR_ODD=0;\n \t\t\t\n \tpublic static final int _PAR_EVEN=2;\n \t\t\t\n \tpublic static final int _PAR_NONE=3;\n \t\t\n \tpublic static final int _PAR_FORCED_0=4;\n \t\t\n \tpublic static final int _PAR_FORCED_1=5;\n \t\n \t//DUPLEX INFORMATION\n \tpublic static final int _DUP_HALF=0;\n \t\n \tpublic static final int _DUP_FULL=1;\n \t\t\t\n \t//MODEM TYPE INFORMATION\n \tpublic static final int _MODEM_V21=17;\n \t\n \tpublic static final int _MODEM_V22=18;\n \t\n \tpublic static final int _MODEM_V22_BIS=19;\n \t\n \tpublic static final int _MODEM_V23=20;\n \t\n \tpublic static final int _MODEM_V26=21;\n \t\n \tpublic static final int _MODEM_V26_BIS=22;\n \t\n \tpublic static final int _MODEM_V26_TER=23;\n \t\n \tpublic static final int _MODEM_V27=24;\n \t\n \tpublic static final int _MODEM_V27_BIS=25;\n \t\n \tpublic static final int _MODEM_V27_TER=26;\n \t\n \tpublic static final int _MODEM_V29=27;\n \t\n \tpublic static final int _MODEM_V32=29;\n \t\n \tpublic static final int _MODEM_V34=30;\n \t\n \t//LAYER 1 USER INFORMATION OPTIONS\n \tpublic static final int _L1_ITUT_110=1;\n \t\n \tpublic static final int _L1_G11_MU=2;\n \t\n \tpublic static final int _L1_G711_A=3;\n \t\n \tpublic static final int _L1_G721_ADPCM=4;\n \t\t\n \tpublic static final int _L1_G722_G725=5;\n \t\n \tpublic static final int _L1_H261=6;\n \t\n \tpublic static final int _L1_NON_ITUT=7;\n \t\n \tpublic static final int _L1_ITUT_120=8;\n \t\n \tpublic static final int _L1_ITUT_X31=9;\n \t\n \t//LAYER 2 USER INFORMATION OPTIONS\n \tpublic static final int _L2_BASIC=1;\n \t\n \tpublic static final int _L2_Q921=2;\n \t\n \tpublic static final int _L2_X25_SLP=6;\n \t\n \tpublic static final int _L2_X25_MLP=7;\n \t\n \tpublic static final int _L2_T71=8;\n \t\n \tpublic static final int _L2_HDLC_ARM=9;\n \t\n \tpublic static final int _L2_HDLC_NRM=10;\n \t\n \tpublic static final int _L2_HDLC_ABM=11;\n \t\n \tpublic static final int _L2_LAN_LLC=12;\n \t\n \tpublic static final int _L2_X75_SLP=13;\n \t\n \tpublic static final int _L2_Q922=14;\n \t\n \tpublic static final int _L2_USR_SPEC=16;\n \t\n \tpublic static final int _L2_T90=17;\n \t\n \t\n \t//LAYER 3 USER INFORMATION OPTIONS\n \tpublic static final int _L3_Q931=2;\n \t\n \tpublic static final int _L3_T90=5;\n \t\n \tpublic static final int _L3_X25_PLP=6;\n \t\n \tpublic static final int _L3_ISO_8208=7;\n \t\n \tpublic static final int _L3_ISO_8348=8;\n \t\n \tpublic static final int _L3_ISO_8473=9;\n \t\n \tpublic static final int _L3_T70=10;\n \t\n \tpublic static final int _L3_ISO_9577=11;\n \t\n \tpublic static final int _L3_USR_SPEC=16;\n \t\n \t\n \t//LAYER 3 PROTOCOL OPTIONS;\n \tpublic static final int _L3_PROT_IP=204;\n \t\n \tpublic static final int _L3_PROT_P2P=207;\n \t\n \tpublic int getCodingStandart();\n \n \tpublic void setCodingStandart(int codingStandart);\n \t\n \tpublic int getInformationTransferCapability();\n \n \tpublic void setInformationTransferCapability(int informationTransferCapability);\n \n \tpublic int getTransferMode();\n \n \tpublic void setTransferMode(int transferMode);\n \t\n \tpublic int getInformationTransferRate();\n \n \tpublic void setInformationTransferRate(int informationTransferRate);\n \t\n \t//custom rate in 64Kbps units\n \tpublic int getCustomInformationTransferRate();\n \t\n \tpublic void setCustomInformationTransferRate(int informationTransferRate);\n \t\n \t//TO CLEAR USER INFORMATION ON EACH LAYER SET IT TO 0\n \tpublic int getL1UserInformation();\n \n \tpublic void setL1UserInformation(int l1UserInformation);\n \t\n \tpublic int getL2UserInformation();\n \n \tpublic void setL2UserInformation(int l2UserInformation);\n \t\n \tpublic int getL3UserInformation();\n \n \tpublic void setL3UserInformation(int l3UserInformation);\n \t\n \tpublic int getSyncMode();\n \n \tpublic void setSyncMode(int syncMode);\n \t\n \tpublic int getNegotiation();\n \n \tpublic void setNegotiation(int negotiation);\n \t\n \tpublic int getUserRate();\n \n \tpublic void setUserRate(int userRate);\n \t\n \tpublic int getIntermediateRate();\n \n \tpublic void setIntermediateRate(int intermediateRate);\n \t\n \tpublic int getNicOnTx();\n \n \tpublic void setNicOnTx(int nicOnTx);\n \t\n \tpublic int getNicOnRx();\n \n \tpublic void setNicOnRx(int nicOnRx);\n \t\n \tpublic int getFlowControlOnTx();\n \n \tpublic void setFlowControlOnTx(int fcOnTx);\n \t\n \tpublic int getFlowControlOnRx();\n \n \tpublic void setFlowControlOnRx(int fcOnRx);\n \t\n \tpublic int getHDR();\n \n \tpublic void setHDR(int hdr);\n \t\n \tpublic int getMultiframe();\n \n \tpublic void setMultiframe(int multiframe);\n \t\n \tpublic int getMode();\n \n \tpublic void setMode(int mode);\n \t\n \tpublic int getLLINegotiation();\n \n \tpublic void setLLINegotiation(int lli);\n \t\n \tpublic int getAssignor();\n \n \tpublic void setAssignor(int assignor);\n \t\n \tpublic int getInBandNegotiation();\n \n \tpublic void setInBandNegotiation(int inBandNegotiation);\n \t\n \tpublic int getStopBits();\n \n \tpublic void setStopBits(int stopBits);\n \t\n \tpublic int getDataBits();\n \n \tpublic void setDataBits(int dataBits);\n \t\n \tpublic int getParity();\n \n \tpublic void setParity(int parity);\n \t\n \tpublic int getDuplexMode();\n \n \tpublic void setDuplexMode(int duplexMode);\n \t\n \tpublic int getModemType();\n \n \tpublic void setModemType(int modemType);\n \t\n \tpublic int getL3Protocol();\n \n \tpublic void setL3Protocol(int l3Protocol);\n \n }",
"@Override\n protected void prot() {\n }",
"void messageReceived(IMSession session, Message message);",
"public void receiveResultGetMWSInfoProperties(\r\n\t\t\tcom.autometrics.analytics.v9.j2ee.webservices.v1_0.GetMWSInfoPropertiesResponse result) {\r\n\t}",
"@Override\n\tpublic void info(Message msg) {\n\n\t}",
"com.zzsong.netty.protobuff.two.ProtoData.Person getPerson();"
] |
[
"0.5734592",
"0.5734592",
"0.5527332",
"0.5499998",
"0.5499435",
"0.5489247",
"0.5457216",
"0.5440898",
"0.54014724",
"0.53804964",
"0.5372968",
"0.5368562",
"0.53470653",
"0.53434664",
"0.5343221",
"0.53396446",
"0.53262293",
"0.5309164",
"0.530515",
"0.5296908",
"0.52796954",
"0.5267273",
"0.5263047",
"0.5257833",
"0.52423584",
"0.52422214",
"0.5227946",
"0.5223694",
"0.5222528",
"0.5213805",
"0.5204855",
"0.51861995",
"0.5184689",
"0.5176831",
"0.51659775",
"0.5157488",
"0.51486593",
"0.5142448",
"0.5141914",
"0.5122452",
"0.5112508",
"0.5103359",
"0.50986993",
"0.5094537",
"0.5082299",
"0.5080797",
"0.5073253",
"0.5071872",
"0.50659907",
"0.506567",
"0.50566053",
"0.5054504",
"0.5050796",
"0.5047358",
"0.5045084",
"0.50410306",
"0.5039523",
"0.50378215",
"0.50270873",
"0.5026343",
"0.5021078",
"0.50180167",
"0.50166523",
"0.5013733",
"0.5011964",
"0.5009567",
"0.5004342",
"0.5002816",
"0.49975574",
"0.49916378",
"0.4990235",
"0.49794006",
"0.49673933",
"0.49668127",
"0.49631035",
"0.49616677",
"0.49592465",
"0.4954632",
"0.4954632",
"0.49542087",
"0.49531105",
"0.49503428",
"0.49493068",
"0.49460372",
"0.4939002",
"0.49356276",
"0.49353963",
"0.49323",
"0.49316308",
"0.49298295",
"0.49268657",
"0.49202412",
"0.49195683",
"0.4907538",
"0.49062172",
"0.49060488",
"0.4905276",
"0.490203",
"0.48948693",
"0.48917338",
"0.4891415"
] |
0.0
|
-1
|
required .cn.mxz.protocols.user.PropsPro unReceived = 1112331;
|
boolean hasUnReceived();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"@Override public boolean requireAllPresenceValues() throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nboolean _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\nmRemote.transact(Stub.TRANSACTION_requireAllPresenceValues, _data, _reply, 0);\n_reply.readException();\n_result = (0!=_reply.readInt());\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}",
"void mo23214a(Message message);",
"@Override public int[] getSupportedPresenceStatus() throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nint[] _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\nmRemote.transact(Stub.TRANSACTION_getSupportedPresenceStatus, _data, _reply, 0);\n_reply.readException();\n_result = _reply.createIntArray();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}",
"void mo80456b(Message message);",
"private SigmaProtocolMsg receiveMsgFromProver() throws ClassNotFoundException, IOException {\n\t\tSerializable msg = null;\n\t\ttry {\n\t\t\t//receive the mesage.\n\t\t\tmsg = channel.receive();\n\t\t} catch (IOException e) {\n\t\t\tthrow new IOException(\"failed to receive the a message. The thrown message is: \" + e.getMessage());\n\t\t}\n\t\t//If the given message is not an instance of SigmaProtocolMsg, throw exception.\n\t\tif (!(msg instanceof SigmaProtocolMsg)){\n\t\t\tthrow new IllegalArgumentException(\"the given message should be an instance of SigmaProtocolMsg\");\n\t\t}\n\t\t//Return the given message.\n\t\treturn (SigmaProtocolMsg) msg;\n\t}",
"@Override\r\n\tpublic void messageReceived(Object obj) {\n\t\t\r\n\t}",
"public void securityMessageReceived(CallPeerSecurityMessageEvent event);",
"@Override\n\tpublic void msgReceived(Message msg) {\n\n\t}",
"UnreceivedMsg.Res getUnreceivedMsgRes();",
"@Override\n public void onReceive(Object msg) throws Exception {\n }",
"@Override public java.lang.String getUserAvaibility(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\njava.lang.String _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getUserAvaibility, _data, _reply, 0);\n_reply.readException();\n_result = _reply.readString();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}",
"public interface TCPProtocolPropertiesOperations extends org.omg.RTCORBA.ProtocolPropertiesOperations {\n int send_buffer_size();\n void send_buffer_size(int arg);\n int recv_buffer_size();\n void recv_buffer_size(int arg);\n boolean keep_alive();\n void keep_alive(boolean arg);\n boolean dont_route();\n void dont_route(boolean arg);\n boolean no_delay();\n void no_delay(boolean arg);\n}",
"@Override\n public void OnMessage(User user, byte[] bytes) {\n throw new UnsupportedOperationException(\"Unimplemented method 'OnMessage'\");\n }",
"frame.game.proto.User.UserInfo getUser();",
"frame.game.proto.User.UserInfo getUser();",
"void mo80453a(Message message);",
"public int getMsgType(){\r\n return localMsgType;\r\n }",
"public void upcall(ReadMessage m) {\n \tObject mesg;\r\n \t\r\n try {\r\n mesg = m.readObject();\r\n } catch (ClassNotFoundException e) {\r\n mesg = null;\r\n } catch (IOException e) {\r\n mesg = null;\r\n e.printStackTrace();\r\n } catch (Throwable th) {\r\n mesg = null;\r\n th.printStackTrace();\r\n }\r\n\r\n IbisIdentifier ii = m.origin().ibisIdentifier();\r\n\r\n if (mesg != null) {\r\n ProcessIdentifier pi = new ProcessIdentifier(ii);\r\n if (mesg instanceof RepMILTMMessage) {\r\n\r\n // DEBUG\r\n /* System.err.println(\"Got RepMI upcall of type \"\r\n + ((RepMILTMMessage) mesg).arg.getType() + \" from \"\r\n + m.origin().name());\r\n*/\r\n if (((RepMILTMMessage) mesg).arg.getType() == Operation.LW)\r\n ((RepMILTMMessage) mesg).arg.setType(Operation.RW);\r\n\r\n /* i might not do communication, so i delay the call to m.finish */\r\n proto.processRemoteOperation(((RepMILTMMessage) mesg).arg,\r\n ((RepMILTMMessage) mesg).localLTM, pi, m);\r\n return;\r\n\r\n } else if (mesg instanceof RepMIJoinMessage) {\r\n\r\n// DEBUG\r\n /* System.err.println(\"Got RepMI upcall for joining from \"\r\n + m.origin().name());\r\n */\r\n /*\r\n * needs to be called to release the thread before entering the\r\n * processJoin call which will broadcast the join request to all\r\n * other processes in the system\r\n */\r\n ReceivePortIdentifier joinAckPort = ((RepMIJoinMessage) mesg).recvPortId;\r\n ReceivePortIdentifier joiningIbisPort = ((RepMIJoinMessage) mesg).ibisRPI;\r\n ReceivePortIdentifier joinAckNormalNode = ((RepMIJoinMessage) mesg).joinAckNormalNode;\r\n\r\n try {\r\n m.finish();\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n\r\n proto.processJoin(pi, joinAckPort, joiningIbisPort,\r\n joinAckNormalNode);\r\n\r\n return;\r\n\r\n } else if (mesg instanceof RepMISOSMessage) {\r\n try {\r\n m.finish();\r\n } catch (IOException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n proto.processSOS(ii, ((RepMISOSMessage) mesg).TS,\r\n ((RepMISOSMessage) mesg).recoveryRound);\r\n return;\r\n\r\n } else if (mesg instanceof RepMISOSReplyMessage) {\r\n proto.processSOSReply(ii,\r\n ((RepMISOSReplyMessage) mesg).whomIHelp,\r\n ((RepMISOSReplyMessage) mesg).TS,\r\n ((RepMISOSReplyMessage) mesg).myOps);\r\n return;\r\n }\r\n }\r\n }",
"@Override\n\tpublic void onPMessage(String arg0, String arg1, String arg2) {\n\t\t\n\t}",
"public EVT_RPC_LOGIN() {\n/* 629 */ super(W32APITypeMapper.UNICODE);\n/* */ }",
"public void OnMessageReceived(String msg);",
"public NbaProcRetrieveMibFollowUps() {\n super();\n }",
"@Override\n protected void prepareHandshakeMessageContents() {\n }",
"public void mo1611c() {\r\n Message.obtain(this.f4603a.f4598n, 6, null).sendToTarget();\r\n }",
"@Override\n\tpublic void onMessage(Object arg0) {\n\t\t\n\t}",
"@Override\n protected void managedInputMessage(String message) throws IOException, ClassNotFoundException {\n Message objectResponse;\n try {\n objectResponse = (Message) ois.readObject();\n //System.out.println(\"(\" + ourNode.getName() + \") Object response from \" + connectedNode.getName() + \": \" + objectResponse.getSrc());\n callback.onMessageReceived(objectResponse);\n } catch (Exception e) {\n System.err.println(\"Excepcio en la lectura de l'objecte!\");\n e.printStackTrace();\n }\n }",
"@Override\r\n public void handleMessage(Message msg) {\n }",
"@Override\n\t\tpublic void onDirectMessage(DirectMessage arg0) {\n\t\t\t\n\t\t}",
"public interface OnUserProfilReceived {\n\n void onUserProfilReceived(UserProfilEBDD userProfilEBDD);\n}",
"<init>( com.whatsapp.client.FunXMPPRunner$2, com.whatsapp.client.FunXMPPRunner, java.io.InputStream, java.io.OutputStream, javax.microedition.io.StreamConnection ); // address: 0\n\t{\n\tenter \n\taload_0 \n\tinvokespecial_lib java.lang.Object.<init> // pc=1\n\taload_0 \n\taload_1 \n\tputfield .field_3_3 // get_name_1: .field_3_3 // get_name_2: .field_3_3 // get_Name: .field_3_3 // getName->1: null // getName->2: null // getName->N: null // ofs = -1 ord = 0 addr = 3\n\taload_0 \n\taload_2 \n\tputfield .field_0_ // get_name_1: .field_0_ // get_name_2: .field_0_ // get_Name: .field_0_ // getName->1: null // getName->2: null // getName->N: null // ofs = -1 ord = 0 addr = 0\n\taload_0 \n\taload_3 \n\tputfield .field_1_1 // get_name_1: .field_1_1 // get_name_2: .field_1_1 // get_Name: .field_1_1 // getName->1: null // getName->2: null // getName->N: null // ofs = -1 ord = 0 addr = 1\n\taload_0 \n\taload_4 \n\tputfield .field_2_2 // get_name_1: .field_2_2 // get_name_2: .field_2_2 // get_Name: .field_2_2 // getName->1: null // getName->2: null // getName->N: null // ofs = -1 ord = 0 addr = 2\n\treturn \n\t}\n\n\t// @@@@@@@@@@@@@ Virtual routines \n\npublic final run( com.whatsapp.client.FunXMPPRunner$2 );",
"public pam_message(Pointer src) {\n useMemory(src);\n read();\n }",
"@Override\n public void onObjectMessage(ReceivedObjectMessage message) {\n //ignore the message\n }",
"pb4server.KillPrisonAskReq getKillPrisonAskReq();",
"public void notifyNoKAliveReceived (COPSPdpOSReqStateMan man);",
"pb4server.MaxPrisonBuffAskReq getMaxPrisonBuffAskReq();",
"java.lang.String getUserMessage();",
"@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tswitch (msg.what) {\n\t\t\tcase DDef.FINISH_BIND:\n\t\t\t\tmObjProtocol = (Protocol) msg.obj;\n\t\t\t\tInquiry();\n\t\t\t\tbreak;\n\t\t\tcase DDef.AIR_CMD_ID:\n\t\t\t\tsetAirAttr((AirInfo) msg.obj);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tsuper.handleMessage(msg);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"public interface IPresenceMapping extends android.os.IInterface\n{\n/** Local-side IPC implementation stub class. */\npublic static abstract class Stub extends android.os.Binder implements info.guardianproject.otr.app.im.plugin.IPresenceMapping\n{\nprivate static final java.lang.String DESCRIPTOR = \"info.guardianproject.otr.app.im.plugin.IPresenceMapping\";\n/** Construct the stub at attach it to the interface. */\npublic Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}\n/**\n * Cast an IBinder object into an info.guardianproject.otr.app.im.plugin.IPresenceMapping interface,\n * generating a proxy if needed.\n */\npublic static info.guardianproject.otr.app.im.plugin.IPresenceMapping asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof info.guardianproject.otr.app.im.plugin.IPresenceMapping))) {\nreturn ((info.guardianproject.otr.app.im.plugin.IPresenceMapping)iin);\n}\nreturn new info.guardianproject.otr.app.im.plugin.IPresenceMapping.Stub.Proxy(obj);\n}\n@Override public android.os.IBinder asBinder()\n{\nreturn this;\n}\n@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException\n{\nswitch (code)\n{\ncase INTERFACE_TRANSACTION:\n{\nreply.writeString(DESCRIPTOR);\nreturn true;\n}\ncase TRANSACTION_requireAllPresenceValues:\n{\ndata.enforceInterface(DESCRIPTOR);\nboolean _result = this.requireAllPresenceValues();\nreply.writeNoException();\nreply.writeInt(((_result)?(1):(0)));\nreturn true;\n}\ncase TRANSACTION_getPresenceStatus:\n{\ndata.enforceInterface(DESCRIPTOR);\nboolean _arg0;\n_arg0 = (0!=data.readInt());\njava.lang.String _arg1;\n_arg1 = data.readString();\njava.util.Map _arg2;\njava.lang.ClassLoader cl = (java.lang.ClassLoader)this.getClass().getClassLoader();\n_arg2 = data.readHashMap(cl);\nint _result = this.getPresenceStatus(_arg0, _arg1, _arg2);\nreply.writeNoException();\nreply.writeInt(_result);\nreturn true;\n}\ncase TRANSACTION_getOnlineStatus:\n{\ndata.enforceInterface(DESCRIPTOR);\nint _arg0;\n_arg0 = data.readInt();\nboolean _result = this.getOnlineStatus(_arg0);\nreply.writeNoException();\nreply.writeInt(((_result)?(1):(0)));\nreturn true;\n}\ncase TRANSACTION_getUserAvaibility:\n{\ndata.enforceInterface(DESCRIPTOR);\nint _arg0;\n_arg0 = data.readInt();\njava.lang.String _result = this.getUserAvaibility(_arg0);\nreply.writeNoException();\nreply.writeString(_result);\nreturn true;\n}\ncase TRANSACTION_getExtra:\n{\ndata.enforceInterface(DESCRIPTOR);\nint _arg0;\n_arg0 = data.readInt();\njava.util.Map _result = this.getExtra(_arg0);\nreply.writeNoException();\nreply.writeMap(_result);\nreturn true;\n}\ncase TRANSACTION_getSupportedPresenceStatus:\n{\ndata.enforceInterface(DESCRIPTOR);\nint[] _result = this.getSupportedPresenceStatus();\nreply.writeNoException();\nreply.writeIntArray(_result);\nreturn true;\n}\n}\nreturn super.onTransact(code, data, reply, flags);\n}\nprivate static class Proxy implements info.guardianproject.otr.app.im.plugin.IPresenceMapping\n{\nprivate android.os.IBinder mRemote;\nProxy(android.os.IBinder remote)\n{\nmRemote = remote;\n}\n@Override public android.os.IBinder asBinder()\n{\nreturn mRemote;\n}\npublic java.lang.String getInterfaceDescriptor()\n{\nreturn DESCRIPTOR;\n}\n/**\n * Tells if the mapping needs all presence values sent in protocol. If this\n * method returns true, the framework will pass all the presence values\n * received from the server when map to the predefined status.\n *\n * @return true if needs; false otherwise.\n */\n@Override public boolean requireAllPresenceValues() throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nboolean _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\nmRemote.transact(Stub.TRANSACTION_requireAllPresenceValues, _data, _reply, 0);\n_reply.readException();\n_result = (0!=_reply.readInt());\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}\n/**\n * Map the presence values sent in protocol to the predefined presence\n * status.\n *\n * @param onlineStatus The value of presence <OnlineStatus> received\n * from the server.\n * @param userAvailability The value of presence <UserAvailibility>\n * received from the server.\n * @param allValues The whole presence values received from the server.\n * @return a predefined status.\n * @see #requireAllPresenceValues()\n */\n@Override public int getPresenceStatus(boolean onlineStatus, java.lang.String userAvailability, java.util.Map allValues) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nint _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(((onlineStatus)?(1):(0)));\n_data.writeString(userAvailability);\n_data.writeMap(allValues);\nmRemote.transact(Stub.TRANSACTION_getPresenceStatus, _data, _reply, 0);\n_reply.readException();\n_result = _reply.readInt();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}\n/**\n * Gets the value of <OnlineStatus> will be sent to the server when\n * update presence to the predefined status.\n *\n * @param status the predefined status.\n * @return The value of <OnlineStatus> will be sent to the server\n */\n@Override public boolean getOnlineStatus(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nboolean _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getOnlineStatus, _data, _reply, 0);\n_reply.readException();\n_result = (0!=_reply.readInt());\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}\n/**\n * Gets the value of <UserAvaibility> will be sent to the server when\n * update presence to the predefined status.\n *\n * @param status the predefined status.\n * @return The value of <UserAvaibility> will be sent to the server\n */\n@Override public java.lang.String getUserAvaibility(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\njava.lang.String _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getUserAvaibility, _data, _reply, 0);\n_reply.readException();\n_result = _reply.readString();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}\n/**\n * Gets the extra presence values other than <OnlineStatus> and\n * <UserAvaibility> will be sent to the server when update presence to\n * the predefined status.\n *\n * @param status the predefined status.\n * @return The extra values that will be sent to the server.\n */\n@Override public java.util.Map getExtra(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\njava.util.Map _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getExtra, _data, _reply, 0);\n_reply.readException();\njava.lang.ClassLoader cl = (java.lang.ClassLoader)this.getClass().getClassLoader();\n_result = _reply.readHashMap(cl);\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}\n/**\n * Gets an array of the supported presence status. The client can only update\n * presence to the values in the array.\n *\n * @return an array of the supported presence status.\n */\n@Override public int[] getSupportedPresenceStatus() throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nint[] _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\nmRemote.transact(Stub.TRANSACTION_getSupportedPresenceStatus, _data, _reply, 0);\n_reply.readException();\n_result = _reply.createIntArray();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}\n}\nstatic final int TRANSACTION_requireAllPresenceValues = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);\nstatic final int TRANSACTION_getPresenceStatus = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1);\nstatic final int TRANSACTION_getOnlineStatus = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2);\nstatic final int TRANSACTION_getUserAvaibility = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3);\nstatic final int TRANSACTION_getExtra = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4);\nstatic final int TRANSACTION_getSupportedPresenceStatus = (android.os.IBinder.FIRST_CALL_TRANSACTION + 5);\n}\n/**\n * Tells if the mapping needs all presence values sent in protocol. If this\n * method returns true, the framework will pass all the presence values\n * received from the server when map to the predefined status.\n *\n * @return true if needs; false otherwise.\n */\npublic boolean requireAllPresenceValues() throws android.os.RemoteException;\n/**\n * Map the presence values sent in protocol to the predefined presence\n * status.\n *\n * @param onlineStatus The value of presence <OnlineStatus> received\n * from the server.\n * @param userAvailability The value of presence <UserAvailibility>\n * received from the server.\n * @param allValues The whole presence values received from the server.\n * @return a predefined status.\n * @see #requireAllPresenceValues()\n */\npublic int getPresenceStatus(boolean onlineStatus, java.lang.String userAvailability, java.util.Map allValues) throws android.os.RemoteException;\n/**\n * Gets the value of <OnlineStatus> will be sent to the server when\n * update presence to the predefined status.\n *\n * @param status the predefined status.\n * @return The value of <OnlineStatus> will be sent to the server\n */\npublic boolean getOnlineStatus(int status) throws android.os.RemoteException;\n/**\n * Gets the value of <UserAvaibility> will be sent to the server when\n * update presence to the predefined status.\n *\n * @param status the predefined status.\n * @return The value of <UserAvaibility> will be sent to the server\n */\npublic java.lang.String getUserAvaibility(int status) throws android.os.RemoteException;\n/**\n * Gets the extra presence values other than <OnlineStatus> and\n * <UserAvaibility> will be sent to the server when update presence to\n * the predefined status.\n *\n * @param status the predefined status.\n * @return The extra values that will be sent to the server.\n */\npublic java.util.Map getExtra(int status) throws android.os.RemoteException;\n/**\n * Gets an array of the supported presence status. The client can only update\n * presence to the values in the array.\n *\n * @return an array of the supported presence status.\n */\npublic int[] getSupportedPresenceStatus() throws android.os.RemoteException;\n}",
"@Override\n\tvoid receiveCall() {\n\n\t}",
"com.mycompany.midtermproject2.proto.ServerMessageOuterClass.ServerMessage.MsgType getType();",
"@DSSafe(DSCat.IPC_CALLBACK)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.580 -0500\", hash_original_method = \"2469457C965E8FC7C139A1D414384428\", hash_generated_method = \"42C86E9B0B120923F19E3F5FDF13C046\")\n \n@Override\n public void handleMessage(Message msg) {\n mResultMsg = Message.obtain();\n mResultMsg.copyFrom(msg);\n synchronized(mLockObject) {\n mLockObject.notify();\n }\n }",
"pb4server.SendNoticeToLeaderAskReq getSendNoticeToLeaderAskReq();",
"public interface nndmMessage_Out\n{\n\n /**\n * Status flag to indicate that a message is ready for retreival from message\n * out queue and to be transformed into a disease-specific message\n * format - value is <code> A </code> .\n */\n public static final String READY_FOR_TRANSFORM_STATUS = \"RDY_FOR_TRNSFRM\";\n\n /**\n * Status flag to indicate that a message is in the process of being transformed\n * into a disease-specific message format - value is <code> TRNSFRM_IN_PROG </code> .\n */\n public static final String TRANSFORM_IN_PROGRESS_STATUS = \"TRNSFRM_IN_PROG\";\n\n\n /**\n * Status flag to indicate that a message has been successfully transformed\n * into a disease-specific message format - value is <code> TRNSFRM_COMP </code> .\n */\n public static final String TRANSFORM_COMPLETE_STATUS = \"TRNSFRM_COMP\";\n\n\n /**\n * Status flag to indicate that an error has occurred while transforming a\n * message into a disease-specific message format, (transformation unsuccessful)\n * - value is <code> TRNSFRM_ERR </code> .\n */\n public static final String TRANSFORM_ERROR_STATUS = \"TRNSFRM_ERR\";\n\n\n /**\n * Status flag to indicate that an error has occurred while <i> transporting </i> a\n * a disease-specific message to the transport out queue, (write to queue failed),\n * or, the ebXML application errored while processing the message.\n * - value is <code> TRNSPRT_ERR </code> .\n */\n public static final String TRANSPORT_ERROR_STATUS = \"TRNSPRT_ERR\";\n\n\n /**\n * Status flag to indicate that a disease-specific message is ready to be processed\n * by <i> PHINMS </i> data interchange application\n * - value is <code> RDY_FOR_PHINMS </code> .\n */\n public static final String READY_FOR_PHINMS_STATUS = \"RDY_FOR_PHINMS\";\n\n\n /**\n * Status flag to indicate that a message has been successfully transformed\n * into a disease-specific message format - value is <code> PHINMS_COMP </code> .\n */\n public static final String PHINMS_COMPLETE_STATUS = \"PHINMS_COMP\";\n\n /**\n * Status flag to indicate that a message has been failed while processing in\n * PHINMS stage - value is <code> PHINMS_ERR </code>\n */\n public static final String PHINMS_ERROR_STATUS = \"PHINMS_ERR\";\n\n\n /**\n * Represents the Disease Message, <i> before </i> disease_specific transformation.\n */\n public static final String MESSAGE_OUT_ATTACHEMNT = \"attachment_txt\";\n\n\n /** This method returns a collection of message id keys with the given status.\n * @param status String that indicates the status of the message record; use one\n * of the acceptable values of nndmMessage_Out.ACTIVE_STATUS, or\n * nndmMessage_Out.TRANSFORM_IN_PROGRESS_STATUS, etc.\n * @return list containing the collection of keys\n * @see #ACTIVE_STATUS\n * @see #TRANSFORM_IN_PROGRESS_STATUS\n * @see #TRANSFORM_COMPLETE_STATUS\n * @see #TRANSFORM_ERROR_STATUS\n * @see #READY_FOR_PHINMS_STATUS\n * @see #TRANSPORT_ERROR_STATUS\n * @see #PHINMS_COMPLETE_STATUS\n */\n public List<MessageKey> listMessages(String status);\n\n\n /** This method retrieves the message record from the message_out database.\n * The SELECT sql is formatted to support specific database implementations\n * (currently MSSQL 2000 and Oracle 8i).\n * Only records with a status_cd of <code> nndmMessage_Out.ACTIVE_STATUS </code> can be retrieved.\n * @param key String that contains the record identifier for the message that failed.\n * @param status String that indicates the status of the message record; use one\n * of the acceptable values of nndmMessage_Out.ACTIVE_STATUS, or\n * nndmMessage_Out.TRANSFORM_IN_PROGRESS_STATUS, etc.\n * @return Map containing the mapping of column name to its value fetched from the database.\n * @see #ACTIVE_STATUS\n */\n\tpublic Map<String,String> getMessage(Long messageUid, String status);\n\n\n /** This method updates the message record indicated by the key argument as\n * indicated by the second argument.\n * @param key String that contains the record identifier to set status for\n * @param status String that indicates the status of the message record; use one\n * of the acceptable values of nndmMessage_Out.ACTIVE_STATUS, or\n * nndmMessage_Out.TRANSFORM_IN_PROGRESS_STATUS, etc.\n * @see #ACTIVE_STATUS\n * @see #TRANSFORM_IN_PROGRESS_STATUS\n * @see #TRANSFORM_COMPLETE_STATUS\n * @see #TRANSFORM_ERROR_STATUS\n * @see #READY_FOR_PHINMS_STATUS\n * @see #TRANSPORT_ERROR_STATUS\n * @see #PHINMS_COMPLETE_STATUS\n */\n public void setStatus(Long messageUid, String status);\n\n\n /** This method adds an error log record to the Message_Out database and\n * sets the status appropriately.\n * @param key String that contains the record identifier for the message that failed.\n * @param errorMessage String the contains the short description of the error.\n * @param status String that indicates the status of the message record; use one\n * of the acceptable values of nndmMessage_Out.TRANSFORM_ERROR_STATUS, or\n * nndmMessage_Out.TRANSPORT_ERROR_STATUS.\n */\n public void setError(Long messageUid, String notificationLocalId, String errorMessage, String status);\n\n}",
"@Override public int getPresenceStatus(boolean onlineStatus, java.lang.String userAvailability, java.util.Map allValues) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nint _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(((onlineStatus)?(1):(0)));\n_data.writeString(userAvailability);\n_data.writeMap(allValues);\nmRemote.transact(Stub.TRANSACTION_getPresenceStatus, _data, _reply, 0);\n_reply.readException();\n_result = _reply.readInt();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}",
"public interface FirmataProtocol {\n\t// Message types\n\tpublic static final byte I2C_REQUEST\t\t\t= (byte) 0x76;\n\tpublic static final byte I2C_REPLY\t\t\t\t= (byte) 0x77;\n\tpublic static final byte I2C_CONFIG\t\t\t\t= (byte) 0x78;\n\tpublic static final byte DIGITAL_IO_START\t\t= (byte) 0x90;\n\tpublic static final byte DIGITAL_IO_END\t\t\t= (byte) 0x9F;\n\tpublic static final byte ANALOG_IO_START\t\t= (byte) 0xE0;\n\tpublic static final byte ANALOG_IO_END\t\t\t= (byte) 0xEF;\n\tpublic static final byte REPORT_ANALOG_PIN\t\t= (byte) 0xC0;\n\tpublic static final byte REPORT_DIGITAL_PORT\t= (byte) 0xD0;\n\tpublic static final byte START_SYSEX\t\t\t= (byte) 0xF0;\n\tpublic static final byte SET_PIN_MODE\t\t\t= (byte) 0xF4;\n\tpublic static final byte SET_DIGITAL_PIN_VALUE\t= (byte) 0xF5;\n\tpublic static final byte END_SYSEX\t\t\t\t= (byte) 0xF7;\n\tpublic static final byte PROTOCOL_VERSION\t\t= (byte) 0xF9;\n\tpublic static final byte SYSTEM_RESET\t\t\t= (byte) 0xFF;\n\t\n\t// SysEx commands\n\tpublic static final byte EXTENDED_ID\t\t\t\t= 0x00;\t// A value of 0x00 indicates the next 2 bytes define the extended ID\n\t// IDs 0x01 - 0x0F are reserved for user defined commands\n\tpublic static final byte ANALOG_MAPPING_QUERY\t\t= 0x69;\t// ask for mapping of analog to pin numbers\n\tpublic static final byte ANALOG_MAPPING_RESPONSE\t= 0x6A;\t// reply with mapping info\n\tpublic static final byte CAPABILITY_QUERY\t\t\t= 0x6B;\t// ask for supported modes and resolution of all pins\n\tpublic static final byte CAPABILITY_RESPONSE\t\t= 0x6C;\t// reply with supported modes and resolution\n\tpublic static final byte PIN_STATE_QUERY\t\t\t= 0x6D;\t// ask for a pin's current mode and state (different than value)\n\tpublic static final byte PIN_STATE_RESPONSE\t\t\t= 0x6E;\t// reply with a pin's current mode and state (different than value)\n\tpublic static final byte EXTENDED_ANALOG\t\t\t= 0x6F;\t// analog write (PWM, Servo, etc) to any pin\n\tpublic static final byte STRING_DATA\t\t\t\t= 0x71;\t// a string message with 14-bits per char\n\tpublic static final byte REPORT_FIRMWARE\t\t\t= 0x79;\t// report name and version of the firmware\n\tpublic static final byte SAMPLING_INTERVAL\t\t\t= 0x7A;\t// the interval at which analog input is sampled (default = 19ms)\n\tpublic static final byte SYSEX_NON_REALTIME\t\t\t= 0x7E;\t// MIDI Reserved for non-realtime messages\n\tpublic static final byte SYSEX_REALTIME\t\t\t\t= 0X7F;\t// MIDI Reserved for realtime messages\n\t\n\tpublic static enum PinMode {\n\t\tDIGITAL_INPUT,\t// 0x00\n\t\tDIGITAL_OUTPUT,\t// 0x01\n\t\tANALOG_INPUT,\t// 0x02\n\t\tPWM,\t\t\t// 0x03\n\t\tSERVO,\t\t\t// 0x04\n\t\tSHIFT,\t\t\t// 0x05\n\t\tI2C,\t\t\t// 0x06\n\t\tONEWIRE,\t\t// 0x07\n\t\tSTEPPER,\t\t// 0x08\n\t\tENCODER,\t\t// 0x09\n\t\tSERIAL,\t\t\t// 0x0A\n\t\tINPUT_PULLUP,\t// 0x0B\n\t\tUNKNOWN;\n\n\t\tprivate static PinMode[] MODES = values();\n\t\t\n\t\tpublic static PinMode valueOf(int mode) {\n\t\t\tif (mode < 0 || mode >= MODES.length) {\n\t\t\t\treturn UNKNOWN;\n\t\t\t}\n\t\t\t\n\t\t\treturn MODES[mode];\n\t\t}\n\n\t\tpublic boolean isOutput() {\n\t\t\treturn this == DIGITAL_OUTPUT || this == PWM || this == SERVO;\n\t\t}\n\t}\n\t\n\tpublic static class PinCapability {\n\t\tprivate PinMode mode;\n\t\tprivate int resolution;\n\t\tprivate int max;\n\t\t\n\t\tpublic PinCapability(PinMode mode, int resolution) {\n\t\t\tthis.mode = mode;\n\t\t\tthis.resolution = resolution;\n\t\t\tthis.max = (int) Math.pow(2, resolution) - 1;\n\t\t}\n\n\t\tpublic PinMode getMode() {\n\t\t\treturn mode;\n\t\t}\n\n\t\tpublic int getResolution() {\n\t\t\treturn resolution;\n\t\t}\n\t\t\n\t\tpublic int getMax() {\n\t\t\treturn max;\n\t\t}\n\n\t\t@Override\n\t\tpublic String toString() {\n\t\t\treturn \"PinCapability [mode=\" + mode + \", resolution=\" + resolution + \"]\";\n\t\t}\n\t}\n}",
"void setupExternalMessages();",
"@Override\n\tpublic void receive_message(Message m) {\n\t\t\n\t}",
"void systemMessageReceived(IMSession session, Message message);",
"public static void main(String [] args) {\n\t\t//System.load(\"/usr/local/src/freeswitch/libs/esl/java/libesljni.so\");\n\t\tSystem.load(\"/usr/local/freeswitch/scripts/Mod_CallCenterScripts/libesljni.so\");\n\t\tESLconnection con = new ESLconnection(\"127.0.0.1\",\"8021\",\"ClueCon\");\n\t//\tESLconnection con = new ESLconnection(\"10.128.83.112\",\"8021\",\"ClueCon\");\n\t\tESLevent evt;\n\t\tif (con.connected() == 1) System.out.println(\"connected\");\n\t\tcon.events(\"plain\",\"all\");\n\t\t\n\t\tint mode =0;\n\t\twhile (con.connected() == 1) {\t\t\t\t\t\t\n\t\t\t// Get an event - recvEvent will block if nothing is queued\n\t\t\tevt = con.recvEvent();\n\t\t\t//System.out.println(evt.serialize(\"plain\"));\n\t\t\tString str = \"\";\n\t\t\t//System.out.println(\"Got the body as :\"+str);\n\t\t\tstr = evt.getHeader(\"Event-Name\",-1);\n\t\t\tif(str==null){\n\t\t\t\tSystem.out.println(\"Got nul event skipping\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(str.equals(\"CUSTOM\")){\n\t\t\t\t//System.out.println(\"Got a Custom event\"+str);\n\t\t\t\tstr = evt.getHeader(\"Event-Subclass\",-1);\n\t\t\t\tif(str.equals(\"callcenter::info\")){\n\t\t\t\t\tSystem.out.println(\"Got a CallCenter event\"+str);\n\t\t\t\t\tstr = evt.getHeader(\"CC-Action\",-1);\n\t\t\t\t\t//System.out.println(evt.serialize(\"plain\"));\n\t\t\t\t\tif(str.equals(\"member-queue-start\")){\n\t\t\t\t\t\tSystem.out.println(\"Someone entering the queue \"+str);\n\t\t\t\t\t\t//CC-Queue: support@default\n\t\t\t\t\t\t//CC-Action: member-queue-start\n\t\t\t\t\t\t//CC-Member-UUID: 453324f8-3424-4322-4242362fd23d \n\t\t\t\t\t\t//CC-Member-Session-UUID: b77c49c2-a732-11df-9438-e7d9456f8886\n\t\t\t\t\t\t//CC-Member-CID-Name: CHOUINARD MO\n\t\t\t\t\t\t//CC-Member-CID-Number: 4385551212\n\t\t\t\t\t\tString Caller = evt.getHeader(\"CC-Member-CID-Number\",-1);\n\t\t\t\t\t\tif(Caller.startsWith(\"11\")){\n\t\t\t\t\t\t\tCaller = Caller.substring(2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(Caller.length()>10){\n\t\t\t\t\t\tCaller = Caller.substring(Caller.length()-10);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tString Query=\"Insert into Announcement(Number, Date, Mtype,Textualdate,CallUUID) value('\"+Caller+\"',NOW(),'M\"+mode+\"','\"+evt.getHeader(\"CC-Member-UUID\",-1)+\"','\"+evt.getHeader(\"CC-Member-Session-UUID\",-1)+\"')\";\n\t\t\t\t\t\tString Mesg= evt.getHeader(\"CC-Member-Session-UUID\",-1)+\",\";\n\t\t\t\t\t\t\t\tMesg+=updateandReturn(Query);\n\t\t\t\t\t\tif(mode<5){\n\t\t\t\t\t\t\tif(mode==0){\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//SimpleMessage p = new SimpleMessage(Mesg);\n\t\t\t\t\t\t\t\t//Thread th = new Thread(p);\n\t\t\t\t\t\t\t\t//th.start();\n\t\t\t\t\t\t\t}else if(mode==1){\n\t\t\t\t\t\t\t\tPosition p = new Position(Mesg);\n\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\tth.start();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(mode==2){\n\t\t\t\t\t\t\t\tSimpleTime p = new SimpleTime(Mesg);\n\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\tth.start();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(mode==3){\n\t\t\t\t\t\t\t\tDynamicTime p = new DynamicTime(Mesg);\n\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\tth.start();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(mode==4){\n\t\t\t\t\t\t\t\tManipulatedTime p = new ManipulatedTime(Mesg);\n\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\tth.start();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t//\tmessage_announce(evt.getHeader(\"CC-Member-Session-UUID\",-1));\n\t\t\t\t\t\tmode++;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t if(mode==5){\n\t\t\t\t\t\t\t\t\tSimpleMessage p = new SimpleMessage(Mesg);\n\t\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\t\tth.start();\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmode=0;\n\t\t\t\t\t\t}\n//\t\t\t\t\t\tSystem.out.println(evt.serialize(\"plain\"));\n\t\t\t\t\t\t//String Query=\"Insert into calls(StartTime, Number, Bound, TextualDate, CallUUID) values(Now(),'\"+Caller+\"','IN','\"+evt.getHeader(\"CC-Member-UUID\",-1)+\"','\"+evt.getHeader(\"CC-Member-Session-UUID\",-1)+\"')\";\n\t//update(Query);\n\t\t\t\t\t\t\t\t\t\n\t}\n\t\t\n\t\t\t\t}else{\n\t\t\t\t//\tSystem.out.println(\"EVent Subclass is \"+ str);\n\t//\t\t\t\tSystem.out.println(evt.serialize(\"plain\"));\n\t\t\t\t}\n\t\t\t}else{\n//\t\t\t\tSystem.out.println(evt.serialize(\"plain\"));\n\t\t\t}\n\n\t\t\t// Print the entire event in key : value format. serialize() according to the wiki usually takes no arguments\n\t\t\t// but if you do not put in something you will not get any output so I just stuck plain in.\t\t\t\n\n\t\t}\n\t}",
"public sealed interface Message permits BusinessMessage, ContextualMessage, DeviceMessage, ServerMessage {\n}",
"public void receiveResultGetMWSProperties(\r\n\t\t\tcom.autometrics.analytics.v9.j2ee.webservices.GetMWSProperties2Response result) {\r\n\t}",
"public RunExecutableMaxObj() {\n /*\n Input 1: receive message\n ========================\n Output 1: Number of Detected User in the scene\n Output 2: bang, when detect a new user\n */\n declareInlets(new int[]{DataTypes.ALL, DataTypes.ALL});\n declareOutlets(new int[]{DataTypes.ALL, DataTypes.ALL});\n }",
"@Override\n public void teleopInit() {\n\n }",
"public void notifyNoAcctReport (COPSPdpOSReqStateMan man);",
"void processCallback (ZyniMsg msg);",
"public interface APICallbacks\r\n{\r\n\r\n /**\r\n * <p>This is the copyright notice for this class </p>\r\n *\r\n * @copyright<br><p><B>Patsystems UK Limited 2000-2007</b></p>\r\n */\r\n public static final String COPYRIGHT = \"Copyright (c) Patsystems UK Limited 2000-2007\";\r\n\r\n /**\r\n * Host Link Status Change message ID.\r\n */\r\n public static final int MID_HOST_LINK_CHANGE = 1;\r\n\r\n /**\r\n * Price Link Status Change message ID.\r\n */\r\n public static final int MID_PRICE_LINK_CHANGE = 2;\r\n\r\n /**\r\n * Logon Status message ID.\r\n */\r\n public static final int MID_LOGON_STATUS = 3;\r\n\r\n /**\r\n * User Message message ID.\r\n */\r\n public final static int MID_MESSAGE = 4;\r\n\r\n /**\r\n * Order message ID.\r\n */\r\n public static final int MID_ORDER = 5;\r\n\r\n /**\r\n * End of Day message ID.\r\n */\r\n public static final int MID_FORCED_LOGOUT = 6;\r\n\r\n /**\r\n * Download Complete message ID.\r\n */\r\n public static final int MID_DOWNLOAD_COMPLETE = 7;\r\n\r\n /**\r\n * Price Change message ID.\r\n */\r\n public static final int MID_PRICE = 8;\r\n\r\n /**\r\n * Fill message ID.\r\n */\r\n public static final int MID_FILL = 9;\r\n\r\n /**\r\n * Status Update message ID.\r\n */\r\n public static final int MID_STATUS = 10;\r\n\r\n /**\r\n * Contract Added message ID.\r\n */\r\n public static final int MID_CONTRACT_ADDED = 11;\r\n\r\n /**\r\n * Contract Deleted message ID.\r\n */\r\n public static final int MID_CONTRACT_DELETED = 12;\r\n\r\n /**\r\n * Exchange Rate Updated message ID.\r\n */\r\n public static final int MID_EXCHANGE_RATE = 13;\r\n\r\n /**\r\n * Connectivity Status Update message ID.\r\n */\r\n public static final int MID_CONNECTIVITY_STATUS = 14;\r\n\r\n /**\r\n * Order Cancellation Timeout message ID.\r\n */\r\n public static final int MID_ORDER_CANCEL_FAILURE_ID = 15;\r\n\r\n /**\r\n * At Best message ID.\r\n */\r\n public static final int MID_AT_BEST_ID = 16;\r\n\r\n /**\r\n * Memory warning message ID.\r\n */\r\n public static final int MID_MEMORY_WARNING = 18;\r\n\r\n /**\r\n * Subscriber Depth message ID.\r\n */\r\n public static final int MID_SUBSCRIBER_DEPTH = 19;\r\n\r\n /**\r\n * DOM update message ID.\r\n */\r\n public static final int MID_DOM_UPDATE = 21;\r\n\r\n /**\r\n * Settlement Price message ID.\r\n */\r\n public static final int MID_SETTLEMENT_PRICE = 22;\r\n\r\n /**\r\n * Strategy creation successfullyReceived ID.\r\n */\r\n public static final int MID_STRATEGY_CREATION_RECEIVED = 23;\r\n\r\n /**\r\n * Strategy creation failure ID.\r\n */\r\n public static final int MID_STRATEGY_CREATION_FAILURE = 24;\r\n\r\n /**\r\n * Generic Price message ID.\r\n */\r\n public static final int MID_GENERIC_PRICE = 26;\r\n\r\n /**\r\n * Price blank message ID\r\n */\r\n public static final int MID_BLANK_PRICE = 27;\r\n\r\n /**\r\n * Order Queued Timeout ID.\r\n */\r\n public static final int MID_ORDER_QUEUED_TIMEOUT = 28;\r\n\r\n /**\r\n * Order Sent Timeout ID.\r\n */\r\n public static final int MID_ORDER_SENT_TIMEOUT = 29;\r\n\r\n /**\r\n * Order Book reset ID.\r\n */\r\n public static final int MID_RESET_ORDERBOOK = 30;\r\n\r\n /**\r\n * Exception/Error ID (Internal).\r\n */\r\n public static final int MID_ERROR = -1;\r\n\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQ = 100;\r\n\r\n /**\r\n * LOW Price Alert.\r\n */\r\n public static final int MID_LOWPRICE = 101;\r\n\r\n /**\r\n * HIGH Price Alert.\r\n */\r\n public static final int MID_HIGHPRICE = 102;\r\n\r\n\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQI_BID = 103;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQI_OFFER = 104;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQI_2_SIDES = 105;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_BID = 106;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_OFFER = 107;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_2_SIDES = 108;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_CROSS = 109;\r\n\r\n /**\r\n * Strategy creation strategy created event id.\r\n */\r\n public static final int MID_STRATEGY_CREATION_CREATED = 200;\r\n\r\n /**\r\n * Event ID to update order history\r\n */\r\n public static final int MID_UPDATE_ORDERHISTORY = 1000;\r\n\r\n\r\n}",
"protected void onPrivateMessage(String sender, String login, String hostname, String message) {}",
"public void beforeReceive() {\n\t}",
"public LCAmsg2 () { }",
"com.lxd.protobuf.msg.result.user.User.User_ getUser();",
"void onMessageReceived(Message message);",
"@Override\n\tpublic void handleDelivery(String arg0, Envelope arg1,\n\t\t\tBasicProperties arg2, byte[] arg3) throws IOException {\n\t\t Object msg;\n\t try {\n\t System.out.println(\"【body length:】\" + bytes2kb(arg3.length));\n\t msg = decodeMsg(arg3);\n\t //subImpl.handlerReceiveMsg(this, msg);\n\t System.out.println(msg);\n\t } catch (Exception e) {\n\t e.printStackTrace();\n\t }\n\t}",
"@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n }",
"pb4server.MassSpeedAskReq getMassSpeedAskReq();",
"private void sendReceiveRes(){\n\t}",
"public CRYPTPROTECT_PROMPTSTRUCT() {\n/* 1170 */ super(W32APITypeMapper.DEFAULT);\n/* */ }",
"public abstract interface LinphoneFriend\n/* 6: */ {\n/* 7: */ public abstract void setAddress(LinphoneAddress paramLinphoneAddress);\n/* 8: */ \n/* 9: */ public abstract LinphoneAddress getAddress();\n/* 10: */ \n/* 11: */ public abstract void setIncSubscribePolicy(SubscribePolicy paramSubscribePolicy);\n/* 12: */ \n/* 13: */ public abstract SubscribePolicy getIncSubscribePolicy();\n/* 14: */ \n/* 15: */ public abstract void enableSubscribes(boolean paramBoolean);\n/* 16: */ \n/* 17: */ public abstract boolean isSubscribesEnabled();\n/* 18: */ \n/* 19: */\n/* 22: */ public abstract OnlineStatus getStatus();\n/* 23: */ \n/* 24: */ public abstract PresenceModel getPresenceModel();\n/* 25: */ \n/* 26: */ public abstract void edit();\n/* 27: */ \n/* 28: */ public abstract void done();\n/* 29: */ \n/* 30: */ public abstract String toString();\n/* 31: */ \n/* 32: */ public abstract long getNativePtr();\n/* 33: */ \n/* 34: */ public abstract void setRefKey(String paramString);\n/* 35: */ \n/* 36: */ public abstract String getRefKey();\n/* 37: */ \n/* 38: */ public static class SubscribePolicy\n/* 39: */ {\n/* 40:40 */ private static Vector<SubscribePolicy> values = new Vector();\n/* 41: */ protected final int mValue;\n/* 42: */ private final String mStringValue;\n/* 43:47 */ public static final SubscribePolicy SPWait = new SubscribePolicy(0, \"SPWait\");\n/* 44:51 */ public static final SubscribePolicy SPDeny = new SubscribePolicy(1, \"SPDeny\");\n/* 45:55 */ public static final SubscribePolicy SPAccept = new SubscribePolicy(2, \"SPAccept\");\n/* 46: */ \n/* 47: */ private SubscribePolicy(int value, String stringValue)\n/* 48: */ {\n/* 49:59 */ this.mValue = value;\n/* 50:60 */ values.addElement(this);\n/* 51:61 */ this.mStringValue = stringValue;\n/* 52: */ }\n/* 53: */ \n/* 54: */ public static SubscribePolicy fromInt(int value)\n/* 55: */ {\n/* 56:65 */ for (int i = 0; i < values.size(); i++)\n/* 57: */ {\n/* 58:66 */ SubscribePolicy policy = (SubscribePolicy)values.elementAt(i);\n/* 59:67 */ if (policy.mValue == value) {\n/* 60:67 */ return policy;\n/* 61: */ }\n/* 62: */ }\n/* 63:69 */ throw new RuntimeException(\"Policy not found [\" + value + \"]\");\n/* 64: */ }\n/* 65: */ \n/* 66: */ public String toString()\n/* 67: */ {\n/* 68:72 */ return this.mStringValue;\n/* 69: */ }\n/* 70: */ }\n/* 71: */ }",
"public interface ReceiveCallback extends MessageReceivedCallback{\n}",
"@Override\n public void processMessage(int type, String receivedMsg) {\n }",
"@Override\n\tprotected void GetDataFromNative() {\n\t\tMaxFlowLevel = CAN1Comm.Get_AuxiliaryAttachmentMaxFlowLevel_2303_PGN65517();\n\t}",
"@Override\n\tpublic void receiveProduct(Product product) {\n\t\t\n\t}",
"public void receiveResultsMS_User_Defined(\n com.xteam.tourismpay.PFTMXStub.SMS_User_DefinedResponse result) {\n }",
"@Override\n\tpublic void onMessageRecieved(Message arg0) {\n\t\t\n\t}",
"public void processMessage(DeviceMateMessage m);",
"@Override\r\n\tpublic void onReceive(Object arg0) throws Exception {\n\t\t\r\n\t}",
"public HCRYPTMSG(Pointer p) {\n/* 1131 */ super(p);\n/* */ }",
"void messageReceived(String mac, String mimeType);",
"public interface IRemoveUsersMsg extends ICommMsg {\n\t\n\t/**\n\t * Getter for a the set of ICommunicate stubs to remove.\n\t * @return List of ICommunicate stubs to add\n\t */\n\tpublic Set<ICommunicate> getICommunicates();\n\n}",
"int getObject_nbmsg();",
"public interface ProvDomainMgr extends ReqMsgClient\n{\n\n /**\n * Returns the message model type that this domain manager provides. The\n * return value is one of the types defined in\n * {@linkplain com.reuters.rfa.rdm.RDMMsgTypes}.\n * \n * @return the message model type that this domain manager provides.\n */\n short getMsgModelType();\n\n /**\n * Returns the name of service that this domain manager provides.\n * \n * @return the name of service that this domain manager provides.\n */\n String getServiceName();\n\n /**\n * Returns an OMMPool used by this domain manager.\n * \n * @return an OMMPool used by this domain manager.\n */\n OMMPool getPool();\n\n /**\n * Sends an OMM message to a client.\n * \n * @param token the client request token\n * @param encmsg the OMM message to submit\n */\n void submit(Token token, OMMMsg encmsg);\n\n}",
"@Override\n\tpublic void msgPartsLow() {\n\t\t\n\t}",
"public interface DeliverSMRequest extends SmscRequest {\n\n}",
"void sendMessage(String pid,String cmd,MintReply mr,int flags)\n{\n sendMessage(pid,cmd,null,mr,flags);\n}",
"public void receiveResultgetUserInfoBean(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean result\n ) {\n }",
"@Test\n public void test0() throws Throwable {\n GeneralMsgProcessor generalMsgProcessor0 = new GeneralMsgProcessor();\n LoginMsg loginMsg0 = new LoginMsg(\"h& !r>&<`yO$A@g\", \"h& !r>&<`yO$A@g\", 0);\n generalMsgProcessor0.processMsg((Message) loginMsg0);\n }",
"public static void test_4a() {\r\n try {\r\n System.out.println(\"\\n\\nTest Case - 4A :\\n\\n\");\r\n TestNetwork n = new TestNetwork(5, 5, 2);\r\n Paxos p = new Paxos(n);\r\n p.runPaxos();\r\n Thread.sleep(1000);\r\n n.change_DPmode(1, 1); // All proposers are Distinguished\r\n n.dup_msg(0, 2); // Duplicate messages sent by proposer 0\r\n n.dup_msg(1, 2); // Duplicate messages sent by proposer 1\r\n n.dup_msg(3, 2); // Duplicate messages sent by proposer 3\r\n Thread.sleep(5000);\r\n n.terminate_run();\r\n Thread.sleep(2000);\r\n System.out.println(\"\\n\\nTERMINATED PAXOS RUN-4A\");\r\n n.printTrace();\r\n } catch(Exception e) {}\r\n}",
"public void receiveResultgetUserInfo(\n org.wso2.carbon.appfactory.application.mgt.service.xsd.UserInfoBean[] result\n ) {\n }",
"pb4server.WorldChatAskReq getWorldChatAskReq();",
"private ManualMessage() {\n initFields();\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\ttry {\r\n\t\tPaymentProcessorImplService service=new PaymentProcessorImplService(new URL(\"http://localhost:8080/javafirstws/paymentProcessor?wsdl\"));\r\n\t\tPaymentProcessor port=service.getPaymentProcessorImplPort();\r\n\t\tClient client=ClientProxy.getClient(port);\r\n\t\tEndpoint endpoint = client.getEndpoint();\r\n\t\tMap<String, Object> props=new HashMap<String, Object>();\r\n\t\tprops.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);\r\n\t\tprops.put(WSHandlerConstants.USER, \"cxf\");\r\n\t\tprops.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);\r\n\t\tprops.put(WSHandlerConstants.PW_CALLBACK_CLASS,UTPasswordCallback.class.getName() );\r\n\t\t//props.put(WSHandlerConstants.PW_CALLBACK_CLASS,\"cxf\" );\r\n\t\t//System.out.println(\"props hashing\"+props);\r\n\t\t\r\n\t\tWSS4JOutInterceptor wssOut=new WSS4JOutInterceptor();\r\n\t\tendpoint.getOutInterceptors().add(wssOut);\r\n\t\t\r\n\t\tPaymentProcessorResponse response=port.processPayment(new PaymentProcessorRequest());\r\n\t\tSystem.out.println(response.isResult());\r\n\t\t\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}",
"pb4server.TransportResAskReq getTransportResAskReq();",
"public interface XmppMessagingEvent {\n\n void onLogin();\n void onConnect();\n void onDisconnect();\n void onIncomingMessage();\n void onReceiptMessageReceived();\n}",
"@Override\n\tpublic long getNewPrivateMessage(String userName) throws Exception {\n\t\treturn 0;\n\t}",
"public SIPMessage() {\n this.unrecognizedHeaders = new LinkedList();\n this.headers = new LinkedList();\n nameTable = new Hashtable();\n \ttry {\n \tthis.attachHeader(new ContentLength(0),false);\n \t} catch (Exception ex) {}\n }",
"@Override\n\tpublic void receive() {\n\t}",
"public interface UMOMessageReceiver extends Lifecycle, UMOConnectable\n{\n /**\n * @return the receivers endpoint\n */\n UMOImmutableEndpoint getEndpoint();\n\n /**\n * @param message\n * @param exception\n */\n // void handleException(Object message, Throwable exception);\n /**\n * @return the component associated with the receiver\n */\n UMOComponent getComponent();\n\n /**\n * @param endpoint the endpoint to listen on\n * @see UMOImmutableEndpoint\n */\n void setEndpoint(UMOImmutableEndpoint endpoint);\n\n /**\n * @param component the component to associate with the receiver. When data is\n * received the component <code>dispatchEvent</code> or\n * <code>sendEvent</code> is used to dispatch the data to the\n * relivant UMO.\n */\n void setComponent(UMOComponent component);\n\n void setConnector(UMOConnector connector);\n\n UMOConnector getConnector();\n\n /**\n * The endpointUri that this receiver listens on\n * \n * @return\n */\n UMOEndpointURI getEndpointURI();\n\n String getReceiverKey();\n\n void setReceiverKey(String key);\n\n UMOMessage routeMessage(UMOMessage message) throws UMOException;\n\n UMOMessage routeMessage(UMOMessage message, boolean synchronous) throws UMOException;\n\n UMOMessage routeMessage(UMOMessage message, UMOTransaction trans, boolean synchronous)\n throws UMOException;\n\n UMOMessage routeMessage(UMOMessage message, OutputStream outputStream) throws UMOException;\n\n UMOMessage routeMessage(UMOMessage message, boolean synchronous, OutputStream outputStream)\n throws UMOException;\n\n UMOMessage routeMessage(UMOMessage message,\n UMOTransaction trans,\n boolean synchronous,\n OutputStream outputStream) throws UMOException;\n\n}",
"public void receiveResultorder_Change_Pro(\n com.xteam.tourismpay.PFTMXStub.Order_Change_ProResponse result) {\n }",
"protected XMessage aditionalCheck(OpProjectSession session, OpBroker broker, OpUser user) {\r\n return new XMessage();\r\n }",
"protected String getRequestMessage() {\n NbaTXRequestVO nbaTXRequest = new NbaTXRequestVO();\n nbaTXRequest.setTransType(NbaOliConstants.TC_TYPE_MIBFOLLOWUP);\n nbaTXRequest.setTransMode(NbaOliConstants.TC_MODE_ORIGINAL);\n nbaTXRequest.setBusinessProcess(NbaUtils.getBusinessProcessId(getUser()));\n //create txlife with default request fields\n NbaTXLife nbaTXLife = new NbaTXLife(nbaTXRequest);\n TXLife tXLife = nbaTXLife.getTXLife();\n UserAuthRequestAndTXLifeRequest userAuthRequestAndTXLifeRequest = tXLife.getUserAuthRequestAndTXLifeRequest();\n userAuthRequestAndTXLifeRequest.deleteUserAuthRequest();\n TXLifeRequest tXLifeRequest = userAuthRequestAndTXLifeRequest.getTXLifeRequestAt(0);\n \tnbaTXLife.getTXLife().setVersion(NbaOliConstants.OLIFE_VERSION_39_02); \n \tOLifE olife = nbaTXLife.getTXLife().getUserAuthRequestAndTXLifeRequest().getTXLifeRequestAt(0).getOLifE();\n \tolife.setVersion(NbaOliConstants.OLIFE_VERSION_39_02); \n\n tXLifeRequest.setPrimaryObjectID(CARRIER_PARTY_1);\n tXLifeRequest.setMaxRecords(getMibFollowUpMaxRecords());\n tXLifeRequest.setStartRecord(getStartRecord().intValue());\n tXLifeRequest.setStartDate(NbaUtils.addDaysToDate(getStartDate(),-1));\n tXLifeRequest.setEndDate(NbaUtils.addDaysToDate(getEndDate(),-1));\n tXLifeRequest.setTestIndicator(getTestIndicator());\n MIBRequest mIBRequest = new MIBRequest();\n tXLifeRequest.setMIBRequest(mIBRequest);\n MIBServiceDescriptor mIBServiceDescriptor = new MIBServiceDescriptor();\n MIBServiceDescriptorOrMIBServiceConfigurationID mIBServiceDescriptorOrMIBServiceConfigurationID = new MIBServiceDescriptorOrMIBServiceConfigurationID();\n mIBServiceDescriptorOrMIBServiceConfigurationID.addMIBServiceDescriptor(mIBServiceDescriptor);\n mIBRequest.setMIBServiceDescriptorOrMIBServiceConfigurationID(mIBServiceDescriptorOrMIBServiceConfigurationID);\n mIBServiceDescriptor.setMIBService(NbaOliConstants.TC_MIBSERVICE_CHECKING);\n OLifE oLifE = tXLifeRequest.getOLifE();\n Party party = new Party();\n oLifE.addParty(party);\n party.setId(CARRIER_PARTY_1);\n party.setPartyTypeCode(NbaOliConstants.OLIX_PARTYTYPE_CORPORATION);\n party.setPersonOrOrganization(new PersonOrOrganization());\n party.getPersonOrOrganization().setOrganization(new Organization());\n Carrier carrier = new Carrier();\n party.setCarrier(carrier);\n carrier.setCarrierCode(getCurrentCarrierCode());\n String responseMessage = nbaTXLife.toXmlString();\n if (getLogger().isDebugEnabled()) {\n getLogger().logDebug(\"TxLife 404 Request Message:\\n \" + responseMessage);\n }\n return responseMessage;\n }",
"com.lvl6.proto.UserProto.MinimumUserProto getSender();",
"com.lvl6.proto.UserProto.MinimumUserProto getSender();"
] |
[
"0.5640321",
"0.5579906",
"0.54895335",
"0.5385228",
"0.53235495",
"0.5315279",
"0.52736425",
"0.5272008",
"0.5238896",
"0.52352536",
"0.52020085",
"0.5186016",
"0.51728636",
"0.5166739",
"0.5166739",
"0.5163739",
"0.51420754",
"0.5137748",
"0.51234066",
"0.5097493",
"0.50937766",
"0.5087143",
"0.50721",
"0.5048237",
"0.5038032",
"0.50355786",
"0.50289524",
"0.50269383",
"0.502255",
"0.5010804",
"0.5007886",
"0.499374",
"0.4984939",
"0.49783447",
"0.49777856",
"0.49769154",
"0.49702865",
"0.49674422",
"0.49663824",
"0.49622548",
"0.4960657",
"0.49531668",
"0.4949675",
"0.49421233",
"0.4928112",
"0.4923832",
"0.49182352",
"0.49164346",
"0.49157023",
"0.49099413",
"0.49057207",
"0.4900103",
"0.489693",
"0.4896091",
"0.48855183",
"0.48852402",
"0.4884984",
"0.48828697",
"0.48810777",
"0.48800278",
"0.4877841",
"0.48752835",
"0.4874911",
"0.48739946",
"0.4872517",
"0.4871951",
"0.48704356",
"0.4864777",
"0.4863537",
"0.48631862",
"0.48557547",
"0.48526612",
"0.48448235",
"0.4843635",
"0.484232",
"0.4841048",
"0.48361844",
"0.48348498",
"0.48304725",
"0.4830056",
"0.48267284",
"0.48257026",
"0.48216122",
"0.48205313",
"0.4818489",
"0.48162356",
"0.48143774",
"0.4812751",
"0.481253",
"0.48115513",
"0.48096037",
"0.4808532",
"0.4802902",
"0.48028854",
"0.48013172",
"0.4796818",
"0.47925526",
"0.47903398",
"0.4784956",
"0.47759616",
"0.47759616"
] |
0.0
|
-1
|
required int32 continuousDay = 102348;
|
boolean hasContinuousDay();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private Day(int value) {\r\n\t\tthis.value = value;\r\n\t}",
"Integer getStartDay();",
"Integer getDay();",
"public int determineDayRandomly() {\n\t\treturn 0;\r\n\t}",
"private int[] nextDay(int[] cells){\n int[] tmp = new int[cells.length];\n \n for(int i=1;i<cells.length-1;i++){\n tmp[i]=cells[i-1]==cells[i+1]?1:0;\n }\n return tmp;\n }",
"@Test\n public void getEpochDay() {\n assertEquals(MinguoDate.of(110, 5, 19), MinguoChronology.INSTANCE.dateEpochDay(18766));\n assertEquals(MinguoDate.of(59, 1, 1), MinguoChronology.INSTANCE.dateEpochDay(0));\n }",
"@java.lang.Override public int getDayValue() {\n return day_;\n }",
"Constant getCyclePeriodConstant();",
"public Integer getPresentDays()\r\n/* 48: */ {\r\n/* 49:51 */ return this.presentDays;\r\n/* 50: */ }",
"private int m519d(C0082e eVar) {\n int c = C0069c.m383c(eVar.mo67c(C0071a.DAY_OF_WEEK) - this.f279b.mo283a().mo236a(), 7) + 1;\n long c2 = m517c(eVar, c);\n if (c2 == 0) {\n return ((int) m517c(C0018g.m125a(eVar).mo98b(eVar).mo27c(1, C0072b.WEEKS), c)) + 1;\n }\n if (c2 >= 53) {\n int b = m514b(m511a(eVar.mo67c(C0071a.DAY_OF_YEAR), c), (C0128k.m770a((long) eVar.mo67c(C0071a.YEAR)) ? 366 : 365) + this.f279b.mo284b());\n if (c2 >= ((long) b)) {\n return (int) (c2 - ((long) (b - 1)));\n }\n }\n return (int) c2;\n }",
"public int getLBR_ProtestDays();",
"public void setDay(byte value) {\n this.day = value;\n }",
"@java.lang.Override public int getDayValue() {\n return day_;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"Period mo20733e();",
"private int m521e(C0082e eVar) {\n int c = C0069c.m383c(eVar.mo67c(C0071a.DAY_OF_WEEK) - this.f279b.mo283a().mo236a(), 7) + 1;\n int c2 = eVar.mo67c(C0071a.YEAR);\n long c3 = m517c(eVar, c);\n if (c3 == 0) {\n return c2 - 1;\n }\n if (c3 < 53) {\n return c2;\n }\n if (c3 >= ((long) m514b(m511a(eVar.mo67c(C0071a.DAY_OF_YEAR), c), (C0128k.m770a((long) c2) ? 366 : 365) + this.f279b.mo284b()))) {\n return c2 + 1;\n }\n return c2;\n }",
"public int getDay() {\n\treturn day;\n }",
"Integer getDaysSpanned();",
"public int getDay(){\n\t return this.day;\n }",
"public int getDay()\n {\n return day;\n }",
"static int getDay(byte[] bytes) {\n return readBits(bytes, DAY_POS, DAY_BITS);\n }",
"public int getDay(){\n\t\treturn day;\n\t}",
"int getSchedulingValue();",
"public int getDay() {\n return day;\n }",
"public void setDay(byte value) {\r\n this.day = value;\r\n }",
"public static long getDayNumber() {\n return getSecondsSinceEpoch() / SECS_TO_DAYS;\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"public byte getDay() {\n return day;\n }",
"long mo1154d();",
"public byte getDay() {\n return day;\n }",
"public void setDay(byte value) {\n this.day = value;\n }",
"Integer getEndDay();",
"public void setPresentDays(Integer presentDays)\r\n/* 53: */ {\r\n/* 54:55 */ this.presentDays = presentDays;\r\n/* 55: */ }",
"public int getDay() {\r\n return day;\r\n }",
"long mo107678c(Integer num);",
"public interface DURATION_INFINITY_NSEC\n{\n\tint value = 134217727;\n}",
"public static int get_seq(ConvergeCar convergeCar){\n\t\tint seq_num=(int)(288-(end_utc-convergeCar.utc)/period);\n\t\t//judge points at 00:00\n\t\tif(seq_num == 0 && convergeCar.utc == start_utc){\n\t\t\tseq_num += 1;\n\t\t}\n\t\t//points from the day before\n\t\twhile(seq_num <= 0){\n\t\t\tseq_num += 288;\n\t\t}\n\t\t//sometimes there are some points from next day\n\t\tif(seq_num > 288){\n\t\t\tseq_num = 288;\n\t\t}\n\t\treturn seq_num;\n\t}",
"public int getInterdigitInterval();",
"@Override\n public void accLongitudinal(int value, int timestamp) {\n }",
"long mo1685a(C2369e c2369e);",
"public void setDayStart(Integer dayStart) {\n this.dayStart = dayStart;\n }",
"public Integer getDayStart() {\n return dayStart;\n }",
"public Integer getDay()\n {\n return this.day;\n }",
"@Test(timeout = 4000)\n public void test108() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-32768L), 2147484380L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range1 = Range.of(range_CoordinateSystem1, (-32768L), 2147484380L);\n range1.getEnd();\n boolean boolean0 = range0.equals(range1);\n assertFalse(boolean0);\n \n long long0 = range1.getEnd();\n assertEquals(2147484379L, long0);\n \n Object object0 = new Object();\n range0.getEnd();\n long long1 = range0.getBegin();\n assertEquals((-32769L), long1);\n }",
"public byte getDay() {\r\n return day;\r\n }",
"public int getDay() {\n\t\treturn day;\n\t}",
"public void setDay(int day) {\r\n this.day = day;\r\n }",
"public int getDay() {\r\n return FormatUtils.uint8ToInt(mDay);\r\n }",
"@Override\n protected int func_150123_b(int p_150123_1_)\n {\n return 60;\n }",
"public void setDay(int day)\n {\n this.day = day;\n }",
"int getNumberDays();",
"public void increaseDay(){\n leapyear(year); //Call leapyear on year to check for leap year\r\n day++; //Increment day\r\n if(day > days[month-1]){ //If day reaches higher than the month's day\r\n day = 1; //Set day to zero\r\n month++; //Increment month\r\n }\r\n if(month > 12){ //If month reaches greater than 12\r\n year++; //Increment year\r\n month = 1; //Set month to 1\r\n }\r\n}",
"@Test\n public void fixedTests() {\n assertEquals(69978 , Day02.parseInt(\"sixty nine thousand nine hundred seventy eight\"));\n }",
"public static int foodperWeek(){\n return 1;\n }",
"Integer getPortRangeStart();",
"public void setMday(int value) {\n this.mday = value;\n }",
"private Integer getStandardStart(int startTime) \n {\n \tif (startTime % 1440 > 960) {\n \t\tstartTime += 1440;\n \t}\n \tint startOfDay = startTime - (startTime % 1440);\n \t//we need a standard variable to indicate the day of week;\n \t//standard day starts at 08:00 = 480 minutes and ends at 16:00 = 960 minutes\n \tcapacityEndTime = startOfDay + 960;\n \treturn startOfDay + 480;\n }",
"public byte getDay() {\n return day;\n }",
"static int SC(int db) {\n return (int) (db * ((3 / EG_STEP) * (1 << ENV_BITS))) + EG_DST;\n }",
"public static int getStartDay(int year, int month)\n {\n int startday = 3;//add 3 to the variable start\n int totalamountofdays = getTotalNumberOfDays(year,month);//call the method getTotalNumberOfDays and store it in a variable called start\n return(totalamountofdays + startday) % 7;//return start % 7 \n }",
"public DayOfWeek primeiroDiaSemanaAno(int ano);",
"public int a() {\n return 366;\n }",
"@Test(timeout = 4000)\n public void test081() throws Throwable {\n Range range0 = Range.ofLength(9223372036854775535L);\n Range range1 = Range.ofLength(9223372032559808557L);\n range1.getLength();\n Long long0 = new Long(9223372032559808557L);\n range0.equals(\"0RukBJI?a<f|+(VQV\");\n range0.equals(range1);\n Range.CoordinateSystem.values();\n Object object0 = new Object();\n range0.equals((Object) null);\n Range.CoordinateSystem[] range_CoordinateSystemArray0 = Range.CoordinateSystem.values();\n assertEquals(3, range_CoordinateSystemArray0.length);\n }",
"public long mo254c(C0082e eVar) {\n int c = C0069c.m383c(eVar.mo67c(C0071a.DAY_OF_WEEK) - this.f279b.mo283a().mo236a(), 7) + 1;\n if (this.f281d == C0072b.WEEKS) {\n return (long) c;\n }\n if (this.f281d == C0072b.MONTHS) {\n int c2 = eVar.mo67c(C0071a.DAY_OF_MONTH);\n return (long) m514b(m511a(c2, c), c2);\n } else if (this.f281d == C0072b.YEARS) {\n int c3 = eVar.mo67c(C0071a.DAY_OF_YEAR);\n return (long) m514b(m511a(c3, c), c3);\n } else if (this.f281d == C0073c.f236e) {\n return (long) m519d(eVar);\n } else {\n if (this.f281d == C0072b.FOREVER) {\n return (long) m521e(eVar);\n }\n throw new IllegalStateException(\"unreachable\");\n }\n }",
"int getMessageCounterHistoryDayLimit();",
"void setZeroStart();",
"private static int m31084a(zzss zzss) {\n int a = zzss.mo32193a(5);\n if (a == 31) {\n return zzss.mo32193a(6) + 32;\n }\n return a;\n }",
"@Test(timeout = 4000)\n public void test086() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32729L, 2147483647L);\n Object object0 = new Object();\n long long0 = range0.getBegin();\n assertEquals(32729L, long0);\n \n Object object1 = new Object();\n boolean boolean0 = range0.equals((Object) null);\n assertFalse(boolean0);\n }",
"Constant getCycleOffsetConstant();",
"private int getFirstRepresentingDay() {\n\t\tint firstRepresentingDay;\r\n\t\tGregorianCalendar myCalendar = new GregorianCalendar(year, month, 1);\r\n\r\n\t\tint daysofMonth = myCalendar.getActualMaximum(Calendar.DAY_OF_MONTH);\r\n\t\tint firstDayMonth = myCalendar.get(Calendar.DAY_OF_WEEK); // First day of month (relative to the week)\r\n\t\tint globalFirstDayMonth = myCalendar.get(Calendar.DAY_OF_YEAR);\r\n\r\n\t\tif (settings.getBoolean(\"firstDayofWeek\", true)) { //The default option is the week starting on monday\r\n\t\t\tfirstDayMonth = firstDayMonth - 1;\r\n\t\t\tif (firstDayMonth == 0)\r\n\t\t\t\tfirstDayMonth = 7;\r\n\t\t\tfirstRepresentingDay = globalFirstDayMonth - (firstDayMonth - 1);\r\n\t\t}\r\n\t\telse { //else we start the week on Sunday\r\n\t\t\tfirstRepresentingDay = globalFirstDayMonth - (firstDayMonth - 1);\r\n\t\t}\r\n\t\tif (firstDayMonth + daysofMonth < 37)\r\n\t\t\tcount = RingActivity.five_week_calendar;\r\n\t\telse\r\n\t\t\tcount = RingActivity.six_week_calendar;\r\n\r\n\t\treturn firstRepresentingDay;\r\n\t}",
"@Test(timeout = 4000)\n public void test056() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 9223372036854775806L, 9223372036854775806L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range1 = Range.of(range_CoordinateSystem1, 9223372032559808516L, 9223372032559808516L);\n range0.equals(range1);\n range0.toString(range_CoordinateSystem0);\n Range.CoordinateSystem[] range_CoordinateSystemArray0 = Range.CoordinateSystem.values();\n assertEquals(3, range_CoordinateSystemArray0.length);\n }",
"@Test(timeout = 4000)\n public void test026() throws Throwable {\n Range range0 = Range.ofLength(0L);\n long long0 = range0.getLength();\n assertEquals(0L, long0);\n \n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n long long1 = range0.getEnd(range_CoordinateSystem0);\n assertEquals(0L, long1);\n }",
"io.dstore.values.TimestampValue getFromDay();",
"void setBoardStart(int month, int day, int year) throws IllegalDateException;",
"Integer getCurrentWhint();",
"public int mo80c() {\n return 7;\n }",
"private int checkDay(int testDay) {\n\t\t// check if day in range for month\n\t\tif (testDay > 0 && testDay <= daysPerMonth[month])\n\t\t\treturn testDay;\n\n\t\t// check for leap year\n\t\tif (month == 2 && testDay == 29 && (year % 400 == 0 || (year % 4 == 0 && year % 100 != 0)))\n\t\t\treturn testDay;\n\n\t\tthrow new IllegalArgumentException(\"day out-of-range for the specified month and year\");\n\t}",
"BigInteger getPeriod();",
"public abstract long mo24412e();",
"private void changeNextDay(){\n\t\tplanet.getClimate().nextDay();\n\t}",
"public boolean setDay(int value) {\r\n if (!FormatUtils.uint8RangeCheck(value)) {\r\n return false;\r\n }\r\n mDay = FormatUtils.intToUint8(value);\r\n updateGattCharacteristic();\r\n return true;\r\n }",
"@Test(timeout = 4000)\n public void test113() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 2147483647L, 2147484380L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range1 = Range.of(range_CoordinateSystem1, 2147483647L, 2147484380L);\n range1.getEnd();\n Range.of(2147484379L, 2147484380L);\n range0.equals(range1);\n range1.getEnd();\n Object object0 = new Object();\n range0.getEnd();\n Range.CoordinateSystem[] range_CoordinateSystemArray0 = Range.CoordinateSystem.values();\n assertEquals(3, range_CoordinateSystemArray0.length);\n }",
"public static int calendarDay2Day(int day) {\n switch (day) {\n case Calendar.SUNDAY:\n return RRuleContants.SU;\n case Calendar.MONDAY:\n return RRuleContants.MO;\n case Calendar.TUESDAY:\n return RRuleContants.TU;\n case Calendar.WEDNESDAY:\n return RRuleContants.WE;\n case Calendar.THURSDAY:\n return RRuleContants.TH;\n case Calendar.FRIDAY:\n return RRuleContants.FR;\n case Calendar.SATURDAY:\n return RRuleContants.SA;\n default:\n throw new RuntimeException(\"bad day of week: \" + day);\n }\n }",
"public int getDay() {\n\t\treturn day;\n\t}",
"public int getDay() {\n\t\treturn day;\n\t}",
"public int getDay() {\n\t\treturn day;\n\t}",
"@Test(timeout = 4000)\n public void test106() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 127L, 4294967295L);\n Range range1 = Range.ofLength(4294967295L);\n range1.toString();\n range1.equals(range0);\n long long0 = range1.getEnd();\n assertEquals(4294967294L, long0);\n \n Range.Comparators.values();\n range1.equals(range_CoordinateSystem0);\n assertFalse(range1.isEmpty());\n }",
"static C0102a m522e(C0101o oVar) {\n return new C0102a(\"WeekBasedYear\", oVar, C0073c.f236e, C0072b.FOREVER, f277j);\n }",
"public int getNumDaysForComponent(Record record);",
"void mo12647a(C3333i iVar);",
"@Test(timeout = 4000)\n public void test065() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-32768L), 2147484379L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.ZERO_BASED;\n range0.equals(range_CoordinateSystem1);\n Range range1 = Range.of(range_CoordinateSystem1, (-32768L), 2147484379L);\n boolean boolean0 = range0.equals(range1);\n assertFalse(boolean0);\n \n Range.CoordinateSystem range_CoordinateSystem2 = Range.CoordinateSystem.SPACE_BASED;\n String string0 = range0.toString(range_CoordinateSystem2);\n assertEquals(\"[ -32769 .. 2147484379 ]/SB\", string0);\n \n long long0 = range0.getBegin();\n assertEquals((-32769L), long0);\n }",
"@Test(timeout = 4000)\n public void test090() throws Throwable {\n Range range0 = Range.of((-81L));\n Range range1 = Range.of((-81L));\n range0.equals(range1);\n long long0 = range0.getEnd();\n assertEquals((-81L), long0);\n }",
"private int daysSince1900(){\n return this.day + this.month*daysInMonth(this.getMonth(), this.getYear()) +\n (this.year- 1900)*365 + NumberLeapyearsSince1900(this.getYear());\n }",
"org.hl7.fhir.Integer getStart();",
"public int MagicDate(){\n return month = day = year = 1;\n \n }",
"@Test(timeout = 4000)\n public void test101() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32729L, 2147483647L);\n range0.toString();\n range0.toString(range_CoordinateSystem0);\n range0.toString();\n range0.equals(range0);\n Range.CoordinateSystem[] range_CoordinateSystemArray0 = Range.CoordinateSystem.values();\n assertEquals(3, range_CoordinateSystemArray0.length);\n }",
"public abstract long mo9229aD();"
] |
[
"0.5971594",
"0.5946355",
"0.59069395",
"0.57692987",
"0.57106113",
"0.5584926",
"0.5569391",
"0.55565864",
"0.55110174",
"0.5498609",
"0.54796475",
"0.54732305",
"0.5466464",
"0.54603213",
"0.54603213",
"0.54603213",
"0.545222",
"0.5400696",
"0.5379039",
"0.536813",
"0.5366542",
"0.5364771",
"0.53617185",
"0.5345625",
"0.53443784",
"0.5342034",
"0.5321861",
"0.5316486",
"0.52917033",
"0.52917033",
"0.52917033",
"0.52912813",
"0.5281885",
"0.52605397",
"0.5255574",
"0.5248826",
"0.5246887",
"0.52420676",
"0.5225689",
"0.51978",
"0.51959264",
"0.51958495",
"0.51674116",
"0.51667184",
"0.5161899",
"0.51576924",
"0.5156459",
"0.5151133",
"0.51430887",
"0.51413006",
"0.5123978",
"0.51209736",
"0.51206726",
"0.5111347",
"0.5109863",
"0.5098518",
"0.50938123",
"0.5087981",
"0.5087394",
"0.5082387",
"0.5077808",
"0.5075924",
"0.5075138",
"0.50721097",
"0.5048817",
"0.5047793",
"0.5044233",
"0.5043525",
"0.50428736",
"0.50375456",
"0.5032132",
"0.50221443",
"0.5020424",
"0.501206",
"0.50048524",
"0.50011045",
"0.49983364",
"0.49967074",
"0.49909803",
"0.49881095",
"0.49841058",
"0.4976741",
"0.49762377",
"0.4970541",
"0.49692395",
"0.49583483",
"0.49580145",
"0.49580145",
"0.49580145",
"0.4952472",
"0.4945795",
"0.49417055",
"0.49414644",
"0.4927657",
"0.49254128",
"0.49241737",
"0.49135697",
"0.49084014",
"0.49028903",
"0.49005377"
] |
0.56348616
|
5
|
Use LoginRewardPro.newBuilder() to construct.
|
private LoginRewardPro(Builder builder) {
super(builder);
}
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"private LoginReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private LoginRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private LoginRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private LoginRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private InstanceGetStarRewardRt(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private LoginRes(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Login_S(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Login_C(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private WeixinLoginRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private LoginPack(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private MsLogin(Builder builder) {\n super(builder);\n }",
"@SuppressWarnings(\"unused\")\r\n\tprivate LoginStatusBuilder(){}",
"private McLogin(Builder builder) {\n super(builder);\n }",
"private LoginProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private QueryLoginReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private RewardListPro(Builder builder) {\n super(builder);\n }",
"private LoginResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private LoginResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private LoginCheck(Builder builder) {\n super(builder);\n }",
"public void createInventoryReward() {\n if (inventoryEntityToRetrieve == null) {\n try {\n inventoryEntityToRetrieve = RandomBenefitModel.getInventoryRewards(application, encounter, characterVM.getDistance());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }",
"private UserLoginReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private RequestLogin(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"@Test\n public void testCreateRewardAccount0() {\n Dining dining = Dining.createDining(\"100.00\", \"1234123412341234\", \"0123456789\");\n\n Account account = AccountTestData.createTestAccount0();\n\n AccountContribution contribution = account.makeContribution(new MonetaryAmount(8));\n try {\n RewardConfirmation confirmation = repository.confirmReward(contribution, dining);\n Assert.assertNotNull(\"confirmation should not be null\", confirmation);\n Assert.assertNotNull(\"confirmation number should not be null\", confirmation.getConfirmationNumber());\n Assert.assertEquals(\"wrong contribution object\", contribution, confirmation.getAccountContribution());\n verifyRewardInserted(confirmation, dining);\n } catch (DataIntegrityViolationException dive) {\n logger.error(\"exception on creation of reward from contribution=\" + contribution + \":dining=\" + dining,\n dive);\n throw dive;\n }\n }",
"private Intent createPasswordIntent() {\n // Make sure we don't prompt too many times.\n mProfileSyncService.setPassphrasePrompted(true);\n\n Intent intent = new Intent(Intent.ACTION_MAIN);\n intent.setComponent(\n new ComponentName(ContextUtils.getApplicationContext(), PassphraseActivity.class));\n intent.addCategory(Intent.CATEGORY_LAUNCHER);\n // This activity will become the start of a new task on this history stack.\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n // Clears the task stack above this activity if it already exists.\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n return intent;\n }",
"private UserAchievementProto(Builder builder) {\n super(builder);\n }",
"public login_1_argument() {\n }",
"pb4server.SetMainHeroRewardAskReq getSetMainHeroRewardAskReq();",
"private QueryLoginRes(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public void createGoldReward() {\n try {\n int gold = RandomBenefitModel.getGoldReward(encounter, characterVM.getDistance());\n if (gold > 0) characterVM.goldChange(gold);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"public LogIn() {\n \n }",
"private McEasyLogin(Builder builder) {\n super(builder);\n }",
"private LogIn() {}",
"Pokemon.RequestEnvelop.AuthInfo.JWTOrBuilder getTokenOrBuilder();",
"com.bingo.server.msg.REQ.LoginRequestOrBuilder getLoginOrBuilder();",
"private Intent createIntent() {\n Intent intent = new Intent(this, GameOverActivity.class);\n intent.putExtra(POINTS, presenter.getPoints() + points);\n intent.putExtra(PASS_USER, user);\n intent.putExtra(CORRECT, correct);\n intent.putExtra(INCORRECT, incorrect);\n intent.putExtra(TIME, time);\n intent.putExtra(EVIL, evil);\n intent.putExtra(FRIENDLY, friendly);\n intent.putExtra(\"from\", \"bonus\");\n return intent;\n }",
"void giveReward(BPlayer bPlayer, int tier, int status);",
"private MsEasyLogin(Builder builder) {\n super(builder);\n }",
"private void startSignIn() {\n Intent intent = AuthUI.getInstance().createSignInIntentBuilder()\n .setIsSmartLockEnabled(!BuildConfig.DEBUG)\n .setAvailableProviders(Arrays.asList(\n new AuthUI.IdpConfig.EmailBuilder().build(),\n new AuthUI.IdpConfig.GoogleBuilder().build()))\n .setLogo(R.mipmap.ic_launcher)\n .build();\n\n startActivityForResult(intent, RC_SIGN_IN);\n }",
"private PasskeyContract() {}",
"private UserLoginRes(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public abstract int getReward(int initialState, int initialAction);",
"public Login() {\r\n\t\tinitialize();\r\n\t}",
"public void createExpReward() {\n try {\n int exp = RandomBenefitModel.getExpReward(encounter, characterVM.getDistance());\n if (exp > 0) characterVM.addExp(exp);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\t\tpublic LoginDto createFromParcel(Parcel source) {\n\t\t\tLoginDto td = new LoginDto();\n\t\t\ttd.custNo = source.readString();\n\t\t\ttd.leftTimes = source.readString();\n\t\t\ttd.contentCode = source.readInt();\n\t\t\ttd.contentMsg = source.readString();\n\t\t\treturn td;\n\t\t}",
"public static MQuestSpecialReward createEntity(EntityManager em) {\n MQuestSpecialReward mQuestSpecialReward = new MQuestSpecialReward()\n .groupId(DEFAULT_GROUP_ID)\n .weight(DEFAULT_WEIGHT)\n .rank(DEFAULT_RANK)\n .contentType(DEFAULT_CONTENT_TYPE)\n .contentId(DEFAULT_CONTENT_ID)\n .contentAmount(DEFAULT_CONTENT_AMOUNT);\n return mQuestSpecialReward;\n }",
"public static Bundle createArgumentsForPromoAddAccountFlow(@SigninAccessPoint int accessPoint) {\n Bundle result = SyncConsentFragmentBase.createArgumentsForAddAccountFlow(accessPoint);\n result.putInt(ARGUMENT_PERSONALIZED_PROMO_ACTION, PromoAction.NEW_ACCOUNT);\n return result;\n }",
"private void login() {\n String email = username.getText().toString();\n String pass = password.getText().toString();\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(DonorInterface.BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n DonorInterface api = retrofit.create(DonorInterface.class);\n Login login = new Login(email, pass);\n Call<Donor> call = api.login(login);\n\n call.enqueue(new Callback<Donor>() {\n @Override\n public void onResponse(Call<Donor> call, Response<Donor> response) {\n if (response.isSuccessful())\n {\n token = response.body().getToken().toString();\n Intent intent = new Intent(LoginActivity.this, SecondActivity.class);\n intent.putExtra(\"token\", token);\n startActivity(intent);\n finish();\n }\n else\n {\n Toast.makeText(LoginActivity.this,\"Username or Password is incorrect!\",Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<Donor> call, Throwable t) {\n Toast.makeText(LoginActivity.this,\"Issue in method\",Toast.LENGTH_SHORT).show();\n }\n });\n\n\n\n }",
"private MaskedWalletRequest createStripeMaskedWalletRequest() {\n List<LineItem> lineItems = ((HomeActivity)getActivity()).buildLineItems();\n\n // Calculate the cart total by iterating over the line items.\n String cartTotal = ((HomeActivity)getActivity()).calculateCartTotal(lineItems);\n\n MaskedWalletRequest.Builder builder = MaskedWalletRequest.newBuilder()\n .setMerchantName(\"Merchant Name\")\n .setPhoneNumberRequired(true)\n .setShippingAddressRequired(true)\n .setCurrencyCode(\"USD\")\n .setEstimatedTotalPrice(cartTotal)\n .setCart(Cart.newBuilder()\n .setCurrencyCode(\"USD\")\n .setTotalPrice(cartTotal)\n .setLineItems(lineItems)\n .build());\n\n builder.setPaymentMethodTokenizationParameters(mPaymentMethodParameters);\n\n return builder.build();\n }",
"@Test\n public void testCreateRewardAccount8() {\n Dining dining = Dining.createDining(\"100.00\", \"4320123412340008\", \"123456008\");\n\n Account account = createAccount8();\n\n AccountContribution contribution = account.makeContribution(new MonetaryAmount(8));\n try {\n RewardConfirmation confirmation = repository.confirmReward(contribution, dining);\n Assert.assertNotNull(\"confirmation should not be null\", confirmation);\n Assert.assertNotNull(\"confirmation number should not be null\", confirmation.getConfirmationNumber());\n Assert.assertEquals(\"wrong contribution object\", contribution, confirmation.getAccountContribution());\n verifyRewardInserted(confirmation, dining);\n } catch (DataIntegrityViolationException dive) {\n logger.error(\"exception on creation of reward from contribution=\" + contribution + \":dining=\" + dining,\n dive);\n throw dive;\n }\n }",
"public LoginFormProtoType() {\r\n loginFormProtoTypeInstance = this;\r\n this.dataUserAccess = DataUserAccessFactory.getDataUserAccessInstance();\r\n this.audio = AudioPlayUtil.getAudioClip();\r\n }",
"WithCreate withRosterProfile(RosterProfile rosterProfile);",
"public Player(String name, String email, String address, long phone, int password, Playground_Registration pgr) {\n this.name = name;\n this.email = email;\n this.address = address;\n this.phone = phone;\n this.password = password;\n this.pgr = pgr;\n }",
"private void createPassenger() {\n account = new Account(\"driver\", \"password\", \"[email protected]\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L);\n }",
"private EnterDeskRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public Login() {\n }",
"pb4server.SetMainHeroRewardAskReqOrBuilder getSetMainHeroRewardAskReqOrBuilder();",
"Accessprofile create(Accessprofile accessprofile);",
"public Login() {\n\n }",
"private AuthLoginReq(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"private void onLogin( LoginType loginType ) {\n\n // 0. create intent to launch account kit activity\n // 1. build an account kit config based on account type and response type\n // 2. package config as extra and launch account kit activity\n\n // 0. create intent to launch account kit activity\n\n Intent intent = new Intent( this, AccountKitActivity.class );\n\n // 1. build an account kit config based on account type and response type\n\n AccountKitConfiguration.AccountKitConfigurationBuilder builder =\n new AccountKitConfiguration.AccountKitConfigurationBuilder( loginType,\n AccountKitActivity.ResponseType.TOKEN /*since we're using the client\n access token method*/ );\n\n AccountKitConfiguration configuration = builder.build();\n\n // 2. package config as extra and launch account kit activity\n\n intent.putExtra( AccountKitActivity.ACCOUNT_KIT_ACTIVITY_CONFIGURATION, configuration );\n\n startActivityForResult( intent, APP_REQUEST_CODE );\n\n }",
"public AgentDTO login(String login, String senha);",
"private void createRequest() {\n GoogleSignInOptions gso = new GoogleSignInOptions\n .Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n googleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this, this)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n\n signInButton = (SignInButton) findViewById(R.id.sign_in_button);\n signInButton.setSize(SignInButton.SIZE_WIDE);\n signInButton.setColorScheme(signInButton.COLOR_DARK);\n signInButton.setOnClickListener((v) -> {\n Intent intent = Auth.GoogleSignInApi.getSignInIntent(googleApiClient);\n startActivityForResult(intent, SIGN_IN_CODE);\n });\n }",
"private CreateProofRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public void createSignInIntent() {\n List<AuthUI.IdpConfig> providers = Arrays.asList(\n new AuthUI.IdpConfig.EmailBuilder().build()\n );\n\n startActivityForResult(AuthUI.getInstance()\n .createSignInIntentBuilder()\n .setAvailableProviders(providers)\n .build(), SIGN_IN);\n }",
"@Override\n public void onRewarded(RewardItem reward) {\n\n // Reward the user.\n }",
"private Experience(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public LoginRequest(String email, String password) {\n this.email = email;\n this.password = password;\n }",
"public static Bundle createArgumentsForPromoChooseAccountFlow(\n @SigninAccessPoint int accessPoint, String accountName) {\n Bundle result = SyncConsentFragmentBase.createArgumentsForChooseAccountFlow(\n accessPoint, accountName);\n result.putInt(ARGUMENT_PERSONALIZED_PROMO_ACTION, PromoAction.NOT_DEFAULT);\n return result;\n }",
"public Login() {\n\t\tsuper();\n\t}",
"public void login_pw() {\n\t\tIntent intent = new Intent(this, ResetPasswordActivity.class);\n\t\tstartActivity(intent);\n\t}",
"public FollowerRequest() {}",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tswitch(requestCode){\n\t\tcase 0:\t\t\t\n\t\t\tif(resultCode == RESULT_OK){\n\t\t\t\tLog.d(TAG, Integer.toString(RESULT_OK));\n\t\t\t\tString u_signup, p_signup;\n\t\t\t\tu_signup = data.getStringExtra(\"username\");\n\t\t\t\tp_signup = data.getStringExtra(\"password\");\n\t\t\t\tLog.d(TAG, u_signup);\n\t\t\t\tintent = new Intent(getApplicationContext(), Timeline.class);\n\t\t\t\tintent.putExtra(\"first_time\", true); //Setting Boolean first_time to true\n\t\t\t\tintent.putExtra(\"username\", u_signup);\n\t\t\t\tintent.putExtra(\"password\", p_signup);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t}\n\t}",
"public static Bundle createArgumentsForPromoDefaultFlow(\n @SigninAccessPoint int accessPoint, String accountName) {\n Bundle result = SyncConsentFragmentBase.createArguments(accessPoint, accountName);\n result.putInt(ARGUMENT_PERSONALIZED_PROMO_ACTION, PromoAction.WITH_DEFAULT);\n return result;\n }",
"private void makeLogin() {\n if (enableLoginActivity && mAuth.getCurrentUser() == null) {\n startActivity(new Intent(MainActivity.this, LoginActivity.class));\n finish();\n }\n else if (!enableLoginActivity) {\n user = new User(\"johnDoe\", \"[email protected]\", \"1234\");\n }\n }",
"private ResponseLogin(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"public ProfileSetupActivity() {\n }",
"public Login() {\n initComponents();\n KiemTraKN();\n }",
"private Account(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private VerifyProofRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public void userRequest() \n {\n \tSystem.out.println(\"Please enter a user ID: \");\n\t\tuserID = scanner.nextInt();\n\n\t\tSystem.out.println(\"Please enter a password: \");\n\t\tpassword = scanner.next();\n\t\t\n\t\tuserRequest = UserRequest.newBuilder()\t// Pass in user input to generated methods \n\t\t\t\t\t\t\t\t .setUserID(userID)\n\t\t\t\t\t\t\t\t .setPassword(password)\n\t\t\t\t\t\t\t\t .build();\n\t\t\n\t\tuserResponse = UserResponse.newBuilder()\n\t\t\t\t\t\t\t\t .getDefaultInstanceForType();\n\t\t\n\t\tuserResponse = syncPasswordStub.hash(userRequest);\n\n\t\thashedPassword = userResponse.getHashedPassword();\n\t\tsalt = userResponse.getSalt();\n\t\n }",
"@Override\n\tpublic void onClick(View view) {\n\t\tIntent intent = new Intent();\n\t\tif (view.getId() == R.id.ast_back_icon) {\n\t\t\tintent.setClass(this, AstLoginActivity.class);\n\t\t} else if (view.getId() == R.id.ast_mob_sdk_next_step_btn) {\n\t\t\tnew GuestPhoneCanBindHandler(AstGamePlatform.getInstance()\n\t\t\t\t\t.isDebugMode(), new HttpCallback() {\n\t\t\t\tpublic void onSuccess(int code, String msg, final Object data) {\n\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\tintent.setClass(getApplicationContext(),\n\t\t\t\t\t\t\tDeclareGetPasswdActivity.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * 登陆失败处理\n\t\t\t\t */\n\t\t\t\tpublic void onFailure(int code, final String msg, Object data) {\n\t\t\t\t\tif (code != 317) {\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), msg,\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\t\tintent.setClass(getApplicationContext(),\n\t\t\t\t\t\t\t\tRegetPasswdActivity.class);\n\t\t\t\t\t\tintent.putExtra(\"mobile\", ed.getText().toString());\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, ed.getText().toString()).post();\n\t\t\treturn;\n\t\t}\n\t\tfinish();\n\t\tstartActivity(intent);\n\t}",
"public Login()\r\n\t{\r\n\t\tthis.name=name;\r\n\t\tthis.dob=dob;\r\n\t\tthis.nationality=nationality;\r\n\t\tthis.location=location;\r\n\t\tthis.phno=phno;\r\n\t\tthis.gender=gender;\r\n\t\tthis.jobtype=jobtype;\r\n\t\tthis.experience=experience;\r\n\t\tthis.salary=salary;\r\n\t\t\r\n\t\tthis.uname=uname;\r\n\t\tthis.password=password;\r\n\t\t\r\n\t\tthis.notification=notification;\r\n\t}",
"public interface LoginContract {\n\n interface View {\n\n void showProgress();\n\n void hideProgress();\n\n void showErrorAuth(String errorMassage);\n\n void showSuccessAuth();\n\n void setFromSharedPref(String email,String password,boolean isChecked);\n\n void showErrorEmptyField();\n\n void showErrorUnvalidField();\n\n void openMainActivity();\n\n void openRegisterActivity();\n\n }\n\n interface Presenter {\n\n void attachView(View view);\n\n void detachView();\n\n void OnClickRegisterButton();\n\n void loginUser(String email,String password, boolean isCheked);\n\n void onClickLoginButton(String email,String password,boolean isChecked);\n\n void saveToSharedPref(String email,String password,boolean isChecked);\n\n void viewIsReady();\n\n void onSuccessLogin();\n\n void onFailedLogin(String errorMessage);\n\n void setFromSharedPref(String email,String password,boolean isChecked);\n }\n}",
"private CoprocessObject.Object doForwardToLogin(CoprocessObject.Object.Builder builder) {\n\t\tReturnOverrides retOverrides = builder.getRequestBuilder()\n\t\t\t\t.getReturnOverridesBuilder()\n\t\t\t\t.setResponseCode(301)\n\t\t\t\t.putHeaders(HTTP_HEADER_LOCATION, loginUrl)\n\t\t\t\t.build();\n\t\t\n\t\t MiniRequestObject miniReq = builder.getRequestBuilder().setReturnOverrides(retOverrides).build();\n\t\t return builder.setRequest(miniReq).build();\n\t}",
"private OnlineStoreUser(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public login() {\r\n\t\tsuper();\r\n\t}",
"public LoginProfesor() {\n initComponents();\n }",
"private PredictRequest() {\n\t}",
"private void creatRequest() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id)) //R.string.default_web_client_id需要將系統執行一次,讓他產生\n .requestEmail()\n .build();\n\n mGoogleSignInClient = GoogleSignIn.getClient(this,gso);\n }",
"private SCLogin(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }",
"POGOProtos.Rpc.VsSeekerRewardTrack getRewardTrack();",
"private void createRequest() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(default_web_client_id))\n .requestEmail()\n .build();\n\n mGoogleSignInClient = GoogleSignIn.getClient(Signup.this, gso);\n\n\n }",
"public static void main(String[] args) throws Exception {\n NubankRewards card = new NubankRewards();\n\n card.validate();\n card.collectPayment();\n }",
"public void startPayment() {\r\n final Activity activity = this;\r\n\r\n final Checkout co = new Checkout();\r\n\r\n try {\r\n JSONObject options = new JSONObject();\r\n options.put(\"name\", \"Farm2Home\");\r\n options.put(\"description\", \"Consumption charges\");\r\n //You can omit the image option to fetch the image from dashboard\r\n // options.put(\"image\", \"https://rzp-mobile.s3.amazonaws.com/images/rzp.png\");\r\n options.put(\"currency\", \"INR\");\r\n options.put(\"amount\", \"500\");\r\n\r\n // JSONObject preFill = new JSONObject();\r\n // preFill.put(\"email\", \"[email protected]\");\r\n // preFill.put(\"contact\", \"9876543210\");\r\n\r\n // options.put(\"prefill\", preFill);\r\n\r\n co.open(activity, options);\r\n } catch (Exception e) {\r\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\r\n .show();\r\n e.printStackTrace();\r\n }\r\n }",
"public Login(GproToolController controller) {\n this.baseController = controller;\n setLookAndFeel();\n initComponents();\n centerFrame();\n }",
"public LoginFrag() {\n // Required empty public constructor\n }",
"public void setReward(BigDecimal reward)\n {\n this.reward = reward;\n }",
"private static abstract class <init> extends com.google.android.gms.games.hodImpl\n{\n\n public com.google.android.gms.games.quest.Result zzau(Status status)\n {\n return new com.google.android.gms.games.quest.Quests.ClaimMilestoneResult(status) {\n\n final Status zzQs;\n final QuestsImpl.ClaimImpl zzavH;\n\n public Milestone getMilestone()\n {\n return null;\n }\n\n public Quest getQuest()\n {\n return null;\n }\n\n public Status getStatus()\n {\n return zzQs;\n }\n\n \n {\n zzavH = QuestsImpl.ClaimImpl.this;\n zzQs = status;\n super();\n }\n };\n }",
"public CreditsScreen()\n {\n }",
"protected void launchSignIn()\r\n {\r\n \tIntent i = new Intent(this, LoginActivity.class);\r\n \tstartActivity(i);\r\n }"
] |
[
"0.53948236",
"0.5376396",
"0.5376396",
"0.5376396",
"0.5353266",
"0.5173236",
"0.5133137",
"0.5095223",
"0.50533026",
"0.50288963",
"0.502872",
"0.49837953",
"0.4928375",
"0.49230057",
"0.4909565",
"0.4890803",
"0.48694482",
"0.48694482",
"0.48060456",
"0.47890633",
"0.47654206",
"0.47575387",
"0.47211483",
"0.47064972",
"0.46973315",
"0.4662376",
"0.46539804",
"0.46443",
"0.46406105",
"0.4636146",
"0.45839965",
"0.45801505",
"0.45760214",
"0.45679176",
"0.45312864",
"0.45224583",
"0.44940332",
"0.4488377",
"0.4460917",
"0.44570675",
"0.4448241",
"0.44457507",
"0.44410992",
"0.44377273",
"0.44138733",
"0.44125983",
"0.44102937",
"0.4408996",
"0.4405717",
"0.4402874",
"0.44012517",
"0.4401106",
"0.43869898",
"0.4386379",
"0.43834326",
"0.43812275",
"0.43735626",
"0.43711084",
"0.43704277",
"0.43590593",
"0.43570036",
"0.4350022",
"0.4348659",
"0.4340223",
"0.4327138",
"0.43242732",
"0.43232673",
"0.43177775",
"0.43087807",
"0.43082196",
"0.42822626",
"0.4282233",
"0.42785978",
"0.4272262",
"0.42695713",
"0.42636174",
"0.42575446",
"0.42560557",
"0.42528743",
"0.42494583",
"0.42456323",
"0.42443424",
"0.42412165",
"0.42342493",
"0.42336255",
"0.423338",
"0.4231564",
"0.4231134",
"0.42308712",
"0.4228505",
"0.4225151",
"0.4224224",
"0.42216572",
"0.4221243",
"0.42210323",
"0.42195162",
"0.4218318",
"0.42153162",
"0.4214465",
"0.4213628"
] |
0.7551583
|
0
|
required bool reqardTypeThree = 10;
|
boolean hasReqardTypeThree();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setRequired(boolean required);",
"void setRequired(boolean required);",
"boolean getRequired();",
"boolean getRequired();",
"boolean getRequired();",
"public void setRequired(boolean value) {\r\n this.required = value;\r\n }",
"public void setRequired(boolean required) {\n this.required = required;\n }",
"boolean hasReqardTypeThirty();",
"boolean isSetRequired();",
"boolean hasReqardTypeFifteen();",
"public void setRequired (boolean required) {\n this.required = required;\n }",
"public boolean getVariableRequired() {\r\n return relaxed;\r\n }",
"boolean isRequired();",
"boolean isRequired();",
"boolean isRequired();",
"org.apache.xmlbeans.XmlBoolean xgetRequired();",
"public void setRequired(boolean required) {\r\n this.required = required;\r\n }",
"boolean hasReqardTypeTen();",
"public boolean isRequired();",
"public void setRequiresTaxCertificate (boolean RequiresTaxCertificate)\n{\nset_Value (COLUMNNAME_RequiresTaxCertificate, Boolean.valueOf(RequiresTaxCertificate));\n}",
"boolean optional();",
"public void setRequired(boolean required)\n {\n this.isRequired = required;\n }",
"public void setRequired(boolean required) {\r\n\t\tthis.required = required;\r\n\t}",
"public boolean isRequired() {\n return required;\n }",
"boolean isMandatory();",
"public void setRequired(boolean r)\n\t{\n\t\trequiring = r;\n\t}",
"public void setIsRequired(boolean value) {\n this.isRequired = value;\n }",
"public void setRequired(int required) {\n this.required = required;\n }",
"public void method_217(boolean var1) {}",
"public void setClaim(boolean a,AbstAnt ant){\n isClaimed= a;\n claimer= ant;\n}",
"abstract void mo956a(boolean z);",
"public void setProcessed (boolean Processed)\n{\nset_Value (\"Processed\", new Boolean(Processed));\n}",
"public MathEval setVariableRequired(boolean val) {\r\n relaxed=(!val);\r\n return this;\r\n }",
"public boolean isRequired() {\r\n return required;\r\n }",
"public int getRequired() {\n return required;\n }",
"public void setClaim(boolean a){\n isClaimed= a;\n \n}",
"public void method_103(boolean var1) {\n this.field_4130 = var1;\n }",
"public abstract void setInput(boolean value);",
"abstract void checkWhetherVariable(SyntaxUnit use);",
"public void setRequire(boolean require) {\n this.require = require;\n }",
"public boolean isRequired() {\r\n return required;\r\n }",
"public boolean isRequired() {\r\n return required;\r\n }",
"public void setRequired(Boolean fieldRequired) {\n this.fieldRequired = fieldRequired;\n }",
"public abstract boolean read_boolean();",
"public boolean isRequired () {\n return required;\n }",
"public void setTallied(java.lang.Boolean value);",
"Rule FieldReq() {\n // No effect on the value stack\n return FirstOf(\"required \", \"optional \");\n }",
"void xsetRequired(org.apache.xmlbeans.XmlBoolean required);",
"public abstract void mo32005dK(boolean z);",
"BoolConstant createBoolConstant();",
"public void setIsFixPrice (String IsFixPrice);",
"public final native void setRequired(boolean required) /*-{\n\t\tthis.required = required;\n\t}-*/;",
"public boolean isRequiresTaxCertificate() \n{\nObject oo = get_Value(COLUMNNAME_RequiresTaxCertificate);\nif (oo != null) \n{\n if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();\n return \"Y\".equals(oo);\n}\nreturn false;\n}",
"public boolean isIsRequired() {\n return isRequired;\n }",
"public Boolean getRequired() {\n return fieldRequired;\n }",
"@JSProperty\n boolean isRequired();",
"private CheckBoolean() {\n\t}",
"boolean hasHasRestraintType();",
"@Override\n\tpublic void setMandatory(boolean mandatory) {\n\t\t\n\t}",
"void mo3305a(boolean z);",
"public boolean isRequired()\n {\n return this.isRequired;\n }",
"Argument<T> optional(boolean optional);",
"public void mo97903a(boolean z) {\n }",
"void mo1492b(boolean z);",
"void mo1488a(boolean z);",
"public void setMandatory(boolean value) {\n this.mandatory = value;\n }",
"public TrueValue (){\n }",
"public boolean isRequired() {\n \treturn model.isRequired();\n }",
"public final void setRequired() {_occ.setRequired();}",
"public void mo97905b(boolean z) {\n }",
"public boolean isRequired()\n\t{\n\t\treturn required;\n\t}",
"public Builder setRequired(boolean value) {\n\n required_ = value;\n bitField0_ |= 0x00000002;\n onChanged();\n return this;\n }",
"public void mo97907c(boolean z) {\n }",
"void mo99838a(boolean z);",
"public abstract void mo32007dM(boolean z);",
"void mo98208a(boolean z);",
"public abstract C0631bt mo9251e(boolean z);",
"public void mo3375q(boolean z) {\n }",
"public void setEight(boolean eight);",
"public abstract void mo32006dL(boolean z);",
"void mo21069a(boolean z);",
"void mo197b(boolean z);",
"public void setQwertyMode(boolean isQwerty);",
"public Boolean getBooleanAttribute();",
"public boolean isFrankingRequired() {\n\t\treturn false;\n\t}",
"@java.lang.Override\n public boolean getRequired() {\n return required_;\n }",
"public interface IsNeedSubscribePIN\n {\n /**\n * need PIN\n */\n String NEED = \"1\";\n\n /**\n * not need PIN\n */\n String NEEDLESS = \"0\";\n }",
"void setNullable(boolean nullable);",
"public boolean getValidity();",
"public boolean isRequire() {\n return require;\n }",
"boolean isSetNextrun();",
"public void am(boolean z) {\n }",
"boolean isSetStraight();",
"@java.lang.Override\n public boolean getRequired() {\n return required_;\n }",
"void boolean1(boolean a);",
"public void setMandatory(boolean mandatory)\n {\n this.mandatory = mandatory;\n performFlags();\n }",
"void mo54420a(boolean z, boolean z2);",
"@JsSupport( {JsVersion.MOZILLA_ONE_DOT_ONE, \r\n\t\tJsVersion.JSCRIPT_TWO_DOT_ZERO})\r\npublic interface Boolean extends Object {\r\n\t\r\n\t@Constructor void Boolean();\r\n\t\r\n\t@Constructor void Boolean(boolean value);\r\n\t\r\n\t@Constructor void Boolean(Number value);\r\n\t\r\n\t@Constructor void Boolean(String value);\r\n\t\r\n\t@Function boolean valueOf();\r\n\t\r\n}",
"BoolOperation createBoolOperation();",
"boolean getBoolValue();"
] |
[
"0.68586755",
"0.6804346",
"0.6744422",
"0.6744422",
"0.6744422",
"0.6602447",
"0.6554643",
"0.6463983",
"0.6336504",
"0.6238919",
"0.62379736",
"0.6208776",
"0.62055314",
"0.62055314",
"0.62055314",
"0.6189056",
"0.6174309",
"0.6082791",
"0.6050784",
"0.6029993",
"0.60282475",
"0.5988555",
"0.59850794",
"0.59397465",
"0.5917414",
"0.5897711",
"0.58727455",
"0.5845103",
"0.57463264",
"0.5714425",
"0.5698245",
"0.5685115",
"0.5683263",
"0.5675706",
"0.5662623",
"0.5646275",
"0.56432694",
"0.5636943",
"0.5630367",
"0.5624417",
"0.5617225",
"0.5617225",
"0.5614342",
"0.55916923",
"0.5582969",
"0.5580809",
"0.5578901",
"0.55497575",
"0.554248",
"0.5538709",
"0.5536444",
"0.55355066",
"0.5530651",
"0.5530286",
"0.5528851",
"0.55227655",
"0.5522614",
"0.5520217",
"0.55175745",
"0.55015945",
"0.5498154",
"0.5494734",
"0.5493273",
"0.5482062",
"0.5468001",
"0.54676414",
"0.54651946",
"0.5459182",
"0.5458868",
"0.5450591",
"0.5449108",
"0.54404414",
"0.5434664",
"0.5433005",
"0.54279387",
"0.54133296",
"0.5412412",
"0.54099745",
"0.53985715",
"0.5398159",
"0.539147",
"0.5387386",
"0.5381575",
"0.5380519",
"0.5368938",
"0.5352541",
"0.5350988",
"0.53491616",
"0.53470373",
"0.53442407",
"0.5339598",
"0.53307927",
"0.53163576",
"0.53058565",
"0.530493",
"0.5301231",
"0.5300762",
"0.52989995",
"0.5291705",
"0.52916574"
] |
0.7122344
|
0
|
required bool reqardTypeTen = 20;
|
boolean hasReqardTypeTen();
|
{
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
}
|
[
"public void setRequired(boolean required);",
"void setRequired(boolean required);",
"boolean getRequired();",
"boolean getRequired();",
"boolean getRequired();",
"public void setRequired(boolean value) {\r\n this.required = value;\r\n }",
"boolean hasReqardTypeThirty();",
"boolean hasReqardTypeFifteen();",
"public void setRequired(boolean required) {\n this.required = required;\n }",
"boolean hasReqardTypeThree();",
"public void setRequiresTaxCertificate (boolean RequiresTaxCertificate)\n{\nset_Value (COLUMNNAME_RequiresTaxCertificate, Boolean.valueOf(RequiresTaxCertificate));\n}",
"boolean isSetRequired();",
"public void setRequired (boolean required) {\n this.required = required;\n }",
"boolean isRequired();",
"boolean isRequired();",
"boolean isRequired();",
"public void setRequired(boolean required) {\r\n this.required = required;\r\n }",
"org.apache.xmlbeans.XmlBoolean xgetRequired();",
"public void setIsRequired(boolean value) {\n this.isRequired = value;\n }",
"public boolean isRequired();",
"public void setIsFixPrice (String IsFixPrice);",
"public boolean getVariableRequired() {\r\n return relaxed;\r\n }",
"public void setRequired(boolean required)\n {\n this.isRequired = required;\n }",
"public void setRequired(int required) {\n this.required = required;\n }",
"public void setTallied(java.lang.Boolean value);",
"public void setVar20(java.lang.Boolean value) {\n this.var20 = value;\n }",
"public void setClaim(boolean a,AbstAnt ant){\n isClaimed= a;\n claimer= ant;\n}",
"public void setRequired(boolean required) {\r\n\t\tthis.required = required;\r\n\t}",
"public boolean isRequired() {\n return required;\n }",
"public void setCost(int cost) {\n/* 79 */ Validate.isTrue((cost > 0), \"The cost must be greater than 0!\");\n/* */ \n/* 81 */ this.cost = cost;\n/* */ }",
"public boolean isRequiresTaxCertificate() \n{\nObject oo = get_Value(COLUMNNAME_RequiresTaxCertificate);\nif (oo != null) \n{\n if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();\n return \"Y\".equals(oo);\n}\nreturn false;\n}",
"boolean isMandatory();",
"public void setClaim(boolean a){\n isClaimed= a;\n \n}",
"public void setProcessed (boolean Processed)\n{\nset_Value (\"Processed\", new Boolean(Processed));\n}",
"public TrueValue (){\n }",
"public void setRequired(boolean r)\n\t{\n\t\trequiring = r;\n\t}",
"boolean optional();",
"public int getRequired() {\n return required;\n }",
"BoolConstant createBoolConstant();",
"public void setRequired(Boolean fieldRequired) {\n this.fieldRequired = fieldRequired;\n }",
"public MathEval setVariableRequired(boolean val) {\r\n relaxed=(!val);\r\n return this;\r\n }",
"boolean getB20();",
"@JSProperty\n boolean isRequired();",
"boolean isSetSingleBetMinimum();",
"public void method_217(boolean var1) {}",
"public void setEight(boolean eight);",
"public void setVar200(java.lang.Boolean value) {\n this.var200 = value;\n }",
"public Builder setRequired(boolean value) {\n\n required_ = value;\n bitField0_ |= 0x00000002;\n onChanged();\n return this;\n }",
"boolean getBoolValue();",
"boolean getBoolValue();",
"public void setIsApproved (boolean IsApproved);",
"public void setIsApproved (boolean IsApproved);",
"public void setIsAutoNumbered(java.lang.Boolean value);",
"boolean hasHasRestraintType();",
"public void setVar56(java.lang.Boolean value) {\n this.var56 = value;\n }",
"public abstract void setInput(boolean value);",
"boolean isSetAmount();",
"boolean isSetStraight();",
"public void setMandatory(boolean value) {\n this.mandatory = value;\n }",
"Rule FieldReq() {\n // No effect on the value stack\n return FirstOf(\"required \", \"optional \");\n }",
"public boolean isRequired() {\r\n return required;\r\n }",
"public Boolean getRequired() {\n return fieldRequired;\n }",
"void setNullable(boolean nullable);",
"public boolean isRequired() {\r\n return required;\r\n }",
"public boolean isRequired() {\r\n return required;\r\n }",
"public void setIsTaxIncluded (boolean IsTaxIncluded);",
"public interface PRIORITY_MODEL_POLICY_TYPE {\n int value = 40;\n}",
"public void setIsSetPriceLimit (boolean IsSetPriceLimit);",
"boolean isSetCapitalPayed();",
"BooleanValue createBooleanValue();",
"BooleanValue createBooleanValue();",
"BooleanValue createBooleanValue();",
"BooleanValue createBooleanValue();",
"public Boolean getBooleanAttribute();",
"static void primitiveBoolean() {\n\n double coveragerByInsurance = 0.8;\n double billAmount = 1000.0;\n double amountPaidByInsurance = 0.0;\n double amountPaidByPatient = billAmount;\n if (isInsured) {\n amountPaidByInsurance = billAmount * coveragerByInsurance;\n amountPaidByPatient = billAmount - amountPaidByInsurance;\n }\n System.out.println(\"AmountPaidByInsurance=\" + amountPaidByInsurance);\n System.out.println(\"AmountPaidBypatient=\" + amountPaidByPatient);\n }",
"boolean isSetValueQuantity();",
"public boolean isRequired () {\n return required;\n }",
"public void setIsSetPriceStd (boolean IsSetPriceStd);",
"public boolean isIsRequired() {\n return isRequired;\n }",
"boolean getB21();",
"private CheckBoolean() {\n\t}",
"public Value restrictToStrBoolNum() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.object_labels = r.getters = r.setters = null;\n r.flags &= STR | BOOL | NUM;\n return canonicalize(r);\n }",
"public void method_103(boolean var1) {\n this.field_4130 = var1;\n }",
"boolean getValid();",
"public boolean getValidity();",
"@Override\n\tpublic void setMandatory(boolean mandatory) {\n\t\t\n\t}",
"BoolOperation createBoolOperation();",
"public void setParking(java.lang.Boolean value);",
"public final void setRequired() {_occ.setRequired();}",
"public boolean isRequired()\n {\n return this.isRequired;\n }",
"public void setRequire(boolean require) {\n this.require = require;\n }",
"Argument<T> optional(boolean optional);",
"abstract void mo956a(boolean z);",
"public boolean isFrankingRequired() {\n\t\treturn false;\n\t}",
"boolean boolField(String name, boolean isDefined, boolean value)\n throws NullField, InvalidFieldValue;",
"public interface IsNeedSubscribePIN\n {\n /**\n * need PIN\n */\n String NEED = \"1\";\n\n /**\n * not need PIN\n */\n String NEEDLESS = \"0\";\n }",
"void xsetRequired(org.apache.xmlbeans.XmlBoolean required);",
"SchemaBuilder withFeature(String name, Boolean value);",
"public void setVar11(java.lang.Boolean value) {\n this.var11 = value;\n }",
"abstract void checkWhetherVariable(SyntaxUnit use);"
] |
[
"0.67200583",
"0.66476333",
"0.6592519",
"0.6592519",
"0.6592519",
"0.65788895",
"0.65435946",
"0.6497027",
"0.6431273",
"0.6262832",
"0.62313163",
"0.6173842",
"0.6052768",
"0.59979576",
"0.59979576",
"0.59979576",
"0.5997329",
"0.59552276",
"0.59496236",
"0.58657855",
"0.585653",
"0.58378106",
"0.58235216",
"0.58007175",
"0.57910603",
"0.57673407",
"0.5759928",
"0.575967",
"0.5747404",
"0.57339096",
"0.5714441",
"0.57027245",
"0.568",
"0.5679157",
"0.5664821",
"0.56291676",
"0.562642",
"0.56151766",
"0.56135106",
"0.55844516",
"0.5554888",
"0.5536933",
"0.55220526",
"0.55024713",
"0.5482707",
"0.5482472",
"0.54819095",
"0.5480131",
"0.54739416",
"0.54739416",
"0.54722255",
"0.54722255",
"0.54714227",
"0.5468541",
"0.5465797",
"0.5461207",
"0.5457686",
"0.5450421",
"0.5446901",
"0.54417855",
"0.5440578",
"0.5424601",
"0.53978616",
"0.538445",
"0.538445",
"0.53808105",
"0.5376586",
"0.53761774",
"0.53755236",
"0.5367275",
"0.5367275",
"0.5367275",
"0.5367275",
"0.5366068",
"0.53587",
"0.5358544",
"0.5358323",
"0.53569627",
"0.535489",
"0.5347407",
"0.53450525",
"0.534011",
"0.5340043",
"0.53385806",
"0.5337845",
"0.53267",
"0.5325159",
"0.5320297",
"0.5315169",
"0.53123945",
"0.53110206",
"0.5305764",
"0.5302685",
"0.53021157",
"0.5290909",
"0.5290828",
"0.52899057",
"0.527636",
"0.5268478",
"0.5263816"
] |
0.69451153
|
0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.